Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8190


Ignore:
Timestamp:
07/03/12 13:07:00 (12 years ago)
Author:
mkommend
Message:

#1783: Corrected tool tips in optimizer views and last errors in batchrun execution state handling.

Location:
trunk/sources
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.Designer.cs

    r7967 r8190  
    5959      //
    6060      this.startButton.Location = new System.Drawing.Point(0, 458);
    61       this.toolTip.SetToolTip(this.startButton, "Start/Resume Experiment");
     61      this.toolTip.SetToolTip(this.startButton, "Start/Resume Algorithm");
    6262      //
    6363      // executionTimeTextBox
     
    7272      //
    7373      this.pauseButton.Location = new System.Drawing.Point(30, 458);
    74       this.toolTip.SetToolTip(this.pauseButton, "Pause Experiment");
     74      this.toolTip.SetToolTip(this.pauseButton, "Pause Algorithm");
    7575      //
    7676      // stopButton
    7777      //
    7878      this.stopButton.Location = new System.Drawing.Point(60, 458);
    79       this.toolTip.SetToolTip(this.stopButton, "Stop Experiment");
     79      this.toolTip.SetToolTip(this.stopButton, "Stop Algorithm");
    8080      //
    8181      // resetButton
    8282      //
    8383      this.resetButton.Location = new System.Drawing.Point(90, 458);
    84       this.toolTip.SetToolTip(this.resetButton, "Reset Experiment");
     84      this.toolTip.SetToolTip(this.resetButton, "Reset Algorithm");
    8585      //
    8686      // nameTextBox
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/BatchRunView.Designer.cs

    r7967 r8190  
    5555      //
    5656      this.startButton.Location = new System.Drawing.Point(0, 459);
    57       this.toolTip.SetToolTip(this.startButton, "Start/Resume Experiment");
     57      this.toolTip.SetToolTip(this.startButton, "Start/Resume Batchrun");
    5858      //
    5959      // executionTimeTextBox
     
    6868      //
    6969      this.pauseButton.Location = new System.Drawing.Point(30, 459);
    70       this.toolTip.SetToolTip(this.pauseButton, "Pause Experiment");
     70      this.toolTip.SetToolTip(this.pauseButton, "Pause Batchrun");
    7171      //
    7272      // stopButton
    7373      //
    7474      this.stopButton.Location = new System.Drawing.Point(60, 459);
    75       this.toolTip.SetToolTip(this.stopButton, "Stop Experiment");
     75      this.toolTip.SetToolTip(this.stopButton, "Stop Batchrun");
    7676      //
    7777      // resetButton
    7878      //
    7979      this.resetButton.Location = new System.Drawing.Point(90, 458);
    80       this.toolTip.SetToolTip(this.resetButton, "Reset Experiment");
     80      this.toolTip.SetToolTip(this.resetButton, "Reset Batchrun");
    8181      //
    8282      // nameTextBox
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/IOptimizerView.Designer.cs

    r7967 r8190  
    7373      this.startButton.Size = new System.Drawing.Size(24, 24);
    7474      this.startButton.TabIndex = 10;
    75       this.toolTip.SetToolTip(this.startButton, "Start/Resume Experiment");
     75      this.toolTip.SetToolTip(this.startButton, "Start/Resume Optimizer");
    7676      this.startButton.UseVisualStyleBackColor = true;
    7777      this.startButton.Click += new System.EventHandler(this.startButton_Click);
     
    104104      this.pauseButton.Size = new System.Drawing.Size(24, 24);
    105105      this.pauseButton.TabIndex = 11;
    106       this.toolTip.SetToolTip(this.pauseButton, "Pause Experiment");
     106      this.toolTip.SetToolTip(this.pauseButton, "Pause Optimizer");
    107107      this.pauseButton.UseVisualStyleBackColor = true;
    108108      this.pauseButton.Click += new System.EventHandler(this.pauseButton_Click);
     
    116116      this.stopButton.Size = new System.Drawing.Size(24, 24);
    117117      this.stopButton.TabIndex = 12;
    118       this.toolTip.SetToolTip(this.stopButton, "Stop Experiment");
     118      this.toolTip.SetToolTip(this.stopButton, "Stop Optimizer");
    119119      this.stopButton.UseVisualStyleBackColor = true;
    120120      this.stopButton.Click += new System.EventHandler(this.stopButton_Click);
     
    128128      this.resetButton.Size = new System.Drawing.Size(24, 24);
    129129      this.resetButton.TabIndex = 13;
    130       this.toolTip.SetToolTip(this.resetButton, "Reset Experiment");
     130      this.toolTip.SetToolTip(this.resetButton, "Reset Optimizer");
    131131      this.resetButton.UseVisualStyleBackColor = true;
    132132      this.resetButton.Click += new System.EventHandler(this.resetButton_Click);
  • trunk/sources/HeuristicLab.Optimization/3.3/BatchRun.cs

    r8189 r8190  
    153153    }
    154154
     155    private bool batchRunPrepared = false;
    155156    private bool batchRunStarted = false;
    156157    private bool batchRunPaused = false;
     
    206207      batchRunPaused = original.batchRunPaused;
    207208      batchRunStopped = original.batchRunStopped;
     209      batchRunPrepared = original.batchRunPrepared;
    208210      Initialize();
    209211    }
     
    228230        repetitionsCounter = 0;
    229231        if (clearRuns) runs.Clear();
    230         Optimizer.Prepare(clearRuns);
     232        batchRunPrepared = true;
    231233        batchRunStarted = false;
    232234        batchRunPaused = false;
    233235        batchRunStopped = false;
     236        Optimizer.Prepare(clearRuns);
    234237      } else {
    235238        ExecutionState = ExecutionState.Stopped;
     
    241244      if (Optimizer == null) return;
    242245
     246      batchRunPrepared = false;
    243247      batchRunStarted = true;
    244248      batchRunPaused = false;
     
    253257      if (Optimizer.ExecutionState != ExecutionState.Started) return;
    254258
     259      batchRunPrepared = false;
    255260      batchRunStarted = false;
    256261      batchRunPaused = true;
     
    262267        throw new InvalidOperationException(string.Format("Stop not allowed in execution state \"{0}\".", ExecutionState));
    263268      if (Optimizer == null) return;
    264       if (Optimizer.ExecutionState != ExecutionState.Started && Optimizer.ExecutionState != ExecutionState.Paused) return;
     269      if (Optimizer.ExecutionState != ExecutionState.Started && Optimizer.ExecutionState != ExecutionState.Paused) {
     270        OnStopped();
     271        return;
     272      }
     273
     274      batchRunPrepared = false;
    265275      batchRunStarted = false;
    266276      batchRunPaused = false;
     
    292302    public event EventHandler Prepared;
    293303    private void OnPrepared() {
     304      batchRunPrepared = false;
    294305      ExecutionState = ExecutionState.Prepared;
    295306      EventHandler handler = Prepared;
     
    298309    public event EventHandler Started;
    299310    private void OnStarted() {
     311      //TODO add coment
    300312      ExecutionState = ExecutionState.Started;
    301313      EventHandler handler = Started;
     
    304316    public event EventHandler Paused;
    305317    private void OnPaused() {
     318      batchRunPaused = false;
    306319      ExecutionState = ExecutionState.Paused;
    307320      EventHandler handler = Paused;
     
    310323    public event EventHandler Stopped;
    311324    private void OnStopped() {
     325      //reset flags because it cannot be done if the optimizer gets prepared
     326      batchRunStopped = false;
    312327      ExecutionState = ExecutionState.Stopped;
    313328      EventHandler handler = Stopped;
     
    354369    }
    355370    private void Optimizer_Prepared(object sender, EventArgs e) {
    356       if (ExecutionState == ExecutionState.Stopped || !batchRunStarted) {
     371      if (batchRunPrepared || (ExecutionState == ExecutionState.Stopped)) {
    357372        ExecutionTime = TimeSpan.Zero;
    358373        runsExecutionTime = TimeSpan.Zero;
     374        repetitionsCounter = 0;
    359375        OnPrepared();
    360376      }
Note: See TracChangeset for help on using the changeset viewer.