コード例 #1
0
        public Tasker.Conclusion LoadGames(Tasker tasker, Object syncObject = null)
        {
            tasker.SetProgress(-1, -1, Tasker.State.Running, Resources.LoadingGames);
            tasker.SetStatusImage(Resources.sign_down);
            tasker.SetTitle(Resources.LoadingGames);

            tasker.SyncObject = new LoadGamesSyncObject();
            tasker.AddTasks(
                CreateListViewGroups,
                this.reloadFromFiles ?
                (Tasker.TaskFunc)LoadGamesFromFiles :
                (Tasker.TaskFunc)LoadGamesFromList,
                AssignGroupsToGames,
                AssignListViewGroups,
                UpdateListView);

            return(Tasker.Conclusion.Success);
        }
コード例 #2
0
 public Conclusion BootBackup2(Tasker tasker, object syncObject)
 {
     tasker.SetStatus(Resources.Membooting);
     if (hakchi.Shell.Execute("hakchi haveBackup2") == 0)
     {
         try
         {
             hakchi.Shell.Execute("hakchi bootBackup2");
         }
         catch
         {
             // no-op
         }
     }
     else
     {
         tasker.AddTasks(
             GetStockKernel,
             MembootKexec);
     }
     return(Conclusion.Success);
 }
コード例 #3
0
        public static Conclusion QuickStart(Form hostForm, params TaskFunc[] funcs)
        {
            var tasker = new Tasker(hostForm);

            return(tasker.AddTasks(funcs).Start());
        }