private void btnExecute_Click(object sender, EventArgs e) { if (lsbStats.Items.Count < 1) { MessageBox.Show("You must have at least one batch file selected"); } this.Visible = false; for (int i = 0; i < lsbStats.Items.Count; i++) { esriUtil.batchCalculations btc = new esriUtil.batchCalculations(); string fl = lsbStats.Items[i].ToString(); btc.BatchPath = fl; btc.loadBatchFile(); btc.runBatch(); //System.Diagnostics.Process bproc = new System.Diagnostics.Process(); //System.Diagnostics.ProcessStartInfo bpSInfo = bproc.StartInfo; //bpSInfo.Arguments = fl; //bpSInfo.FileName = "RMRSBatchProcess.exe"; //bproc.Start(); //System.Reflection.Assembly.GetExecutingAssembly().Location } this.Close(); }
static void Main(string[] args) { //ESRI License Initializer generated code. m_AOLicenseInitializer.InitializeApplication(new esriLicenseProductCode[]{ esriLicenseProductCode.esriLicenseProductCodeBasic, esriLicenseProductCode.esriLicenseProductCodeStandard, esriLicenseProductCode.esriLicenseProductCodeAdvanced},new esriLicenseExtensionCode[] { }); //ESRI License Initializer generated code. //Do not make any call to ArcObjects after ShutDownApplication() if (args.Length < 1) { SelectBathJobs sbj = new SelectBathJobs(); System.Windows.Forms.Application.Run(sbj); } else { foreach (string s in args) { esriUtil.batchCalculations btc = new esriUtil.batchCalculations(); btc.BatchPath = s; btc.loadBatchFile(); btc.runBatch(); } } m_AOLicenseInitializer.ShutdownApplication(); Environment.Exit(0); }
static void Main(string[] args) { //ESRI License Initializer generated code. m_AOLicenseInitializer.InitializeApplication(new esriLicenseProductCode[] { esriLicenseProductCode.esriLicenseProductCodeBasic, esriLicenseProductCode.esriLicenseProductCodeStandard, esriLicenseProductCode.esriLicenseProductCodeAdvanced }, new esriLicenseExtensionCode[] { }); //ESRI License Initializer generated code. //Do not make any call to ArcObjects after ShutDownApplication() if (args.Length < 1) { SelectBathJobs sbj = new SelectBathJobs(); System.Windows.Forms.Application.Run(sbj); } else { foreach (string s in args) { esriUtil.batchCalculations btc = new esriUtil.batchCalculations(); btc.BatchPath = s; btc.loadBatchFile(); btc.runBatch(); } } m_AOLicenseInitializer.ShutdownApplication(); Environment.Exit(0); }