Changeset 7577 for branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views
- Timestamp:
- 03/07/12 11:16:50 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/DeploymentView.cs
r7441 r7577 36 36 txtDeploymentSlot.Text = Content.DeploymentSlot; 37 37 txtDeploymentStatus.Text = Content.Status; 38 txtInstanceCount.Text = Content.RoleInstanceList.Count.ToString(); 39 if (Content.RoleInstanceList.Count > 0) { 40 txtInstanceSize.Text = Content.RoleInstanceList[0].InstanceSize; 38 if (Content.RoleInstanceList != null) { 39 txtInstanceCount.Text = Content.RoleInstanceList.Count.ToString(); 40 if (Content.RoleInstanceList.Count > 0) { 41 txtInstanceSize.Text = Content.RoleInstanceList[0].InstanceSize; 42 } 43 } else { 44 txtInstanceCount.Text = ""; 45 txtInstanceSize.Text = ""; 41 46 } 47 42 48 43 49 tbChangeCores.Minimum = 1; … … 47 53 lblChanges.Text = SaveChangesString; 48 54 } else { 49 tbChangeCores.Value = Content.RoleInstanceList.Count; 55 if (Content.RoleInstanceList == null) { 56 tbChangeCores.Value = tbChangeCores.Minimum; 57 } else { 58 tbChangeCores.Value = Content.RoleInstanceList.Count; 59 } 50 60 lblChanges.Text = ""; 51 61 } … … 75 85 76 86 private int GetCoresFromInstanceSize(string instanceSize) { 77 HeuristicLab.Clients.Hive.CloudManager.Azure.Constants.InstanceSize size = 78 (HeuristicLab.Clients.Hive.CloudManager.Azure.Constants.InstanceSize)Enum.Parse( 79 typeof(HeuristicLab.Clients.Hive.CloudManager.Azure.Constants.InstanceSize), 80 instanceSize, 81 true); 82 return (int)size; 87 if (instanceSize != string.Empty) { 88 HeuristicLab.Clients.Hive.CloudManager.Azure.Constants.InstanceSize size = 89 (HeuristicLab.Clients.Hive.CloudManager.Azure.Constants.InstanceSize)Enum.Parse( 90 typeof(HeuristicLab.Clients.Hive.CloudManager.Azure.Constants.InstanceSize), 91 instanceSize, 92 true); 93 return (int)size; 94 } else { 95 return 0; 96 } 97 83 98 } 84 99 }
Note: See TracChangeset
for help on using the changeset viewer.