- Timestamp:
- 11/29/12 11:31:44 (12 years ago)
- Location:
- branches/RuntimeOptimizer/HeuristicLab.Optimization.Views/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RuntimeOptimizer/HeuristicLab.Optimization.Views/3.3/TimeLimitRunView.Designer.cs
r8961 r8975 51 51 this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); 52 52 this.snapshotButton = new System.Windows.Forms.Button(); 53 this.sequenceButton = new System.Windows.Forms.Button(); 53 54 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 54 55 this.tabControl.SuspendLayout(); … … 135 136 this.snapshotsTextBox.Location = new System.Drawing.Point(69, 52); 136 137 this.snapshotsTextBox.Name = "snapshotsTextBox"; 137 this.snapshotsTextBox.Size = new System.Drawing.Size( 259, 20);138 this.snapshotsTextBox.Size = new System.Drawing.Size(175, 20); 138 139 this.snapshotsTextBox.TabIndex = 6; 139 140 this.snapshotsTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.snapshotsTextBox_Validating); … … 286 287 this.snapshotButton.Click += new System.EventHandler(this.snapshotButton_Click); 287 288 // 289 // sequenceButton 290 // 291 this.sequenceButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 292 this.sequenceButton.Location = new System.Drawing.Point(250, 50); 293 this.sequenceButton.Name = "sequenceButton"; 294 this.sequenceButton.Size = new System.Drawing.Size(75, 23); 295 this.sequenceButton.TabIndex = 16; 296 this.sequenceButton.Text = "Sequence..."; 297 this.sequenceButton.UseVisualStyleBackColor = true; 298 this.sequenceButton.Click += new System.EventHandler(this.sequenceButton_Click); 299 // 288 300 // TimeLimitRunView 289 301 // 290 302 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 303 this.Controls.Add(this.sequenceButton); 291 304 this.Controls.Add(this.snapshotButton); 292 305 this.Controls.Add(this.tabControl); … … 314 327 this.Controls.SetChildIndex(this.startButton, 0); 315 328 this.Controls.SetChildIndex(this.snapshotButton, 0); 329 this.Controls.SetChildIndex(this.sequenceButton, 0); 316 330 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 317 331 this.tabControl.ResumeLayout(false); … … 342 356 private System.Windows.Forms.OpenFileDialog openFileDialog; 343 357 private System.Windows.Forms.Button snapshotButton; 358 private System.Windows.Forms.Button sequenceButton; 344 359 } 345 360 } -
branches/RuntimeOptimizer/HeuristicLab.Optimization.Views/3.3/TimeLimitRunView.cs
r8961 r8975 114 114 protected override void SetEnabledStateOfExecutableButtons() { 115 115 base.SetEnabledStateOfExecutableButtons(); 116 snapshotButton.Enabled = Content != null && (Content.ExecutionState == ExecutionState.Started || Content.ExecutionState == ExecutionState.Paused);116 snapshotButton.Enabled = Content != null && Content.Algorithm != null && Content.ExecutionState == ExecutionState.Paused; 117 117 } 118 118 … … 290 290 private void snapshotButton_Click(object sender, EventArgs e) { 291 291 Content.Snapshot(); 292 } 293 294 private void sequenceButton_Click(object sender, EventArgs e) { 295 using (var dialog = new DefineArithmeticProgressionDialog(false, 1, Content.MaximumExecutionTime.TotalSeconds, 1)) { 296 if (dialog.ShowDialog() == DialogResult.OK) { 297 Content.SnapshotTimes = new ObservableList<TimeSpan>(dialog.Values.Select(TimeSpan.FromSeconds)); 298 } 299 } 292 300 } 293 301 #endregion
Note: See TracChangeset
for help on using the changeset viewer.