Changeset 7429 for branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views
- Timestamp:
- 01/30/12 17:39:27 (13 years ago)
- Location:
- branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.Designer.cs
r7424 r7429 74 74 this.cmbChooseSubscription.Location = new System.Drawing.Point(15, 25); 75 75 this.cmbChooseSubscription.Name = "cmbChooseSubscription"; 76 this.cmbChooseSubscription.Size = new System.Drawing.Size(4 71, 21);76 this.cmbChooseSubscription.Size = new System.Drawing.Size(486, 21); 77 77 this.cmbChooseSubscription.TabIndex = 2; 78 78 this.cmbChooseSubscription.SelectedValueChanged += new System.EventHandler(this.cmbChooseSubscription_SelectedValueChanged); … … 92 92 this.cmbChooseHostedService.Location = new System.Drawing.Point(15, 65); 93 93 this.cmbChooseHostedService.Name = "cmbChooseHostedService"; 94 this.cmbChooseHostedService.Size = new System.Drawing.Size(4 71, 21);94 this.cmbChooseHostedService.Size = new System.Drawing.Size(486, 21); 95 95 this.cmbChooseHostedService.TabIndex = 6; 96 96 // … … 109 109 this.gbNewHostedService.Location = new System.Drawing.Point(15, 115); 110 110 this.gbNewHostedService.Name = "gbNewHostedService"; 111 this.gbNewHostedService.Size = new System.Drawing.Size(4 69, 145);111 this.gbNewHostedService.Size = new System.Drawing.Size(486, 145); 112 112 this.gbNewHostedService.TabIndex = 7; 113 113 this.gbNewHostedService.TabStop = false; … … 277 277 this.tbInstanceCount.Location = new System.Drawing.Point(13, 378); 278 278 this.tbInstanceCount.Name = "tbInstanceCount"; 279 this.tbInstanceCount.Size = new System.Drawing.Size(4 69, 20);279 this.tbInstanceCount.Size = new System.Drawing.Size(488, 20); 280 280 this.tbInstanceCount.TabIndex = 13; 281 this.tbInstanceCount.Validating += new System.ComponentModel.CancelEventHandler(this.tbInstanceCount_Validating); 281 282 // 282 283 // lblCores 283 284 // 284 285 this.lblCores.AutoSize = true; 285 this.lblCores.Location = new System.Drawing.Point(4 52, 361);286 this.lblCores.Location = new System.Drawing.Point(471, 361); 286 287 this.lblCores.Name = "lblCores"; 287 288 this.lblCores.Size = new System.Drawing.Size(30, 13); … … 292 293 // 293 294 this.label10.AutoSize = true; 294 this.label10.Location = new System.Drawing.Point(4 17, 361);295 this.label10.Location = new System.Drawing.Point(436, 361); 295 296 this.label10.Name = "label10"; 296 297 this.label10.Size = new System.Drawing.Size(40, 13); … … 303 304 this.progressBar.MarqueeAnimationSpeed = 10; 304 305 this.progressBar.Name = "progressBar"; 305 this.progressBar.Size = new System.Drawing.Size(3 07, 23);306 this.progressBar.Size = new System.Drawing.Size(326, 23); 306 307 this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee; 307 308 this.progressBar.TabIndex = 16; … … 309 310 // btnOk 310 311 // 311 this.btnOk.Location = new System.Drawing.Point(3 26, 404);312 this.btnOk.Location = new System.Drawing.Point(345, 404); 312 313 this.btnOk.Name = "btnOk"; 313 314 this.btnOk.Size = new System.Drawing.Size(75, 23); … … 319 320 // btnCancel 320 321 // 321 this.btnCancel.Location = new System.Drawing.Point(4 07, 404);322 this.btnCancel.Location = new System.Drawing.Point(426, 404); 322 323 this.btnCancel.Name = "btnCancel"; 323 324 this.btnCancel.Size = new System.Drawing.Size(75, 23); … … 344 345 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 345 346 this.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange; 346 this.ClientSize = new System.Drawing.Size( 496, 436);347 this.ClientSize = new System.Drawing.Size(517, 436); 347 348 this.Controls.Add(this.lblCertificateFile); 348 349 this.Controls.Add(this.lblCores); -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.cs
r7424 r7429 306 306 e.Cancel = true; 307 307 } else if (!isValidHostedServiceUrl(url)) { 308 errorProvider.SetError(tb Label, "A hosted service name must be between 1 and 63 " +309 "characters long, and be composed of letters, numbers " +310 "and hyphens. Hyphens shouldn't be first or last letter.");308 errorProvider.SetError(tbServiceName, "A hosted service name must be between 1 and 63 " + 309 "characters long, and be composed of letters, numbers " + 310 "and hyphens. Hyphens shouldn't be first or last letter."); 311 311 e.Cancel = true; 312 312 } else { … … 336 336 } 337 337 } 338 339 private void tbInstanceCount_Validating(object sender, CancelEventArgs e) { 340 if (!isValidInstanceCount(tbInstanceCount.Text)) { 341 errorProvider.SetError(tbInstanceCount, "Instance count must be a number greater than 0 and " + 342 "less or equal than the difference between maximum and available cores."); 343 e.Cancel = true; 344 } else { 345 int instanceCount = Convert.ToInt32(tbInstanceCount.Text); 346 Subscription subscription = (Subscription)cmbChooseSubscription.SelectedItem; 347 if (instanceCount > subscription.MaxCoreCount - subscription.CurrentCoreCount) { 348 errorProvider.SetError(tbInstanceCount, "Instance count must be less or equal than the difference between maximum and available cores."); 349 } else { 350 e.Cancel = true; 351 errorProvider.SetError(tbInstanceCount, ""); 352 } 353 } 354 } 355 356 private bool isValidInstanceCount(string text) { 357 string regexString = @"[1-9]+[0-9-]*"; //TODO 358 Regex regex = new Regex(regexString); 359 if (regex.IsMatch(text)) { 360 return true; 361 } else { 362 return false; 363 } 364 } 338 365 } 339 366 }
Note: See TracChangeset
for help on using the changeset viewer.