示例#1
0
 static async void AsyncExec(GUIOPtion option)
 {
     try
     {
         await new AddTask()
         {
             option = option
         }.Exec();
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
     }
     TaskSupport.Finish();
 }
示例#2
0
 static void Main(string[] args)
 {
     try
     {
         TaskSupport.SetSynchronizationContext();
         AsyncExec(new GUIOPtion(args));
         TaskSupport.EnterMessageLoop();
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
         GUIOPtion.PrintHelp();
         return;
     }
 }