InitCMD() public method

public InitCMD ( ) : void
return void
Beispiel #1
0
 /// <summary>
 /// Determines which command to run.
 /// </summary>
 private static bool Run(string[] args)
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     sharpTuner = new SharpTuner();
     if (args.Length < 1)
     {
         Application.Run(sharpTuner.mainWindow);
         return(true);
     }
     else
     {
         sharpTuner.InitCMD();
         if (args[0] == "ecumaptool")
         {
             return(EcuMapTool.Run(sharpTuner.AvailableDevices, Utils.ShiftLeftTruncate(args)));
         }
         else if (args[0] == "rommod")
         {
             return(SharpTune.RomMod.RomMod.Run(sharpTuner.AvailableDevices, Utils.ShiftLeftTruncate(args)));
         }
         else if (args[0] == "xmlconvertor")
         {
             ECU      di  = new ECU(sharpTuner, args[1]);
             XMLtoIDC xti = new XMLtoIDC(di);
             //TODO clean up this routine: xti.Run(args);
         }
         else if (args.Length == 2 && args[0] == "help")
         {
             PrintHelp_RomMod(args[1]);
             return(true);
         }
     }
     return(false);
 }
Beispiel #2
0
 /// <summary>
 /// Determines which command to run.
 /// </summary>
 private static bool Run(string[] args)
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     sharpTuner = new SharpTuner();
     if (args.Length < 1)
     {
         Application.Run(sharpTuner.mainWindow);
         return true;
     }
     else
     {
         sharpTuner.InitCMD();
         if (args[0] == "ecumaptool")
         {
             return EcuMapTool.Run(sharpTuner.AvailableDevices, Utils.ShiftLeftTruncate(args));
         }
         else if (args[0] == "rommod")
         {
             return SharpTune.RomMod.RomMod.Run(sharpTuner.AvailableDevices, Utils.ShiftLeftTruncate(args));
         }
         else if (args[0] == "xmlconvertor")
         {
             ECU di = new ECU(sharpTuner, args[1]);
             XMLtoIDC xti = new XMLtoIDC(di);
             //TODO clean up this routine: xti.Run(args);
         }
         else if (args.Length == 2 && args[0] == "help")
         {
             PrintHelp_RomMod(args[1]);
             return true;
         }
     }
     return false;
 }