- Timestamp:
- 07/02/12 16:39:06 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.OKB.Views/3.3/RunCreation/Views/OKBExperimentUploadView.cs
r8165 r8181 54 54 Algorithm selectedAlgorithm = null; 55 55 Problem selectedProblem = null; 56 private ProgressView progressView; // this has to be disposed manually!56 private ProgressView progressView; 57 57 private Progress progress; 58 58 … … 223 223 progress.Status = "Uploading runs to OKB..."; 224 224 progress.ProgressValue = 0; 225 progress.ProgressState = ProgressState.Started; 225 226 double count = dataGridView.Rows.Count; 226 227 int i = 0; 227 228 using (var view = new ProgressView(this, progress)) { 229 foreach (DataGridViewRow row in dataGridView.Rows) { 230 selectedAlgorithm = algorithms.Where(x => x.Name == row.Cells[algorithmColumnIndex].Value.ToString()).FirstOrDefault(); 231 selectedProblem = problems.Where(x => x.Name == row.Cells[problemColumnIndex].Value.ToString()).FirstOrDefault(); 232 if (selectedAlgorithm == null || selectedProblem == null) { 233 throw new ArgumentException("Can't retrieve the algorithm/problem to upload"); 234 } 235 236 OKBRun run = new OKBRun(selectedAlgorithm.Id, selectedProblem.Id, row.Tag as IRun, UserInformation.Instance.User.Id); 237 run.Store(); 238 i++; 239 progress.ProgressValue = ((double)i) / count; 240 } 228 foreach (DataGridViewRow row in dataGridView.Rows) { 229 selectedAlgorithm = algorithms.Where(x => x.Name == row.Cells[algorithmColumnIndex].Value.ToString()).FirstOrDefault(); 230 selectedProblem = problems.Where(x => x.Name == row.Cells[problemColumnIndex].Value.ToString()).FirstOrDefault(); 231 if (selectedAlgorithm == null || selectedProblem == null) { 232 throw new ArgumentException("Can't retrieve the algorithm/problem to upload"); 233 } 234 235 OKBRun run = new OKBRun(selectedAlgorithm.Id, selectedProblem.Id, row.Tag as IRun, UserInformation.Instance.User.Id); 236 run.Store(); 237 i++; 238 progress.ProgressValue = ((double)i) / count; 241 239 } 242 240 ClearRuns();
Note: See TracChangeset
for help on using the changeset viewer.