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


C# Executor.QueueRestartTasks方法代码示例

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


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

示例1: OnGUIInitInstance

 private static bool OnGUIInitInstance(object sender)
 {
     GUIProgram program = (GUIProgram)sender;
        eraserClient = new RemoteExecutorServer();
        EraserSettings settings = EraserSettings.Get();
        System.Threading.Thread.CurrentThread.CurrentUICulture =
     new CultureInfo(settings.Language);
        Application.SafeTopLevelCaptionFormat = S._("Eraser");
        SettingsCompatibility.Execute();
        try
        {
     if (System.IO.File.Exists(TaskListPath))
     {
      using (FileStream stream = new FileStream(TaskListPath, FileMode.Open,
       FileAccess.Read, FileShare.Read))
      {
       eraserClient.Tasks.LoadFromStream(stream);
      }
     }
        }
        catch (SerializationException e)
        {
     System.IO.File.Delete(TaskListPath);
     MessageBox.Show(S._("Could not load task list. All task entries have " +
      "been lost. The error returned was: {0}", e.Message), S._("Eraser"),
      MessageBoxButtons.OK, MessageBoxIcon.Error,
      MessageBoxDefaultButton.Button1,
      S.IsRightToLeft(null) ? MessageBoxOptions.RtlReading : 0);
        }
        program.MainForm = new MainForm();
        program.MainForm.CreateControl();
        bool showMainForm = true;
        foreach (string param in program.CommandLine)
        {
     switch (param)
     {
      case "--atRestart":
       eraserClient.QueueRestartTasks();
       goto case "--quiet";
      case "--quiet":
       showMainForm = false;
       break;
     }
        }
        eraserClient.Run();
        return showMainForm;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:47,代码来源:Program.cs

示例2: OnGUIInitInstance

        private static void OnGUIInitInstance(object sender, InitInstanceEventArgs e)
        {
            GuiProgram program = (GuiProgram)sender;
               eraserClient = new RemoteExecutorServer();

               EraserSettings settings = EraserSettings.Get();
               Thread.CurrentThread.CurrentUICulture = new CultureInfo(settings.Language);
               Application.SafeTopLevelCaptionFormat = S._("Eraser");

               SettingsCompatibility.Execute();
               try
               {
            if (File.Exists(TaskListPath))
            {
             using (FileStream stream = new FileStream(TaskListPath, FileMode.Open,
              FileAccess.Read, FileShare.Read))
             {
              eraserClient.Tasks.LoadFromStream(stream);
             }
            }
               }
               catch (SerializationException ex)
               {
            System.IO.File.Delete(TaskListPath);
            MessageBox.Show(S._("Could not load task list. All task entries have " +
             "been lost. The error returned was: {0}", ex.Message), S._("Eraser"),
             MessageBoxButtons.OK, MessageBoxIcon.Error,
             MessageBoxDefaultButton.Button1,
             S.IsRightToLeft(null) ? MessageBoxOptions.RtlReading : 0);
               }

               program.MainForm = new MainForm();

               GuiArguments arguments = new GuiArguments();
               Args.Parse(program.CommandLine, CommandLinePrefixes, CommandLineSeparators, arguments);
               e.ShowMainForm = !arguments.AtRestart && !arguments.Quiet;

               if (arguments.AtRestart)
            eraserClient.QueueRestartTasks();

               eraserClient.Run();
        }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:42,代码来源:Program.cs


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