public override void Execute() { IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView; if ((activeView != null) && (activeView.Content != null) && (activeView.Content is IOptimizer) && !activeView.Locked) { using (CreateExperimentDialog dialog = new CreateExperimentDialog((IOptimizer)activeView.Content)) { if (dialog.ShowDialog() == DialogResult.OK) MainFormManager.MainForm.ShowContent(dialog.Experiment); } } }
public override void Execute() { IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView; if ((activeView != null) && (activeView.Content != null) && (activeView.Content is IOptimizer) && !activeView.Locked) { using (CreateExperimentDialog dialog = new CreateExperimentDialog((IOptimizer)activeView.Content)) { if (dialog.ShowDialog() == DialogResult.OK) { MainFormManager.MainForm.ShowContent(dialog.Experiment); } } } }