Changeset 16692 for branches/2521_ProblemRefactoring/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/CrossValidationView.cs
- Timestamp:
- 03/18/19 17:24:30 (5 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/2521_ProblemRefactoring/HeuristicLab.Algorithms.DataAnalysis.Views
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/CrossValidationView.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 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) … … 215 222 } 216 223 217 private void startButton_Click(object sender, EventArgs e) {218 Content.Start();224 private async void startButton_Click(object sender, EventArgs e) { 225 await Content.StartAsync(); 219 226 } 220 227 private void pauseButton_Click(object sender, EventArgs e) { … … 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.