Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/06/17 11:39:20 (7 years ago)
Author:
gkronber
Message:

#2760: merged r14864, r14865, r14904, r15002, r15026, r15077, r15111 from trunk to stable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/CrossValidationView.cs

    r14186 r15150  
    6161        runCollectionView.Content = null;
    6262        storeAlgorithmInEachRunCheckBox.Checked = true;
     63        shuffleSamplesCheckBox.Checked = false;
    6364      } else {
    6465        Locked = ReadOnly = Content.ExecutionState == ExecutionState.Started;
     
    7475        executionTimeTextBox.Text = Content.ExecutionTime.ToString();
    7576        storeAlgorithmInEachRunCheckBox.Checked = Content.StoreAlgorithmInEachRun;
     77        shuffleSamplesCheckBox.Checked = Content.ShuffleSamples.Value;
    7678      }
    7779    }
     
    137139          stopButton.Enabled = (Content.ExecutionState == ExecutionState.Started) || (Content.ExecutionState == ExecutionState.Paused);
    138140          resetButton.Enabled = Content.ExecutionState != ExecutionState.Started;
     141          // prevent changing the shuffle if the algorithm is not finished
     142          shuffleSamplesCheckBox.Enabled = Content.ExecutionState == ExecutionState.Prepared;
    139143        }
    140144      }
     
    197201
    198202    #region GUI events
     203    private void shuffleSamplesCheckBox_CheckedChanged(object sender, EventArgs e) {
     204      Content.ShuffleSamples.Value = shuffleSamplesCheckBox.Checked;
     205    }
    199206    private void foldsNumericUpDown_Validated(object sender, EventArgs e) {
    200207      if (foldsNumericUpDown.Text == string.Empty)
     
    238245        try {
    239246          Content.Algorithm = (IAlgorithm)algorithmTypeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();
    240         }
    241         catch (Exception ex) {
     247        } catch (Exception ex) {
    242248          ErrorHandling.ShowErrorDialog(this, ex);
    243249        }
     
    250256        algorithmTabControl.Enabled = false;
    251257
    252         ContentManager.LoadAsync(openFileDialog.FileName, delegate(IStorableContent content, Exception error) {
     258        ContentManager.LoadAsync(openFileDialog.FileName, delegate (IStorableContent content, Exception error) {
    253259          try {
    254260            if (error != null) throw error;
     
    258264            else
    259265              Content.Algorithm = algorithm;
    260           }
    261           catch (Exception ex) {
     266          } catch (Exception ex) {
    262267            ErrorHandling.ShowErrorDialog(this, ex);
    263           }
    264           finally {
    265             Invoke(new Action(delegate() {
     268          } finally {
     269            Invoke(new Action(delegate () {
    266270              algorithmTabControl.Enabled = true;
    267271            }));
     
    289293        algorithmProblemViewHost.Enabled = false;
    290294
    291         ContentManager.LoadAsync(openFileDialog.FileName, delegate(IStorableContent content, Exception error) {
     295        ContentManager.LoadAsync(openFileDialog.FileName, delegate (IStorableContent content, Exception error) {
    292296          try {
    293297            if (error != null) throw error;
     
    298302            else
    299303              Content.Problem = problem;
    300           }
    301           catch (Exception ex) {
     304          } catch (Exception ex) {
    302305            Invoke(new Action(() => ErrorHandling.ShowErrorDialog(this, ex)));
    303           }
    304           finally {
    305             Invoke(new Action(delegate() {
     306          } finally {
     307            Invoke(new Action(delegate () {
    306308              algorithmProblemViewHost.Enabled = true;
    307309              newProblemButton.Enabled = openProblemButton.Enabled = true;
     
    357359    }
    358360    #endregion
    359 
    360361  }
    361362}
Note: See TracChangeset for help on using the changeset viewer.