Changeset 1394
- Timestamp:
- 03/21/09 16:41:32 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.PluginInfrastructure.GUI/ManagerForm.cs
r918 r1394 48 48 InitializeComponent(); 49 49 InitializePlugins(); 50 Cursor = Cursors.Arrow; 50 51 } 51 52 -
trunk/sources/HeuristicLab/MainForm.cs
r1392 r1394 69 69 applicationsListView.Items.Add(pluginManagerListViewItem); 70 70 71 foreach (ApplicationInfo info in PluginManager.Manager.InstalledApplications) {71 foreach (ApplicationInfo info in PluginManager.Manager.InstalledApplications) { 72 72 ListViewItem item = new ListViewItem(info.Name, 0); 73 73 item.Tag = info; … … 81 81 82 82 private void applicationsListView_ItemActivate(object sender, EventArgs e) { 83 if (applicationsListView.SelectedItems.Count > 0) {83 if (applicationsListView.SelectedItems.Count > 0) { 84 84 ListViewItem selected = applicationsListView.SelectedItems[0]; 85 if(selected == pluginManagerListViewItem) { 86 ManagerForm form = new ManagerForm(); 87 this.Visible = false; 88 form.ShowDialog(this); 89 RefreshApplicationsList(); 90 this.Visible = true; 85 if (selected == pluginManagerListViewItem) { 86 try { 87 Cursor = Cursors.AppStarting; 88 ManagerForm form = new ManagerForm(); 89 this.Visible = false; 90 form.ShowDialog(this); 91 RefreshApplicationsList(); 92 this.Visible = true; 93 } 94 finally { 95 Cursor = Cursors.Arrow; 96 } 91 97 } else { 92 98 ApplicationInfo app = (ApplicationInfo)applicationsListView.SelectedItems[0].Tag; … … 99 105 do { 100 106 try { 101 if (!abortRequested)107 if (!abortRequested) 102 108 PluginManager.Manager.Run(app); 103 109 stopped = true; 104 } catch(Exception ex) { 110 } 111 catch (Exception ex) { 105 112 stopped = false; 106 113 ThreadPool.QueueUserWorkItem(delegate(object exception) { ShowErrorMessageBox((Exception)exception); }, ex); 107 114 Thread.Sleep(5000); // sleep 5 seconds before autorestart 108 115 } 109 } while (!abortRequested && !stopped && app.AutoRestart);116 } while (!abortRequested && !stopped && app.AutoRestart); 110 117 }); 111 118 t.SetApartmentState(ApartmentState.STA); // needed for the AdvancedOptimizationFrontent … … 116 123 117 124 private void applicationsListBox_SelectedIndexChanged(object sender, ListViewItemSelectionChangedEventArgs e) { 118 if (e.IsSelected) {125 if (e.IsSelected) { 119 126 startButton.Enabled = true; 120 127 } else { … … 145 152 sb.Append("Sorry, but something went wrong!\n\n" + ex.Message + "\n\n" + ex.StackTrace); 146 153 147 while (ex.InnerException != null) {154 while (ex.InnerException != null) { 148 155 ex = ex.InnerException; 149 156 sb.Append("\n\n-----\n\n" + ex.Message + "\n\n" + ex.StackTrace);
Note: See TracChangeset
for help on using the changeset viewer.