当前位置: 首页>>代码示例>>C#>>正文


C# Utilities类代码示例

本文整理汇总了C#中Utilities的典型用法代码示例。如果您正苦于以下问题:C# Utilities类的具体用法?C# Utilities怎么用?C# Utilities使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Utilities类属于命名空间,在下文中一共展示了Utilities类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ShowGameGroupJoinMockDialog

 public void ShowGameGroupJoinMockDialog(
     Utilities.Callback<ResultContainer> callback,
     string callbackId)
 {
     var result = MockResults.GetGenericResult(int.Parse(callbackId), this.ResultExtras);
     callback(new ResultContainer(result));
 }
开发者ID:chico-barnstorm,项目名称:facebook-sdk-for-unity,代码行数:7,代码来源:MockEditor.cs

示例2: hasCrop

 public bool hasCrop(Utilities.CropTypes crop_in)
 {
     if (crops[crop_in].Count != 0)
         return true;
     else
         return false;
 }
开发者ID:hangal2001,项目名称:bushburg,代码行数:7,代码来源:StorageBehavior.cs

示例3: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     Utilities util = new Utilities();
     string eid = Convert.ToString(Session["eid"]);
     if (!String.IsNullOrEmpty(Request.QueryString["id"]))
     {
         int id = Convert.ToInt32(Request.QueryString["id"]);
         if (existComment(id))
         {
             if (util.checkUsersComment(id, eid) || (int)Session["lvl"] == 3)
             {
                 deleteComment(id);
                 Response.Redirect("/Pictures/?id=" + Session["PictureID"]);
             }
         }
         else
         {
              Gavan.Global.error = "התגובה אינה נמצאה.";
         }
     }
     else
     {
         Response.Redirect("../default.aspx");
     }
 }
开发者ID:nick2il,项目名称:GavanGallery,代码行数:25,代码来源:delete.aspx.cs

示例4: LoadSideNavigationItems

    public void LoadSideNavigationItems(Utilities.TopLevelNavigation pageParent, string url)
    {
        // Create generic list to house side nav items
        List<BusinessLogic.SideNavigationItem> sideNavItems = new List<BusinessLogic.SideNavigationItem>();

        switch (pageParent)
        {
            case Utilities.TopLevelNavigation.AboutUs:
                sideNavItems.Add(new BusinessLogic.SideNavigationItem("navWhoIsOMS", "aboutus.aspx", "Who is OMS", "/about-us", false, false));
                sideNavItems.Add(new BusinessLogic.SideNavigationItem("navWhereWeServe", "whereweserve.aspx", "Where we Serve", "/where-we-serve", false, false));
                sideNavItems.Add(new BusinessLogic.SideNavigationItem("navOmsHistory", "#", "OMS History", "/one-mission-society-history", false, false));
                sideNavItems.Add(new BusinessLogic.SideNavigationItem("navArticlesOfFaith", "articlesoffaith.aspx", "Articles of Faith", "/articles-of-faith", false, false));
                sideNavItems.Add(new BusinessLogic.SideNavigationItem("BoardOfTrustees", "#", "Board of Trustees", "/board-of-trustees", false, false));

                sideNavItems.First(x => x.URL == url || x.SeoAlias == url).IsActive = true;
                break;
            case Utilities.TopLevelNavigation.Give:
                sideNavItems.Add(new BusinessLogic.SideNavigationItem("navGiveToOMS", "Give.aspx", "Give to OMS", "/give", false, false));
                sideNavItems.Add(new BusinessLogic.SideNavigationItem("navGiveToAProject", "project.aspx", "Give to a Project", "/give/projects", false, false));
                sideNavItems.Add(new BusinessLogic.SideNavigationItem("navGiveToAMissionary", "#", "Give to a Missionary", "/give/missionary", false, false));

                var activeNode = sideNavItems.FirstOrDefault(x => x.URL == url || x.SeoAlias == url);
                if (activeNode != null) activeNode.IsActive = true;
                break;
        }

        // Add contextual side item
        if (this.ContextualSideNavItem != null)
        {
            sideNavItems.Add(this.ContextualSideNavItem);
        }

        HttpContext.Current.Session.Add("SideNavigationItems", sideNavItems);
    }
开发者ID:OneMissionSociety,项目名称:OMS-Corporate-Website,代码行数:34,代码来源:SiteSideNavigation.ascx.cs

示例5: MessageInfo

 public MessageInfo(int msgId, int userId, int userChat, Utilities.Common.TYPE type)
 {
     MessageID = msgId;
     UserID = userId;
     UserChat = userChat;
     Type = type;
 }
开发者ID:monpham2310,项目名称:PayBay,代码行数:7,代码来源:MessageInfo.cs

示例6: Blocker

 public Blocker(Utilities.Graphics.AnimatedSprite sprite, Shape colShape, bool isAbovePlayer, float maxSpeed = 0.0f, float mass = 1.0f)
     : base(colShape, Single.PositiveInfinity, maxSpeed)
 {
     IsAbovePlayer = isAbovePlayer;
     Sprite = sprite;
     Mass = mass;
 }
开发者ID:heyx3,项目名称:GGJ2014,代码行数:7,代码来源:Blocker.cs

示例7: CurrentObjectives_CollectionChanged

        private void CurrentObjectives_CollectionChanged(System.Collections.ICollection source, Utilities.Collections.NotifyCollectionChangedEventArgs e)
        {
            if (e.Action == NotifyCollectionChangedAction.Add)
            {
                for (int i = 0; i < e.NewItems.Count; i++)
                {
                    if (_ObjectiveImages.Length < i)
                        return;

                    _ObjectiveImages[i].Texture = Food.GetFoodImage(((FoodObjective)e.NewItems[i]).FoodType).texture;
                     objectif = ((FoodObjective)e.NewItems[i]).FoodType;
                    _ObjectiveImages[i].Show();
                    ((FoodObjective)e.NewItems[i]).PropertyChanged += ObjectivesUIManager_PropertyChanged;
                }
            }

            else if (e.Action == NotifyCollectionChangedAction.Remove)
            {
                for (int i = 0; i < e.OldItems.Count; i++)
                {
                    ((FoodObjective)e.NewItems[i]).PropertyChanged -= ObjectivesUIManager_PropertyChanged;
                }
            }
            else if (e.Action == NotifyCollectionChangedAction.Reset)
            {
                for (int i = 0; i < e.OldItems.Count; i++)
                {
                    ((FoodObjective)e.NewItems[i]).PropertyChanged -= ObjectivesUIManager_PropertyChanged;
                }
            }
        }
开发者ID:kewur,项目名称:HungryDude,代码行数:31,代码来源:ObjectivesUIManager.cs

示例8: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     Utilities util = new Utilities();
     string eid = Convert.ToString(Session["eid"]);
     int id = Convert.ToInt32(Request.Form["id"]);
     if (Request.Form["id"] != null)
     {
         if (util.checkUsersPic(id, eid) || (int) Session["lvl"] == 3)
         {
             int PictureID;
             string picname, picdesc;
             picname = Request.Form["picname"];
             picdesc = Request.Form["description"];
             PictureID = Convert.ToInt32(Request.Form["id"]);
             this.UpdatePicture(PictureID, picname, picdesc);
             Response.Redirect("default.aspx?id=" + PictureID);
         }
     }
     else if(!util.checkUsersPic(id, eid))
     {
         Gavan.Global.error = "התמונה איננה שלך.";
     }
     else
     {
         Response.Redirect("default.aspx");
     }
 }
开发者ID:nick2il,项目名称:GavanGallery,代码行数:27,代码来源:edit_act.aspx.cs

示例9: VisitBinaryExpression

        private void VisitBinaryExpression(Utilities.ContinuationOperator continuation, BinaryExpression binExpr, bool neg)
        {
            ExpressionType oper = binExpr.NodeType;

            ExpressionType[] AndOperators = { ExpressionType.And, ExpressionType.AndAlso };

            ExpressionType[] OrOperators = { ExpressionType.Or, ExpressionType.OrElse };

            ExpressionType[] binOperators = AndOperators.Concat(OrOperators).ToArray();

            if (binOperators.Contains(binExpr.NodeType))
            {
                VisitExpression(continuation, binExpr.Left, neg);

                if (binOperators.Contains(binExpr.Left.NodeType) & binOperators.Contains(binExpr.Right.NodeType))
                {
                    if (AndOperators.Contains(binExpr.NodeType))
                        _encodedQuery += "NQ";

                    if (OrOperators.Contains(binExpr.NodeType))
                        _encodedQuery += "^NQ";
                }

                VisitExpression((Utilities.ContinuationOperator)binExpr.NodeType, binExpr.Right, neg);
            }
            else
                VisitSimpleExpression(continuation, binExpr, neg);
        }
开发者ID:beachandbytes,项目名称:LinqToServiceNow,代码行数:28,代码来源:ExpressionVisitor.cs

示例10: VoicemailScriptProcessor

 public VoicemailScriptProcessor(WOSI.CallButler.Data.CallButlerDataset.ExtensionsRow extension, VoicemailService vmService, PBXRegistrarService registrarService, Utilities.PluginManagement.PluginManager pluginManager)
 {
     this.extension = extension;
     this.vmService = vmService;
     this.registrarService = registrarService;
     this.pluginManager = pluginManager;
 }
开发者ID:hostitherepc,项目名称:Fork-1,代码行数:7,代码来源:VoicemailScriptProcessor.cs

示例11: EncoreClient

 public EncoreClient()
 {
     encoreClient = new Utilities();
     encoreInstance = new Instance();
     encoreLogDetail = new LogDetail();
     encoreLang = new Language();
 }
开发者ID:johnernaut,项目名称:SysproUtils,代码行数:7,代码来源:EncoreClient.cs

示例12: size

    public void size(Utilities.Vec2Int size)
    {
        didBackgroundUpdate = true;

        _background.resize(size);
        _size = _background.size();
    }
开发者ID:aburkhalter512,项目名称:EpochEscape,代码行数:7,代码来源:DialogContent.cs

示例13: SetSizeProfile

 private void SetSizeProfile(Utilities.WAPackIaaS.DataContract.VirtualMachine vm)
 {
     vm.CPUCount = VMSizeProfile.CPUCount;
     vm.Memory = VMSizeProfile.Memory;
     vm.DynamicMemoryEnabled = VMSizeProfile.DynamicMemoryEnabled;
     vm.DynamicMemoryMaximumMB = VMSizeProfile.DynamicMemoryMaximumMB;
     vm.DynamicMemoryMinimumMB = VMSizeProfile.DynamicMemoryMinimumMB;
 }
开发者ID:rohmano,项目名称:azure-powershell,代码行数:8,代码来源:SetWAPackVM.cs

示例14: ShowLoginMockDialog

 public void ShowLoginMockDialog(
     Utilities.Callback<ResultContainer> callback,
     string callbackId,
     string permissions)
 {
     var result = MockResults.GetLoginResult(int.Parse(callbackId), permissions, this.ResultExtras);
     callback(new ResultContainer(result));
 }
开发者ID:chico-barnstorm,项目名称:facebook-sdk-for-unity,代码行数:8,代码来源:MockEditor.cs

示例15: createTile

        public static void createTile(QuadNode<Tile> node, Utilities.Vec2Int pos)
        {
            if (_defaultFloorTex == null)
                _defaultFloorTex = Resources.Load<Texture2D>("Textures/Game Environment/Tile");

            Tile tile = new Tile(node, null, pos);
            tile.setFloorTexture(_defaultFloorTex);
        }
开发者ID:aburkhalter512,项目名称:EpochEscape,代码行数:8,代码来源:QuadNodeProcessors.cs


注:本文中的Utilities类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。