Changeset 9896 for trunk/sources
- Timestamp:
- 08/22/13 13:32:59 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.cs
r9894 r9896 347 347 #region progress views 348 348 private readonly Dictionary<IContent, IProgress> contentProgressLookup = new Dictionary<IContent, IProgress>(); 349 private readonly Dictionary< IView, IProgress> viewProgressLookup = new Dictionary<IView, IProgress>();349 private readonly Dictionary<Control, IProgress> viewProgressLookup = new Dictionary<Control, IProgress>(); 350 350 private readonly List<ProgressView> progressViews = new List<ProgressView>(); 351 351 … … 369 369 var progress = new Progress(progressMessage, ProgressState.Started); 370 370 foreach (var contentView in contentViews) { 371 progressViews.Add(new ProgressView( (Control)contentView, progress));371 progressViews.Add(new ProgressView(contentView, progress)); 372 372 } 373 373 … … 379 379 /// Adds a <see cref="ProgressView"/> to the specified view. 380 380 /// </summary> 381 public IProgress AddOperationProgressToView( IViewview, string progressMessage) {381 public IProgress AddOperationProgressToView(Control view, string progressMessage) { 382 382 var progress = new Progress(progressMessage, ProgressState.Started); 383 383 AddOperationProgressToView(view, progress); … … 385 385 } 386 386 387 public void AddOperationProgressToView( IViewview, IProgress progress) {387 public void AddOperationProgressToView(Control view, IProgress progress) { 388 388 if (view == null) throw new ArgumentNullException("view", "The view must not be null."); 389 389 if (progress == null) throw new ArgumentNullException("progress", "The progress must not be null."); 390 390 391 var control = view as Control; 392 if (control == null) throw new ArgumentException("The passed view must be a control.", "view"); 391 if (view == null) throw new ArgumentException("The passed view must be a control.", "view"); 393 392 394 393 IProgress oldProgress; … … 401 400 } 402 401 403 progressViews.Add(new ProgressView( control, progress));402 progressViews.Add(new ProgressView(view, progress)); 404 403 viewProgressLookup[view] = progress; 405 404 } … … 424 423 /// Removes an existing <see cref="ProgressView"/> from the specified view. 425 424 /// </summary> 426 public void RemoveOperationProgressFromView( IViewview, bool finishProgress = true) {425 public void RemoveOperationProgressFromView(Control view, bool finishProgress = true) { 427 426 IProgress progress; 428 427 if (!viewProgressLookup.TryGetValue(view, out progress))
Note: See TracChangeset
for help on using the changeset viewer.