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); }
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); }
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); }
private static void ShowConfigForm(AutoQcConfigForm configForm) { configForm.StartPosition = FormStartPosition.CenterParent; configForm.ShowDialog(); }