Changeset 7844 for branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBExperimentUploadView.cs
- Timestamp:
- 05/18/12 11:50:59 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBExperimentUploadView.cs
r7839 r7844 69 69 } else { 70 70 AddRuns(Content); 71 DisplayRuns();72 71 } 73 72 } … … 76 75 if (item is Experiment) { 77 76 runs.AddRange((item as Experiment).Runs); 77 DisplayRuns((item as Experiment).Runs); 78 78 } else if (item is RunCollection) { 79 79 runs.AddRange((item as RunCollection)); 80 DisplayRuns((item as RunCollection)); 80 81 } else if (item is IOptimizer) { 81 82 runs.AddRange((item as IOptimizer).Runs); 83 DisplayRuns((item as IOptimizer).Runs); 82 84 } else if (item is IRun) { 83 85 runs.Add(item as IRun); 86 RunCollection tmp = new RunCollection(); 87 tmp.Add(item as IRun); 88 DisplayRuns(tmp); 84 89 } 85 90 } … … 101 106 } 102 107 103 private void DisplayRuns( ) {108 private void DisplayRuns(RunCollection runs) { 104 109 if (RunCreationClient.Instance.Algorithms == null || RunCreationClient.Instance.Algorithms.Count() == 0) { 105 110 RunCreationClient.Instance.RefreshAsync(DisplayError); 106 111 } else { 107 CreateUI( );108 } 109 } 110 111 private void CreateUI( ) {112 CreateUI(runs); 113 } 114 } 115 116 private void CreateUI(RunCollection runs) { 112 117 if (problems.Count == 0) 113 118 problems.AddRange(RunCreationClient.Instance.Problems); … … 128 133 cmbProblem.DisplayMember = "Name"; 129 134 130 dataGridView.Rows.Clear();131 135 foreach (IRun run in runs) { 132 136 int idx = dataGridView.Rows.Add(run.Name); … … 184 188 } else { 185 189 FinishProgressView(); 186 187 CreateUI();188 190 SetEnabledStateOfControls(); 189 191 } … … 241 243 progressView = null; 242 244 SetEnabledStateOfControls(); 245 ClearRuns(); 243 246 } 244 247 } … … 291 294 if (e.Effect.HasFlag(DragDropEffects.Copy)) optimizer = (IItem)optimizer.Clone(); 292 295 AddRuns(optimizer); 293 DisplayRuns(); 294 } 296 } 297 } 298 299 private void clearButton_Click(object sender, EventArgs e) { 300 ClearRuns(); 295 301 } 296 302 }
Note: See TracChangeset
for help on using the changeset viewer.