Example #1
0
 public static void CreateFileAdditional() {
     PromptForName window = new PromptForName();
     window.maxSize = window.minSize = new Vector2(300, 50);
     window.titleContent = new GUIContent("New Config");
     window.nameNew = "Custom";
     window.ShowUtility();
 }
Example #2
0
        void UpdateModel(bool randomizeData)
        {
            if (MessageBox.Show("Once the model is updated, previous solution will be discarded.", "GPdotNET", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
            {
                return;
            }

            DialogResult res        = DialogResult.OK;
            var          modelIndex = 0;
            var          project    = getActiveProject();

            if (project == null)
            {
                MessageBox.Show("Project is not selected.");
                return;
            }
            if (project.Models.Count == 0)
            {
                MessageBox.Show("Select new project.");
                return;
            }
            else if (project.Models.Count > 1)
            {
                PromptForName dlg = new PromptForName();
                dlg.comboBox1.Items.AddRange(project.Models.Select(x => x.Model.Name).ToArray());
                res        = dlg.ShowDialog();
                modelIndex = dlg.comboBox1.SelectedIndex;
            }

            if (res == DialogResult.OK)
            {
                var model = project.Project.Models[modelIndex];

                var dataset = project.Project.DataSet.GetDataSet(randomizeData);
                var exp     = new Data.Experiment(dataset);


                model.DataSet = dataset;
                model.ExpData = exp;

                model.ResetSolution();
            }
        }
Example #3
0
        private void RenameMachine(IMachine machine)
        {
            if (machine == null)
            {
                return;
            }

            using ((machine as IPausableMachine)?.AutoPause())
            {
                PromptForNameEventArgs args = new PromptForNameEventArgs(machine.Name);
                PromptForName?.Invoke(this, args);

                string newName = args.SelectedName;
                if (newName != null)
                {
                    machine.Name = newName;
                }
            }
        }