- Timestamp:
- 07/06/17 11:39:20 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
stable/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/CrossValidationView.cs
r14186 r15150 61 61 runCollectionView.Content = null; 62 62 storeAlgorithmInEachRunCheckBox.Checked = true; 63 shuffleSamplesCheckBox.Checked = false; 63 64 } else { 64 65 Locked = ReadOnly = Content.ExecutionState == ExecutionState.Started; … … 74 75 executionTimeTextBox.Text = Content.ExecutionTime.ToString(); 75 76 storeAlgorithmInEachRunCheckBox.Checked = Content.StoreAlgorithmInEachRun; 77 shuffleSamplesCheckBox.Checked = Content.ShuffleSamples.Value; 76 78 } 77 79 } … … 137 139 stopButton.Enabled = (Content.ExecutionState == ExecutionState.Started) || (Content.ExecutionState == ExecutionState.Paused); 138 140 resetButton.Enabled = Content.ExecutionState != ExecutionState.Started; 141 // prevent changing the shuffle if the algorithm is not finished 142 shuffleSamplesCheckBox.Enabled = Content.ExecutionState == ExecutionState.Prepared; 139 143 } 140 144 } … … 197 201 198 202 #region GUI events 203 private void shuffleSamplesCheckBox_CheckedChanged(object sender, EventArgs e) { 204 Content.ShuffleSamples.Value = shuffleSamplesCheckBox.Checked; 205 } 199 206 private void foldsNumericUpDown_Validated(object sender, EventArgs e) { 200 207 if (foldsNumericUpDown.Text == string.Empty) … … 238 245 try { 239 246 Content.Algorithm = (IAlgorithm)algorithmTypeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 240 } 241 catch (Exception ex) { 247 } catch (Exception ex) { 242 248 ErrorHandling.ShowErrorDialog(this, ex); 243 249 } … … 250 256 algorithmTabControl.Enabled = false; 251 257 252 ContentManager.LoadAsync(openFileDialog.FileName, delegate (IStorableContent content, Exception error) {258 ContentManager.LoadAsync(openFileDialog.FileName, delegate (IStorableContent content, Exception error) { 253 259 try { 254 260 if (error != null) throw error; … … 258 264 else 259 265 Content.Algorithm = algorithm; 260 } 261 catch (Exception ex) { 266 } catch (Exception ex) { 262 267 ErrorHandling.ShowErrorDialog(this, ex); 263 } 264 finally { 265 Invoke(new Action(delegate() { 268 } finally { 269 Invoke(new Action(delegate () { 266 270 algorithmTabControl.Enabled = true; 267 271 })); … … 289 293 algorithmProblemViewHost.Enabled = false; 290 294 291 ContentManager.LoadAsync(openFileDialog.FileName, delegate (IStorableContent content, Exception error) {295 ContentManager.LoadAsync(openFileDialog.FileName, delegate (IStorableContent content, Exception error) { 292 296 try { 293 297 if (error != null) throw error; … … 298 302 else 299 303 Content.Problem = problem; 300 } 301 catch (Exception ex) { 304 } catch (Exception ex) { 302 305 Invoke(new Action(() => ErrorHandling.ShowErrorDialog(this, ex))); 303 } 304 finally { 305 Invoke(new Action(delegate() { 306 } finally { 307 Invoke(new Action(delegate () { 306 308 algorithmProblemViewHost.Enabled = true; 307 309 newProblemButton.Enabled = openProblemButton.Enabled = true; … … 357 359 } 358 360 #endregion 359 360 361 } 361 362 }
Note: See TracChangeset
for help on using the changeset viewer.