- Timestamp:
- 08/21/13 23:08:47 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.Access.Views/3.3/ClientViews/ClientView.cs
r9456 r9893 20 20 #endregion 21 21 22 using System;23 22 using HeuristicLab.Core.Views; 24 23 using HeuristicLab.MainForm; … … 34 33 } 35 34 36 private ProgressView progressView;37 private Progress progress;38 39 35 public ClientView() { 40 36 InitializeComponent(); 41 progress = new Progress() {42 CanBeCanceled = false,43 ProgressState = ProgressState.Finished44 };45 }46 47 protected override void DeregisterContentEvents() {48 if (progressView != null) {49 progressView.Content = null;50 progressView.Dispose();51 progressView = null;52 }53 base.DeregisterContentEvents();54 }55 56 protected override void RegisterContentEvents() {57 base.RegisterContentEvents();58 progressView = new ProgressView(this, progress);59 37 } 60 38 … … 98 76 99 77 public void StartProgressView() { 100 if (InvokeRequired) { 101 Invoke(new Action(StartProgressView)); 102 } else { 103 progress.Status = "Downloading client information. Please be patient."; 104 progress.ProgressState = ProgressState.Started; 105 } 78 var message = "Downloading client information. Please be patient."; 79 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, message); 106 80 } 107 81 108 82 public void FinishProgressView() { 109 if (InvokeRequired) { 110 Invoke(new Action(FinishProgressView)); 111 } else { 112 progress.Finish(); 113 } 83 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this); 114 84 } 115 85 }
Note: See TracChangeset
for help on using the changeset viewer.