Changeset 15320 for branches/SimplifierViewsProgress/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.cs
- Timestamp:
- 08/10/17 13:53:08 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SimplifierViewsProgress/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.cs
r14185 r15320 230 230 } 231 231 232 public IContentView ShowContent<T>(T content, bool reuseExistingView, IEqualityComparer<T> comparer = null) where T : class, IContent {232 public IContentView ShowContent<T>(T content, bool reuseExistingView, IEqualityComparer<T> comparer = null) where T : class, IContent { 233 233 if (content == null) throw new ArgumentNullException("Content cannot be null."); 234 234 if (!reuseExistingView) return ShowContent(content); … … 353 353 /// Adds a <see cref="ProgressView"/> to the <see cref="ContentView"/>s showing the specified content. 354 354 /// </summary> 355 public IProgress AddOperationProgressToContent(IContent content, string progressMessage, bool addToObjectGraphObjects = true) {355 public IProgress AddOperationProgressToContent(IContent content, string progressMessage, double progressValue = -1, bool addToObjectGraphObjects = true) { 356 356 if (InvokeRequired) { 357 IProgress result = (IProgress)Invoke((Func<IContent, string, bool, IProgress>)AddOperationProgressToContent, content, progressMessage, addToObjectGraphObjects);357 IProgress result = (IProgress)Invoke((Func<IContent, string, double, bool, IProgress>)AddOperationProgressToContent, content, progressMessage, progressValue, addToObjectGraphObjects); 358 358 return result; 359 359 } … … 371 371 contentViews = contentViews.Where(v => v.Content == content); 372 372 373 var progress = new Progress(progressMessage, ProgressState.Started );373 var progress = new Progress(progressMessage, ProgressState.Started, progressValue); 374 374 foreach (var contentView in contentViews) { 375 375 progressViews.Add(new ProgressView(contentView, progress)); … … 560 560 try { 561 561 ((IActionUserInterfaceItem)item.Tag).Execute(); 562 } 563 catch (Exception ex) { 562 } catch (Exception ex) { 564 563 ErrorHandling.ShowErrorDialog((Control)MainFormManager.MainForm, ex); 565 564 }
Note: See TracChangeset
for help on using the changeset viewer.