Changeset 7389
- Timestamp:
- 01/21/12 14:34:45 (13 years ago)
- Location:
- branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/CloudResourcesView.Designer.cs
r7387 r7389 23 23 this.treeCloudResources = new System.Windows.Forms.TreeView(); 24 24 this.imageListCloudResources = new System.Windows.Forms.ImageList(this.components); 25 this.subscriptionView = new HeuristicLab.Clients.Hive.CloudManager.Views.SubscriptionView(); 25 26 ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); 26 27 this.splitContainer1.Panel1.SuspendLayout(); 28 this.splitContainer1.Panel2.SuspendLayout(); 27 29 this.splitContainer1.SuspendLayout(); 28 30 this.SuspendLayout(); … … 42 44 this.splitContainer1.Panel1.Controls.Add(this.btnAddSubscription); 43 45 this.splitContainer1.Panel1.Controls.Add(this.treeCloudResources); 44 this.splitContainer1.Size = new System.Drawing.Size(670, 497); 45 this.splitContainer1.SplitterDistance = 249; 46 // 47 // splitContainer1.Panel2 48 // 49 this.splitContainer1.Panel2.Controls.Add(this.subscriptionView); 50 this.splitContainer1.Size = new System.Drawing.Size(804, 497); 51 this.splitContainer1.SplitterDistance = 275; 46 52 this.splitContainer1.TabIndex = 0; 47 53 // … … 95 101 // treeCloudResources 96 102 // 97 this.treeCloudResources.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 98 | System.Windows.Forms.AnchorStyles.Left) 103 this.treeCloudResources.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 104 | System.Windows.Forms.AnchorStyles.Left) 99 105 | System.Windows.Forms.AnchorStyles.Right))); 100 106 this.treeCloudResources.ImageIndex = 0; … … 103 109 this.treeCloudResources.Name = "treeCloudResources"; 104 110 this.treeCloudResources.SelectedImageIndex = 0; 105 this.treeCloudResources.Size = new System.Drawing.Size(2 43, 460);111 this.treeCloudResources.Size = new System.Drawing.Size(269, 460); 106 112 this.treeCloudResources.TabIndex = 0; 113 this.treeCloudResources.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeCloudResources_NodeMouseClick); 107 114 // 108 115 // imageListCloudResources … … 112 119 this.imageListCloudResources.TransparentColor = System.Drawing.Color.Transparent; 113 120 // 121 // subscriptionView 122 // 123 this.subscriptionView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 124 | System.Windows.Forms.AnchorStyles.Right))); 125 this.subscriptionView.Caption = "SubscriptionView"; 126 this.subscriptionView.Content = null; 127 this.subscriptionView.Location = new System.Drawing.Point(6, 34); 128 this.subscriptionView.Name = "subscriptionView"; 129 this.subscriptionView.ReadOnly = false; 130 this.subscriptionView.Size = new System.Drawing.Size(516, 207); 131 this.subscriptionView.TabIndex = 0; 132 // 114 133 // CloudResourcesView 115 134 // … … 118 137 this.Controls.Add(this.splitContainer1); 119 138 this.Name = "CloudResourcesView"; 120 this.Size = new System.Drawing.Size( 670, 497);139 this.Size = new System.Drawing.Size(804, 497); 121 140 this.splitContainer1.Panel1.ResumeLayout(false); 122 141 this.splitContainer1.Panel1.PerformLayout(); 142 this.splitContainer1.Panel2.ResumeLayout(false); 123 143 ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); 124 144 this.splitContainer1.ResumeLayout(false); … … 137 157 private System.Windows.Forms.Label lblRefresh; 138 158 private System.Windows.Forms.ImageList imageListCloudResources; 159 private SubscriptionView subscriptionView; 139 160 } 140 161 } -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/CloudResourcesView.cs
r7387 r7389 4 4 using System.Windows.Forms; 5 5 using HeuristicLab.Clients.Hive.CloudManager.Model; 6 using HeuristicLab.Common; 6 7 using HeuristicLab.Core; 7 8 using HeuristicLab.Core.Views; … … 98 99 SetEnabledStateOfControls(); 99 100 if (Content == null) { 100 //slaveView.Content = null;101 subscriptionView.Content = null; 101 102 treeCloudResources.Nodes.Clear(); 102 103 } else { … … 194 195 195 196 private void btnAddSlaveService_Click(object sender, EventArgs e) { 196 using (var form = new AddAzureServiceDialog(Content)) { 197 // When refreshing subscriptions in the dialog, 198 // discoverservices and safetoconfig properties are always set to false 199 // -> work on deep copy 200 Cloner cloner = new Cloner(); 201 IItemList<Subscription> subscriptions = cloner.Clone(Content); 202 using (var form = new AddAzureServiceDialog(subscriptions)) { 197 203 form.ShowDialog(); 204 205 } 206 } 207 208 private void treeCloudResources_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { 209 if (e.Node.Tag is Subscription) { 210 subscriptionView.Visible = true; 211 subscriptionView.Content = (Subscription)e.Node.Tag; 212 } else { 213 subscriptionView.Visible = false; 198 214 199 215 } -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/SubscriptionView.Designer.cs
r7281 r7389 33 33 this.cbDiscoverServices = new System.Windows.Forms.CheckBox(); 34 34 this.gbQuota = new System.Windows.Forms.GroupBox(); 35 this.lblQuotaHostedServices = new System.Windows.Forms.Label(); 36 this.label6 = new System.Windows.Forms.Label(); 37 this.lblQuotaCores = new System.Windows.Forms.Label(); 35 38 this.label5 = new System.Windows.Forms.Label(); 36 this.lblQuotaCores = new System.Windows.Forms.Label(); 37 this.label6 = new System.Windows.Forms.Label(); 38 this.lblQuotaHostedServices = new System.Windows.Forms.Label(); 39 this.label7 = new System.Windows.Forms.Label(); 40 this.txtSubscriptionName = new System.Windows.Forms.TextBox(); 39 41 this.gbQuota.SuspendLayout(); 40 42 this.SuspendLayout(); … … 55 57 this.txtSubscriptionId.Location = new System.Drawing.Point(122, 9); 56 58 this.txtSubscriptionId.Name = "txtSubscriptionId"; 57 this.txtSubscriptionId.Size = new System.Drawing.Size(396, 20); 59 this.txtSubscriptionId.ReadOnly = true; 60 this.txtSubscriptionId.Size = new System.Drawing.Size(405, 20); 58 61 this.txtSubscriptionId.TabIndex = 10; 59 62 // … … 61 64 // 62 65 this.label3.AutoSize = true; 63 this.label3.Location = new System.Drawing.Point(3, 43);66 this.label3.Location = new System.Drawing.Point(3, 64); 64 67 this.label3.Name = "label3"; 65 68 this.label3.Size = new System.Drawing.Size(113, 13); … … 71 74 this.txtCertThumbprint.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 72 75 | System.Windows.Forms.AnchorStyles.Right))); 73 this.txtCertThumbprint.Location = new System.Drawing.Point(122, 40);76 this.txtCertThumbprint.Location = new System.Drawing.Point(122, 61); 74 77 this.txtCertThumbprint.Name = "txtCertThumbprint"; 75 this.txtCertThumbprint.Size = new System.Drawing.Size(396, 20); 78 this.txtCertThumbprint.ReadOnly = true; 79 this.txtCertThumbprint.Size = new System.Drawing.Size(405, 20); 76 80 this.txtCertThumbprint.TabIndex = 17; 77 81 // … … 79 83 // 80 84 this.label2.AutoSize = true; 81 this.label2.Location = new System.Drawing.Point( 4, 141);85 this.label2.Location = new System.Drawing.Point(3, 180); 82 86 this.label2.Name = "label2"; 83 87 this.label2.Size = new System.Drawing.Size(96, 13); … … 88 92 // 89 93 this.cbSaveSubscription.AutoSize = true; 90 this.cbSaveSubscription.Location = new System.Drawing.Point(12 3, 141);94 this.cbSaveSubscription.Location = new System.Drawing.Point(122, 179); 91 95 this.cbSaveSubscription.Name = "cbSaveSubscription"; 92 96 this.cbSaveSubscription.Size = new System.Drawing.Size(15, 14); 93 97 this.cbSaveSubscription.TabIndex = 19; 94 98 this.cbSaveSubscription.UseVisualStyleBackColor = true; 99 this.cbSaveSubscription.CheckedChanged += new System.EventHandler(this.cbSaveSubscription_CheckedChanged); 95 100 // 96 101 // label4 97 102 // 98 103 this.label4.AutoSize = true; 99 this.label4.Location = new System.Drawing.Point( 4, 166);104 this.label4.Location = new System.Drawing.Point(3, 160); 100 105 this.label4.Name = "label4"; 101 106 this.label4.Size = new System.Drawing.Size(96, 13); … … 106 111 // 107 112 this.cbDiscoverServices.AutoSize = true; 108 this.cbDiscoverServices.Location = new System.Drawing.Point(12 3, 166);113 this.cbDiscoverServices.Location = new System.Drawing.Point(122, 159); 109 114 this.cbDiscoverServices.Name = "cbDiscoverServices"; 110 115 this.cbDiscoverServices.Size = new System.Drawing.Size(15, 14); 111 116 this.cbDiscoverServices.TabIndex = 21; 112 117 this.cbDiscoverServices.UseVisualStyleBackColor = true; 118 this.cbDiscoverServices.CheckedChanged += new System.EventHandler(this.cbDiscoverServices_CheckedChanged); 113 119 // 114 120 // gbQuota … … 120 126 this.gbQuota.Controls.Add(this.lblQuotaCores); 121 127 this.gbQuota.Controls.Add(this.label5); 122 this.gbQuota.Location = new System.Drawing.Point(6, 73);128 this.gbQuota.Location = new System.Drawing.Point(6, 87); 123 129 this.gbQuota.Name = "gbQuota"; 124 this.gbQuota.Size = new System.Drawing.Size(5 12, 65);130 this.gbQuota.Size = new System.Drawing.Size(521, 65); 125 131 this.gbQuota.TabIndex = 22; 126 132 this.gbQuota.TabStop = false; 127 133 this.gbQuota.Text = "Quota"; 134 // 135 // lblQuotaHostedServices 136 // 137 this.lblQuotaHostedServices.AutoSize = true; 138 this.lblQuotaHostedServices.Location = new System.Drawing.Point(113, 39); 139 this.lblQuotaHostedServices.Name = "lblQuotaHostedServices"; 140 this.lblQuotaHostedServices.Size = new System.Drawing.Size(30, 13); 141 this.lblQuotaHostedServices.TabIndex = 26; 142 this.lblQuotaHostedServices.Text = "0 / 3"; 143 // 144 // label6 145 // 146 this.label6.AutoSize = true; 147 this.label6.Location = new System.Drawing.Point(6, 39); 148 this.label6.Name = "label6"; 149 this.label6.Size = new System.Drawing.Size(88, 13); 150 this.label6.TabIndex = 25; 151 this.label6.Text = "Hosted Services:"; 152 // 153 // lblQuotaCores 154 // 155 this.lblQuotaCores.AutoSize = true; 156 this.lblQuotaCores.Location = new System.Drawing.Point(113, 16); 157 this.lblQuotaCores.Name = "lblQuotaCores"; 158 this.lblQuotaCores.Size = new System.Drawing.Size(30, 13); 159 this.lblQuotaCores.TabIndex = 24; 160 this.lblQuotaCores.Text = "0 / 3"; 128 161 // 129 162 // label5 … … 136 169 this.label5.Text = "Cores:"; 137 170 // 138 // lblQuotaCores 139 // 140 this.lblQuotaCores.AutoSize = true; 141 this.lblQuotaCores.Location = new System.Drawing.Point(113, 16); 142 this.lblQuotaCores.Name = "lblQuotaCores"; 143 this.lblQuotaCores.Size = new System.Drawing.Size(30, 13); 144 this.lblQuotaCores.TabIndex = 24; 145 this.lblQuotaCores.Text = "0 / 3"; 146 // 147 // label6 148 // 149 this.label6.AutoSize = true; 150 this.label6.Location = new System.Drawing.Point(6, 39); 151 this.label6.Name = "label6"; 152 this.label6.Size = new System.Drawing.Size(88, 13); 153 this.label6.TabIndex = 25; 154 this.label6.Text = "Hosted Services:"; 155 // 156 // lblQuotaHostedServices 157 // 158 this.lblQuotaHostedServices.AutoSize = true; 159 this.lblQuotaHostedServices.Location = new System.Drawing.Point(113, 39); 160 this.lblQuotaHostedServices.Name = "lblQuotaHostedServices"; 161 this.lblQuotaHostedServices.Size = new System.Drawing.Size(30, 13); 162 this.lblQuotaHostedServices.TabIndex = 26; 163 this.lblQuotaHostedServices.Text = "0 / 3"; 171 // label7 172 // 173 this.label7.AutoSize = true; 174 this.label7.Location = new System.Drawing.Point(3, 38); 175 this.label7.Name = "label7"; 176 this.label7.Size = new System.Drawing.Size(99, 13); 177 this.label7.TabIndex = 23; 178 this.label7.Text = "Subscription Name:"; 179 // 180 // txtSubscriptionName 181 // 182 this.txtSubscriptionName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 183 | System.Windows.Forms.AnchorStyles.Right))); 184 this.txtSubscriptionName.Location = new System.Drawing.Point(122, 35); 185 this.txtSubscriptionName.Name = "txtSubscriptionName"; 186 this.txtSubscriptionName.ReadOnly = true; 187 this.txtSubscriptionName.Size = new System.Drawing.Size(405, 20); 188 this.txtSubscriptionName.TabIndex = 24; 164 189 // 165 190 // SubscriptionView … … 167 192 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 168 193 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 194 this.Controls.Add(this.txtSubscriptionName); 195 this.Controls.Add(this.label7); 169 196 this.Controls.Add(this.gbQuota); 170 197 this.Controls.Add(this.cbDiscoverServices); … … 177 204 this.Controls.Add(this.label1); 178 205 this.Name = "SubscriptionView"; 179 this.Size = new System.Drawing.Size(5 21, 190);206 this.Size = new System.Drawing.Size(530, 207); 180 207 this.gbQuota.ResumeLayout(false); 181 208 this.gbQuota.PerformLayout(); … … 200 227 private System.Windows.Forms.Label lblQuotaCores; 201 228 private System.Windows.Forms.Label label5; 229 private System.Windows.Forms.Label label7; 230 private System.Windows.Forms.TextBox txtSubscriptionName; 202 231 } 203 232 } -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/SubscriptionView.cs
r7281 r7389 16 16 InitializeComponent(); 17 17 } 18 19 protected override void DeregisterContentEvents() { 20 base.DeregisterContentEvents(); 21 } 22 protected override void RegisterContentEvents() { 23 base.RegisterContentEvents(); 24 } 25 26 protected override void OnContentChanged() { 27 base.OnContentChanged(); 28 if (Content == null) { 29 txtSubscriptionId.Clear(); 30 txtSubscriptionName.Clear(); 31 txtCertThumbprint.Clear(); 32 lblQuotaCores.Text = "-"; 33 lblQuotaHostedServices.Text = "-"; 34 cbDiscoverServices.Checked = false; 35 cbSaveSubscription.Checked = false; 36 } else { 37 Subscription sub = (Subscription)Content; 38 txtSubscriptionId.Text = sub.SubscriptionID; 39 txtSubscriptionName.Text = sub.SubscriptionName; 40 txtCertThumbprint.Text = sub.CertificateThumbprint; 41 lblQuotaCores.Text = string.Format("{0} / {1}", sub.CurrentCoreCount, sub.MaxCoreCount); 42 lblQuotaHostedServices.Text = string.Format("{0} / {1}", sub.CurrentHostedServices, sub.MaxHostedServices); 43 cbDiscoverServices.Checked = sub.DiscoverServices; 44 cbSaveSubscription.Checked = sub.SaveToConfig; 45 } 46 } 47 48 protected override void SetEnabledStateOfControls() { 49 base.SetEnabledStateOfControls(); 50 } 51 52 private void cbSaveSubscription_CheckedChanged(object sender, System.EventArgs e) { 53 if (Content != null) { 54 Content.SaveToConfig = cbSaveSubscription.Checked; 55 } 56 } 57 58 private void cbDiscoverServices_CheckedChanged(object sender, System.EventArgs e) { 59 if (Content != null) { 60 Content.DiscoverServices = cbDiscoverServices.Checked; 61 } 62 } 63 64 18 65 } 19 66 }
Note: See TracChangeset
for help on using the changeset viewer.