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


C# ServiceProvider.RunOnceAsync方法代码示例

本文整理汇总了C#中ServiceProvider.RunOnceAsync方法的典型用法代码示例。如果您正苦于以下问题:C# ServiceProvider.RunOnceAsync方法的具体用法?C# ServiceProvider.RunOnceAsync怎么用?C# ServiceProvider.RunOnceAsync使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ServiceProvider的用法示例。


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

示例1: HackerWindow

        public HackerWindow()
        {
            Program.HackerWindow = this;
            processP = Program.ProcessProvider;
            serviceP = Program.ServiceProvider;
            networkP = Program.NetworkProvider;

            InitializeComponent();

            // Force the handle to be created
            { var handle = this.Handle; }
            Program.HackerWindowHandle = this.Handle;

            if (OSVersion.HasExtendedTaskbar)
            {
                // We need to call this here or we dont recieve the TaskbarButtonCreated WindowMessage
                Windows7Taskbar.AllowWindowMessagesThroughUipi();
                Windows7Taskbar.AppId = "ProcessHacker";
                Windows7Taskbar.ProcessAppId = "ProcessHacker";

                thumbButtonManager = new ThumbButtonManager(this);
                thumbButtonManager.TaskbarButtonCreated += new EventHandler(thumbButtonManager_TaskbarButtonCreated);
            }

            this.AddEscapeToClose();

            Logging.Logged += this.QueueMessage;
            Settings.Refresh();
            this.LoadWindowSettings();
            this.LoadOtherSettings();
            this.LoadControls();
            this.LoadNotificationIcons();

            Program.AppInstance = new ApplicationInstance();

            Program.AppInstance.MainMenu = new MainMenuManager(mainMenu.MenuItems);
            Program.AppInstance.MainMenu.Hacker = new MenuItemManager(hackerMenuItem.MenuItems);
            Program.AppInstance.MainMenu.View = new MenuItemManager(viewMenuItem.MenuItems);
            Program.AppInstance.MainMenu.Tools = new MenuItemManager(toolsMenuItem.MenuItems);
            Program.AppInstance.MainMenu.Help = new MenuItemManager(helpMenu.MenuItems);

            this.LoadPlugins();

            if ((!Properties.Settings.Default.StartHidden && !Program.StartHidden) ||
                Program.StartVisible)
            {
                this.Visible = true;
            }

            if (tabControl.SelectedTab == tabProcesses)
                treeProcesses.Tree.Select();

            this.LoadOther();
            this.LoadStructs();

            vistaMenu.DelaySetImageCalls = false;
            vistaMenu.PerformPendingSetImageCalls();
            serviceP.RunOnceAsync();
            serviceP.Enabled = true;

            _dontCalculate = false;
        }
开发者ID:andyvand,项目名称:ProcessHacker,代码行数:62,代码来源:HackerWindow.cs

示例2: HackerWindow

 public HackerWindow()
 {
     Program.HackerWindow = this;
     processP = Program.ProcessProvider;
     serviceP = Program.ServiceProvider;
     networkP = Program.NetworkProvider;
     InitializeComponent();
     { var handle = this.Handle; }
     Program.HackerWindowHandle = this.Handle;
     if (OSVersion.HasExtendedTaskbar)
     {
         Windows7Taskbar.AllowWindowMessagesThroughUipi();
         Windows7Taskbar.AppId = "ProcessHacker";
         Windows7Taskbar.ProcessAppId = "ProcessHacker";
         thumbButtonManager = new ThumbButtonManager(this);
         thumbButtonManager.TaskbarButtonCreated += new EventHandler(thumbButtonManager_TaskbarButtonCreated);
     }
     this.AddEscapeToClose();
     Logging.Logged += this.QueueMessage;
     Settings.Refresh();
     this.LoadWindowSettings();
     this.LoadOtherSettings();
     this.LoadControls();
     this.LoadNotificationIcons();
     if ((!Properties.Settings.Default.StartHidden && !Program.StartHidden) ||
         Program.StartVisible)
     {
         this.Visible = true;
     }
     if (tabControl.SelectedTab == tabProcesses)
         treeProcesses.Tree.Select();
     this.LoadOther();
     this.LoadStructs();
     vistaMenu.DelaySetImageCalls = false;
     vistaMenu.PerformPendingSetImageCalls();
     serviceP.RunOnceAsync();
     serviceP.Enabled = true;
     _dontCalculate = false;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:39,代码来源:HackerWindow.cs


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