コード例 #1
0
 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);
     }
   }
 }
コード例 #2
0
        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);
                    }
                }
            }
        }