- Timestamp:
- 03/21/09 16:28:40 (16 years ago)
- Location:
- trunk/sources/HeuristicLab
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab/MainForm.Designer.cs
r2 r1392 178 178 this.Name = "MainForm"; 179 179 this.Text = "HeuristicLab Starter"; 180 this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); 180 181 this.ResumeLayout(false); 181 182 this.PerformLayout(); -
trunk/sources/HeuristicLab/MainForm.cs
r877 r1392 36 36 37 37 private ListViewItem pluginManagerListViewItem; 38 private bool abortRequested; 38 39 39 40 public MainForm() { 41 abortRequested = false; 40 42 SplashScreen splashScreen = new SplashScreen(1000, "Loading HeuristicLab..."); 41 43 splashScreen.Owner = this; … … 97 99 do { 98 100 try { 99 PluginManager.Manager.Run(app); 101 if(!abortRequested) 102 PluginManager.Manager.Run(app); 100 103 stopped = true; 101 104 } catch(Exception ex) { … … 104 107 Thread.Sleep(5000); // sleep 5 seconds before autorestart 105 108 } 106 } while(! stopped && app.AutoRestart);109 } while(!abortRequested && !stopped && app.AutoRestart); 107 110 }); 108 111 t.SetApartmentState(ApartmentState.STA); // needed for the AdvancedOptimizationFrontent … … 148 151 return sb.ToString(); 149 152 } 153 154 private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { 155 abortRequested = true; 156 } 150 157 } 151 158 }
Note: See TracChangeset
for help on using the changeset viewer.