Пример #1
0
        private void btnNewConfig_Click(object sender, EventArgs e)
        {
//            MessageBox.Show(Application.UserAppDataPath + " directory");
            Program.LogInfo("Creating new configuration");
            var configForm = new AutoQcConfigForm(this);

            configForm.StartPosition = FormStartPosition.CenterParent;
            ShowConfigForm(configForm);
        }
Пример #2
0
        private void btnCopy_Click(object sender, EventArgs e)
        {
            // Get the selected configuration
            var configRunner = GetSelectedConfigRunner();

            if (configRunner == null)
            {
                return;
            }
            Program.LogInfo(string.Format("Copying configuration \"{0}\"", configRunner.GetConfigName()));
            var newConfig = configRunner.Config.Copy();

            newConfig.Name = null;
            var configForm = new AutoQcConfigForm(newConfig, null, this);

            ShowConfigForm(configForm);
        }
Пример #3
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            // Get the selected configuration
            var configRunner = GetSelectedConfigRunner();

            if (configRunner == null)
            {
                return;
            }

            Program.LogInfo(string.Format("{0} configuration \"{1}\"", (configRunner.IsStopped() ? "Editing" : "Viewing"),
                                          configRunner.GetConfigName()));

            var configForm = new AutoQcConfigForm(configRunner.Config, configRunner, this);

            ShowConfigForm(configForm);
        }
Пример #4
0
 private static void ShowConfigForm(AutoQcConfigForm configForm)
 {
     configForm.StartPosition = FormStartPosition.CenterParent;
     configForm.ShowDialog();
 }