• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Utilities类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: ShowLoginMockDialog

 public void ShowLoginMockDialog(
     Utilities.Callback<ResultContainer> callback,
     string callbackId,
     string permsisions)
 {
     var dialog = ComponentFactory.GetComponent<MockLoginDialog>();
     dialog.Callback = callback;
     dialog.CallbackID = callbackId;
 }
开发者ID:Cube219,项目名称:BlockBuster,代码行数:9,代码来源:EditorWrapper.cs


示例17: DeletePicture

 protected void DeletePicture(int pictureID)
 {
     Utilities util = new Utilities();
     string path = util.getFileName(pictureID);
     File.Delete(Server.MapPath(path));
     deleteFromPics(pictureID);
     delteFromRanks(pictureID);
     deleteFromComments(pictureID);
 }
开发者ID:nick2il,项目名称:GavanGallery,代码行数:9,代码来源:delete.aspx.cs


示例18: OnKeyPressed

        // Input handling method
        public void OnKeyPressed(object sender, Utilities.KeyEventArgs e)
        {
            // Pass key event args to the current game state
            currentMenu.HandleInput(e);

            //*//
            if (e.code == ConsoleKey.Escape)
                Console.Title = "Stop being a dick";
            //*//
        }
开发者ID:Khaiy,项目名称:CRPG,代码行数:11,代码来源:Game.cs


示例19: UpdateDb

        public static void UpdateDb(string trackCode, Utilities.Surface surface)
        {
            ParSpeed.DeleteFromDb(trackCode, surface);
            Dictionary<string, List<double>> times = new Dictionary<string, List<double>>();
            foreach (string fullpath in DailyCard.ExistingFiles)
            {
                string filename = Path.GetFileName(fullpath);
                if (filename.Substring(0, trackCode.Length).ToUpper() == trackCode.ToUpper())
                {
                    if (null != NotifyObserverEvent)
                    {
                        NotifyObserverEvent(string.Format("Processing File: {0}", filename));
                    }
                    DailyCard dc = DailyCard.Load(fullpath);
                    foreach (Race race in dc.Races)
                    {
                        if (race.ExistsInDb && surface == race.SurfaceWhereTheRaceWasRun)
                        {
                            RaceClassification rc = race.Classification;

                            if (null != rc && rc.IsValid)
                            {
                                double normalizedSpeed = race.UnadjustedNormalizedSpeedOfTheRace;
                                if (normalizedSpeed > 0.0)
                                {
                                    string key = rc.ToString();
                                    if (!times.ContainsKey(key))
                                    {
                                        times.Add(key, new List<double>());
                                    }
                                    times[key].Add(race.UnadjustedNormalizedSpeedOfTheRace);
                                }
                            }
                        }
                    }
                }
            }

            foreach (KeyValuePair<string, List<double>> pair in times)
            {
                double sum = 0.0, count = 0.0;
                foreach (double d in pair.Value)
                {
                    sum += d;
                    ++count;
                }

                ParSpeed ps = new ParSpeed(pair.Key, sum / count, pair.Value.Count, trackCode,surface);
                if (null != NotifyObserverEvent)
                {
                    NotifyObserverEvent(ps.ToString());
                }
                ps.SaveToDb();
            }
        }
开发者ID:jpazarzis,项目名称:hogar,代码行数:55,代码来源:ParSpeedCalculator.cs


示例20: videoHandler_VideoWatchedEvent

		void videoHandler_VideoWatchedEvent(Utilities.VideoWatchedEventArgs ev)
		{
			if (MainWindow.CurrentMainTabIndex == MainWindow.TAB_MAIN_Playlists)
			{
				PlaylistVM pl = this.DataContext as PlaylistVM;
				if (pl == null) return;

				pl.PopulatePlaylistObjects();
				ShowNextEpisode();
			}
		}
开发者ID:dizzydezz,项目名称:jmm,代码行数:11,代码来源:PlaylistControl.xaml.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Random.Random类代码示例发布时间:2022-05-24
下一篇:
C# Util类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap