Beispiel #1
0
 static void Main(string[] args)
 {
     cmdLineHelper = new CmdlineHelper(args);
     // don't bother calling main form if a command-line error or a validation occured
     if (cmdLineHelper.CmdErrorCode == 0)
     {
         Application.EnableVisualStyles();
         Application.SetCompatibleTextRenderingDefault(false);
         Application.Run(new Main_Frm());
     }
     // return error code to environment if detected; this allows testing in batch files for errorlevel
     if (cmdLineHelper.CmdErrorCode != 0)
     {
         Environment.ExitCode = cmdLineHelper.CmdErrorCode;
     }
 }
Beispiel #2
0
 private void ShowJobCmd()
 {
     if (OneJobIsSelected())
     {
         int ndx   = JobsLV.SelectedIndices[0];
         int jobID = settings.Jobs[ndx].ID;
         var parms = new CmdLineParmRet {
             JobID         = jobID,
             DebugMode     = DebugModeCB.Checked,
             ExportConfig  = BackupSettingsCB.Checked,
             RunInSimMode  = SimModeCB.Checked,
             ShowDebugFile = AutoShowDebugCB.Checked,
             ShowErrFile   = AutoShowErrsCB.Checked,
             ShowLogFile   = AutoShowLogCB.Checked
         };
         string cmd = "\"" + Application.ExecutablePath + "\" " + CmdlineHelper.ConstructCommandLineString(parms, @"/");
         Clipboard.SetText(cmd, TextDataFormat.Text);
         ShowInfoMsg("The following command-line has been copied to the system clipboard:\r\n" + cmd);
     }
 }