- Timestamp:
- 06/28/12 12:00:51 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.OKB.Views/3.3/RunCreation/Views/OKBExperimentUploadView.cs
r8117 r8145 57 57 Problem selectedProblem = null; 58 58 private ProgressView progressView; 59 private IProgress progress; 59 60 60 61 public OKBExperimentUploadView() { 61 62 InitializeComponent(); 63 progressView = new ProgressView(this); 62 64 } 63 65 … … 176 178 Invoke(new EventHandler(RunCreationClient_Refreshing), sender, e); 177 179 } else { 178 IProgress prog= new Progress();179 prog .Status = "Refreshing algorithms and problems...";180 SetProgressView(prog );180 progress = new Progress(); 181 progress.Status = "Refreshing algorithms and problems..."; 182 SetProgressView(progress); 181 183 } 182 184 } … … 200 202 201 203 private void UploadAsync() { 202 IProgress prog= new Progress();203 prog .Status = "Uploading runs to OKB...";204 prog .ProgressValue = 0;204 progress = new Progress(); 205 progress.Status = "Uploading runs to OKB..."; 206 progress.ProgressValue = 0; 205 207 double count = dataGridView.Rows.Count; 206 208 int i = 0; 207 209 208 SetProgressView(prog );210 SetProgressView(progress); 209 211 foreach (DataGridViewRow row in dataGridView.Rows) { 210 212 selectedAlgorithm = algorithms.Where(x => x.Name == row.Cells[algorithmColumnIndex].Value.ToString()).FirstOrDefault(); … … 217 219 run.Store(); 218 220 i++; 219 prog .ProgressValue = ((double)i) / count;221 progress.ProgressValue = ((double)i) / count; 220 222 } 221 223 FinishProgressView(); … … 226 228 Invoke(new Action<IProgress>(SetProgressView), progress); 227 229 } else { 228 if (progressView == null) { 229 progressView = new ProgressView(this, progress); 230 } else { 231 progressView.Progress = progress; 232 } 230 progressView.Progress = progress; 233 231 } 234 232 } … … 238 236 Invoke(new Action(FinishProgressView)); 239 237 } else { 240 if (progressView != null) { 241 progressView.Finish(); 242 progressView = null; 243 SetEnabledStateOfControls(); 244 ClearRuns(); 245 } 238 progress.Finish(); 239 SetEnabledStateOfControls(); 240 ClearRuns(); 246 241 } 247 242 }
Note: See TracChangeset
for help on using the changeset viewer.