Changeset 8977
- Timestamp:
- 11/29/12 13:47:28 (12 years ago)
- Location:
- branches/RuntimeOptimizer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RuntimeOptimizer/HeuristicLab.Optimization.Views/3.3/TimeLimitRunView.cs
r8975 r8977 142 142 SuppressEvents = true; 143 143 try { 144 snapshotsTextBox.Text = string.Join(" ; ", Content.SnapshotTimes.Select(x => FormatTimeSpan(x, true))); 144 if (Content.SnapshotTimes.Any()) 145 snapshotsTextBox.Text = String.Join(" ; ", Content.SnapshotTimes.Select(x => FormatTimeSpan(x, true))); 146 else snapshotsTextBox.Text = String.Empty; 145 147 Content.SnapshotTimes.ItemsAdded += Content_SnapshotTimes_Changed; 146 148 Content.SnapshotTimes.ItemsMoved += Content_SnapshotTimes_Changed; … … 180 182 SuppressEvents = true; 181 183 try { 182 snapshotsTextBox.Text = string.Join(" ; ", Content.SnapshotTimes.Select(x => FormatTimeSpan(x, true))); 184 if (Content.SnapshotTimes.Any()) 185 snapshotsTextBox.Text = string.Join(" ; ", Content.SnapshotTimes.Select(x => FormatTimeSpan(x, true))); 186 else snapshotsTextBox.Text = String.Empty; 183 187 } finally { SuppressEvents = false; } 184 188 } … … 204 208 errorProvider.SetError(timeLimitTextBox, String.Empty); 205 209 206 var tokens = snapshotsTextBox.Text. Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);210 var tokens = snapshotsTextBox.Text.Trim().Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); 207 211 208 212 var snapshotTimes = new ObservableList<TimeSpan>(); … … 295 299 using (var dialog = new DefineArithmeticProgressionDialog(false, 1, Content.MaximumExecutionTime.TotalSeconds, 1)) { 296 300 if (dialog.ShowDialog() == DialogResult.OK) { 297 Content.SnapshotTimes = new ObservableList<TimeSpan>(dialog.Values.Select(TimeSpan.FromSeconds)); 301 if (dialog.Values.Any()) 302 Content.SnapshotTimes = new ObservableList<TimeSpan>(dialog.Values.Select(TimeSpan.FromSeconds)); 303 else Content.SnapshotTimes = new ObservableList<TimeSpan>(); 298 304 } 299 305 } -
branches/RuntimeOptimizer/HeuristicLab.Optimization/3.3/MetaOptimizers/TimeLimitRun.cs
r8975 r8977 341 341 pausedForSnapshot = pausedForTermination = false; 342 342 MakeSnapshot(); 343 snapshotTimesIndex++;343 FindNextSnapshotTimeIndex(ExecutionTime); 344 344 } 345 345 OnPaused();
Note: See TracChangeset
for help on using the changeset viewer.