Changeset 16447
- Timestamp:
- 12/22/18 21:51:08 (6 years ago)
- Location:
- addons/HeuristicLab.Problems.BioBoost/HeuristicLab.Problems.BioBoost.Views/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
addons/HeuristicLab.Problems.BioBoost/HeuristicLab.Problems.BioBoost.Views/3.3/BioBoostCompoundSolutionEditor.cs
r13074 r16447 583 583 private void optimizeTransportsButton_Click(object sender, EventArgs e) { 584 584 using (BackgroundWorker bg = new BackgroundWorker()) { 585 MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, "Optimizing Transports...");585 Progress.Show(this, "Optimizing Transports...", ProgressMode.Indeterminate); 586 586 bg.DoWork += (o, a) => OptimizeTransports(); 587 bg.RunWorkerCompleted += (o, a) => MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);587 bg.RunWorkerCompleted += (o, a) => Progress.Hide(this); 588 588 bg.RunWorkerAsync(); 589 589 } … … 592 592 private void optimizeUtilizationsButton_Click(object sender, EventArgs e) { 593 593 using (BackgroundWorker bg = new BackgroundWorker()) { 594 MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, "Optimizing Utilizations...");594 Progress.Show(this, "Optimizing Utilizations...", ProgressMode.Indeterminate); 595 595 bg.DoWork += (o, a) => OptimizeUtilizations(); 596 bg.RunWorkerCompleted += (o, a) => MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);596 bg.RunWorkerCompleted += (o, a) => Progress.Hide(this); 597 597 bg.RunWorkerAsync(); 598 598 } -
addons/HeuristicLab.Problems.BioBoost/HeuristicLab.Problems.BioBoost.Views/3.3/MenuItems/CreateBioBoostExperimentMenuItem.cs
r13074 r16447 79 79 public override void Execute() { 80 80 IContentView activeView = (IContentView)MainFormManager.MainForm.ActiveView; 81 var mainForm = ((MainForm.WindowsForms.MainForm) MainFormManager.MainForm); 82 var progress = mainForm.AddOperationProgressToContent(activeView.Content, "Generating Algorithm Configurations"); 81 var progress = Progress.Show(activeView.Content, "Generating Algorithm Configurations"); 83 82 int n = nValues(typeof (Pathway))*nValues(typeof (Region))*nValues(typeof (Price))* nValues(typeof (Implementation)); 84 83 int count = 0; 85 progress.Start();86 84 progress.ProgressValue = 1.0*count/n; 87 85 var alg = activeView.Content as IAlgorithm; … … 119 117 dialog.ShowDialog(); 120 118 } 121 mainForm.RemoveOperationProgressFromContent(activeView.Content);119 Progress.Hide(activeView.Content); 122 120 }, null); 123 121 -
addons/HeuristicLab.Problems.BioBoost/HeuristicLab.Problems.BioBoost.Views/3.3/MenuItems/ExportSolutionMenuItem.cs
r13074 r16447 86 86 var folderName = folderBrowserDialog.SelectedPath; 87 87 IContentView activeView = (IContentView)MainFormManager.MainForm.ActiveView; 88 var mainForm = (MainForm.WindowsForms.MainForm)MainFormManager.MainForm; 89 mainForm.AddOperationProgressToContent(activeView.Content, "Export solutions."); 88 Progress.Show(activeView.Content, "Export solutions.", ProgressMode.Indeterminate); 90 89 91 90 Action<IContentView> action = (view) => { … … 119 118 dialog.ShowDialog(); 120 119 } 121 mainForm.RemoveOperationProgressFromContent(activeView.Content);120 Progress.Hide(activeView.Content); 122 121 }, null); 123 122 }
Note: See TracChangeset
for help on using the changeset viewer.