Exemple #1
0
 public static string Start(ITCTask task)
 {
     try
     {
         primaryTimer.Stop();
         currentTask = task;
         player      = new ITCPlayer();
         player.SetUp(task);
         player.MessageComing += player_MessageComing;
         player.Start();
         return("task status: " + task.output);
     }
     catch (Exception ex)
     {
         primaryTimer.Start();
         return("operation failed: " + ex.ToString());
     }
 }
Exemple #2
0
 public static string Start(string taskName)
 {
     try
     {
         foreach (ITCTask task in AllTasks)
         {
             if (task.taskName == taskName)
             {
                 primaryTimer.Stop();
                 currentTask = task;
                 player      = new ITCPlayer();
                 player.SetUp(task);
                 player.MessageComing += player_MessageComing;
                 player.Start();
                 return("task status: " + task.output);
             }
         }
         return("operation failed: task not found");
     }
     catch (Exception ex)
     {
         return("operation failed: " + ex.ToString());
     }
 }