Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/29/12 11:31:44 (12 years ago)
Author:
abeham
Message:

#1985:

  • Moved arithmetic progression dialog to MainForm (created a folder dialogs)
  • Added a button to generate such a progression for snapshot times
  • Changed TimeLimitRun to react on ExecutionTimeChanged instead of maintaining its own timers
  • Changed to allow manual snapshoting only during Paused state
  • Perform a pause + snapshot when terminating the algorithm instead of stop + snapshot (allows the algorithm in the final snapshot to continue running if the option was selected)
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  
    5151      this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
    5252      this.snapshotButton = new System.Windows.Forms.Button();
     53      this.sequenceButton = new System.Windows.Forms.Button();
    5354      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    5455      this.tabControl.SuspendLayout();
     
    135136      this.snapshotsTextBox.Location = new System.Drawing.Point(69, 52);
    136137      this.snapshotsTextBox.Name = "snapshotsTextBox";
    137       this.snapshotsTextBox.Size = new System.Drawing.Size(259, 20);
     138      this.snapshotsTextBox.Size = new System.Drawing.Size(175, 20);
    138139      this.snapshotsTextBox.TabIndex = 6;
    139140      this.snapshotsTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.snapshotsTextBox_Validating);
     
    286287      this.snapshotButton.Click += new System.EventHandler(this.snapshotButton_Click);
    287288      //
     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      //
    288300      // TimeLimitRunView
    289301      //
    290302      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
     303      this.Controls.Add(this.sequenceButton);
    291304      this.Controls.Add(this.snapshotButton);
    292305      this.Controls.Add(this.tabControl);
     
    314327      this.Controls.SetChildIndex(this.startButton, 0);
    315328      this.Controls.SetChildIndex(this.snapshotButton, 0);
     329      this.Controls.SetChildIndex(this.sequenceButton, 0);
    316330      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    317331      this.tabControl.ResumeLayout(false);
     
    342356    private System.Windows.Forms.OpenFileDialog openFileDialog;
    343357    private System.Windows.Forms.Button snapshotButton;
     358    private System.Windows.Forms.Button sequenceButton;
    344359  }
    345360}
  • branches/RuntimeOptimizer/HeuristicLab.Optimization.Views/3.3/TimeLimitRunView.cs

    r8961 r8975  
    114114    protected override void SetEnabledStateOfExecutableButtons() {
    115115      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;
    117117    }
    118118
     
    290290    private void snapshotButton_Click(object sender, EventArgs e) {
    291291      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      }
    292300    }
    293301    #endregion
Note: See TracChangeset for help on using the changeset viewer.