- Timestamp:
- 08/23/13 11:21:02 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.cs
r9900 r9905 354 354 /// </summary> 355 355 public IProgress AddOperationProgressToContent(IContent content, string progressMessage, bool addToObjectGraphObjects = true) { 356 if (InvokeRequired) { 357 IProgress result = (IProgress)Invoke((Func<IContent, string, bool, IProgress>)AddOperationProgressToContent, content, progressMessage, addToObjectGraphObjects); 358 return result; 359 } 356 360 if (contentProgressLookup.ContainsKey(content)) 357 361 throw new ArgumentException("A progress is already registered for the specified content.", "content"); … … 386 390 387 391 public void AddOperationProgressToView(Control control, IProgress progress) { 392 if (InvokeRequired) { 393 Invoke((Action<Control, IProgress>)AddOperationProgressToView, control, progress); 394 return; 395 } 388 396 if (control == null) throw new ArgumentNullException("control", "The view must not be null."); 389 397 if (progress == null) throw new ArgumentNullException("progress", "The progress must not be null."); … … 406 414 /// </summary> 407 415 public void RemoveOperationProgressFromContent(IContent content, bool finishProgress = true) { 416 if (InvokeRequired) { 417 Invoke((Action<IContent, bool>)RemoveOperationProgressFromContent, content, finishProgress); 418 return; 419 } 420 408 421 IProgress progress; 409 422 if (!contentProgressLookup.TryGetValue(content, out progress)) … … 416 429 } 417 430 contentProgressLookup.Remove(content); 431 418 432 } 419 433
Note: See TracChangeset
for help on using the changeset viewer.