Changeset 7270 for branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs
- Timestamp:
- 01/04/12 16:45:02 (12 years ago)
- Location:
- branches/HeuristicLab.Hive.Azure
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive.Azure
- Property svn:mergeinfo changed
/trunk/sources merged: 7195-7201,7209,7214,7216-7230,7233-7239,7241,7243-7252,7254,7256-7261,7265-7266
- Property svn:mergeinfo changed
-
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Administrator/3.3
- Property svn:ignore
-
old new 1 1 Plugin.cs 2 2 obj 3 *.vs10x
-
- Property svn:ignore
-
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs
r7215 r7270 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 1Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 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); … … 170 170 protected override void SetEnabledStateOfControls() { 171 171 base.SetEnabledStateOfControls(); 172 if (Content == null) { 173 btnAddGroup.Enabled = false; 174 btnRemoveGroup.Enabled = false; 175 btnSave.Enabled = false; 176 } else { 177 btnAddGroup.Enabled = true; 178 btnRemoveGroup.Enabled = true; 179 btnSave.Enabled = true; 180 } 172 181 } 173 182 … … 337 346 338 347 void ResetView() { 339 treeSlaveGroup.Nodes.Clear(); 340 341 if (slaveView.Content != null && slaveView.Content is SlaveGroup) { 342 slaveView.Content.PropertyChanged -= new System.ComponentModel.PropertyChangedEventHandler(SlaveViewContent_PropertyChanged); 343 } 344 slaveView.Content = null; 345 if (scheduleView.Content != null) { 346 scheduleView.Content.Clear(); 347 } 348 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 } 349 362 } 350 363 351 364 private void UpdateResources() { 352 if (this.InvokeRequired) { 353 this.Invoke(new Action(ResetView)); 354 } else { 355 ResetView(); 356 } 365 ResetView(); 357 366 358 367 try { … … 361 370 } 362 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 { 363 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); 384 } 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 } 364 394 } 365 395 }
Note: See TracChangeset
for help on using the changeset viewer.