- Timestamp:
- 01/02/12 15:32:40 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs
r7250 r7256 51 51 public ResourcesView() { 52 52 InitializeComponent(); 53 treeSlaveGroup.ImageList.Images.Add(H iveImageLibrary.Slave);54 treeSlaveGroup.ImageList.Images.Add(H iveImageLibrary.SlaveGroup);53 treeSlaveGroup.ImageList.Images.Add(HeuristicLab.Common.Resources.VSImageLibrary.MonitorLarge); 54 treeSlaveGroup.ImageList.Images.Add(HeuristicLab.Common.Resources.VSImageLibrary.NetworkCenterLarge); 55 55 56 56 HiveAdminClient.Instance.Refreshing += new EventHandler(Instance_Refreshing); … … 346 346 347 347 void ResetView() { 348 treeSlaveGroup.Nodes.Clear(); 349 350 if (slaveView.Content != null && slaveView.Content is SlaveGroup) { 351 slaveView.Content.PropertyChanged -= new System.ComponentModel.PropertyChangedEventHandler(SlaveViewContent_PropertyChanged); 352 } 353 slaveView.Content = null; 354 if (scheduleView.Content != null) { 355 scheduleView.Content.Clear(); 356 } 357 HiveAdminClient.Instance.ResetDowntime(); 348 if (this.InvokeRequired) { 349 Invoke(new Action(ResetView)); 350 } else { 351 treeSlaveGroup.Nodes.Clear(); 352 353 if (slaveView.Content != null && slaveView.Content is SlaveGroup) { 354 slaveView.Content.PropertyChanged -= new System.ComponentModel.PropertyChangedEventHandler(SlaveViewContent_PropertyChanged); 355 } 356 slaveView.Content = null; 357 if (scheduleView.Content != null) { 358 scheduleView.Content.Clear(); 359 } 360 HiveAdminClient.Instance.ResetDowntime(); 361 } 358 362 } 359 363 360 364 private void UpdateResources() { 361 if (this.InvokeRequired) { 362 this.Invoke(new Action(ResetView)); 363 } else { 364 ResetView(); 365 } 365 ResetView(); 366 366 367 367 try { … … 370 370 } 371 371 catch (MessageSecurityException) { 372 ShowMessageSecurityException(); 373 } 374 catch (AnonymousUserException) { 375 ShowHiveInformationDialog(); 376 } 377 } 378 379 private void ShowMessageSecurityException() { 380 if (this.InvokeRequired) { 381 Invoke(new Action(ShowMessageSecurityException)); 382 } else { 372 383 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); 373 384 } 374 catch (AnonymousUserException) { 375 HiveInformationDialog dialog = new HiveInformationDialog(); 376 dialog.ShowDialog(this); 385 } 386 387 private void ShowHiveInformationDialog() { 388 if (this.InvokeRequired) { 389 Invoke(new Action(ShowHiveInformationDialog)); 390 } else { 391 using (HiveInformationDialog dialog = new HiveInformationDialog()) { 392 dialog.ShowDialog(this); 393 } 377 394 } 378 395 }
Note: See TracChangeset
for help on using the changeset viewer.