Пример #1
0
 public static void Execute(IList <string> args)
 {
     if (args.Count > 0)
     {
         string      command = args[0];
         ICommandArg cmd     = commandArgs.FirstOrDefault(o => o.Command.ToLower() == command);
         if (cmd != null)
         {
             args.RemoveAt(0); //remove command itself
             cmd.Execute(args);
         }
     }
     else
     {
         App.Window.ShowApp();
     }
 }
Пример #2
0
 public static void Execute(IList <string> args)
 {
     // todo restart command line args?
     if (args.Count > 0 && args[0] != SingleInstance <App> .Restart)
     {
         string      command = args[0];
         ICommandArg cmd     = commandArgs.FirstOrDefault(o => o.Command.ToLower() == command);
         if (cmd != null)
         {
             args.RemoveAt(0); //remove command itself
             cmd.Execute(args);
         }
     }
     else
     {
         App.API.ShowApp();
     }
 }