Changeset 6864
- Timestamp:
- 10/04/11 16:14:02 (13 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/HeuristicLab.Clients.Hive.Administrator-3.3.csproj
r6761 r6864 147 147 <Reference Include="System.Drawing" /> 148 148 <Reference Include="System.Runtime.Serialization" /> 149 <Reference Include="System.ServiceModel" /> 149 150 <Reference Include="System.Windows.Forms" /> 150 151 <Reference Include="System.Windows.Forms.DataVisualization" /> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs
r6761 r6864 23 23 using System.Drawing; 24 24 using System.Linq; 25 using System.ServiceModel.Security; 25 26 using System.Threading; 26 27 using System.Threading.Tasks; … … 67 68 while (!stopProgressTask) { 68 69 int diff = (progressBar.Maximum - progressBar.Minimum) / 10; 69 progressBar.Value = (progressBar.Value + diff) % progressBar.Maximum; 70 71 if (progressBar.InvokeRequired) { 72 progressBar.Invoke(new Action(delegate() { progressBar.Value = (progressBar.Value + diff) % progressBar.Maximum; })); 73 } else { 74 progressBar.Value = (progressBar.Value + diff) % progressBar.Maximum; 75 } 76 70 77 //ok, this is not very clever... 71 78 Thread.Sleep(500); 72 79 } 73 progressBar.Value = progressBar.Minimum; 80 if (progressBar.InvokeRequired) { 81 progressBar.Invoke(new Action(delegate() { progressBar.Value = progressBar.Minimum; })); 82 } else { 83 progressBar.Value = progressBar.Minimum; 84 } 74 85 } 75 86 … … 339 350 } 340 351 341 HiveAdminClient.Instance.Refresh(); 342 Content = HiveAdminClient.Instance.Resources; 352 try { 353 HiveAdminClient.Instance.Refresh(); 354 Content = HiveAdminClient.Instance.Resources; 355 } 356 catch (MessageSecurityException) { 357 MessageBox.Show("A Message Security error has occured. This normally means that your user name or password is wrong.", "HeuristicLab Hive Administrator", MessageBoxButtons.OK, MessageBoxIcon.Error); 358 } 343 359 } 344 360 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.JobManager/3.3/HeuristicLab.Clients.Hive.JobManager-3.3.csproj
r6792 r6864 145 145 <Reference Include="System.Drawing" /> 146 146 <Reference Include="System.Runtime.Serialization" /> 147 <Reference Include="System.ServiceModel" /> 147 148 <Reference Include="System.Windows.Forms" /> 148 149 <Reference Include="System.Windows.Forms.DataVisualization" /> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveJobManagerView.cs
r6792 r6864 22 22 using System; 23 23 using System.Linq; 24 using System.ServiceModel.Security; 24 25 using System.Windows.Forms; 25 26 using HeuristicLab.Collections; … … 70 71 hiveExperimentListView.Content = Content.Jobs; 71 72 if (Content != null) 72 Content.RefreshAsync(new Action<Exception>((Exception ex) => ErrorHandling.ShowErrorDialog(this, "Refresh failed.",ex)));73 Content.RefreshAsync(new Action<Exception>((Exception ex) => HandleServiceException(ex))); 73 74 } 74 75 } … … 101 102 102 103 private void refreshButton_Click(object sender, EventArgs e) { 103 Content.RefreshAsync(new Action<Exception>((Exception ex) => ErrorHandling.ShowErrorDialog(this, "Refresh failed.", ex))); 104 Content.RefreshAsync(new Action<Exception>((Exception ex) => HandleServiceException(ex))); 105 } 106 107 private void HandleServiceException(Exception ex) { 108 if (ex is MessageSecurityException) { 109 MessageBox.Show("A Message Security error has occured. This normally means that your user name or password is wrong.", "HeuristicLab Hive Administrator", MessageBoxButtons.OK, MessageBoxIcon.Error); 110 } else { 111 ErrorHandling.ShowErrorDialog(this, "Refresh failed.", ex); 112 } 104 113 } 105 114
Note: See TracChangeset
for help on using the changeset viewer.