Changeset 9865
- Timestamp:
- 08/07/13 13:28:48 (11 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ProgressView.cs
r9849 r9865 167 167 Invoke((Action)LockBackground); 168 168 } else { 169 parentView.Enabled = false; 169 foreach (Control c in Control.Controls) 170 c.Enabled = false; 170 171 Enabled = true; 171 172 } … … 175 176 if (InvokeRequired) Invoke((Action)UnlockBackground); 176 177 else { 177 parentView.Enabled = true; 178 foreach (Control c in Control.Controls) 179 c.Enabled = true; 178 180 Enabled = false; 179 181 } -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.cs
r9849 r9865 351 351 /// Adds a <see cref="ProgressView"/> to the <see cref="ContentView"/>s showing the specified content. 352 352 /// </summary> 353 public void AddOperationProgressToContent(IContent content, IProgress progress, bool addToObjectGraphObjects = true) {353 public void AddOperationProgressToContent(IContent content, string progressMessage, bool addToObjectGraphObjects = true) { 354 354 if (contentProgressLookup.ContainsKey(content)) 355 355 throw new ArgumentException("A progress is already registered for the specified content.", "content"); … … 362 362 contentViews = views.Keys.OfType<IContentView>().Where(v => v.Content == content); 363 363 364 var progress = new Progress(progressMessage); 364 365 foreach (var contentView in contentViews) 365 366 ProgressView.Attach(contentView, progress, true); … … 371 372 /// Adds a <see cref="ProgressView"/> to the specified view. 372 373 /// </summary> 373 public void AddOperationProgressToView(IView view, Progress progress) {374 public void AddOperationProgressToView(IView view, string progressMessage) { 374 375 if (viewProgressLookup.ContainsKey(view)) 375 376 throw new ArgumentException("A progress is already registered for the specified view.", "view"); 376 377 378 var progress = new Progress(progressMessage); 377 379 ProgressView.Attach(view, progress, true); 378 380 viewProgressLookup[view] = progress; -
trunk/sources/HeuristicLab.Optimizer/3.3/FileManager.cs
r9851 r9865 153 153 mainForm.Invoke((Action)delegate { 154 154 if (showProgress) { 155 var progress = new Progress(string.Format("Saving file \"{0}\"...", Path.GetFileName(fileName ?? content.Filename))); 156 mainForm.AddOperationProgressToContent(content, progress); 155 mainForm.AddOperationProgressToContent(content, string.Format("Saving file \"{0}\"...", Path.GetFileName(fileName ?? content.Filename))); 157 156 } else 158 157 mainForm.RemoveOperationProgressFromContent(content); -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/MenuItems/ShrinkDataAnalysisRunsMenuItem.cs
r9859 r9865 76 76 public override void Execute() { 77 77 IContentView activeView = (IContentView)MainFormManager.MainForm.ActiveView; 78 Progress progress = new Progress("Removing duplicate datasets.");79 78 var mainForm = (MainForm.WindowsForms.MainForm)MainFormManager.MainForm; 80 mainForm.AddOperationProgressToContent(activeView.Content, progress);79 mainForm.AddOperationProgressToContent(activeView.Content, "Removing duplicate datasets."); 81 80 82 81 Action<IContentView> action = (view) => {
Note: See TracChangeset
for help on using the changeset viewer.