public static IBuildDefinition DialogShow(IBuildDefinition definition, FormActionMode mode) { IBuildDefinition result = null; if (form == null) { form = new FormDefinitionEdit(); } if (definition == null) { definition = new TempBuildDefinition(); } form.definition = definition; form.mode = mode; form.Initialize(); if (form.ShowDialog() == DialogResult.OK) { if (form.mode != FormActionMode.View) { result = new TempBuildDefinition(); // general result.Name = form.controlGeneral.DefinitionName; result.Description = form.controlGeneral.Description; result.Enabled = !form.controlGeneral.DisableBuildDefinition; // workspace } } return(result); }
private void linkBuildDefinition_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { if (this.cmbBuildDefinition.SelectedIndex == -1) { return; } IBuildDefinition find = this.cached_buildDefinitions.Find(definition => { return(definition.Name == this.cmbBuildDefinition.SelectedItem as string); }); if (find == null) { return; } FormDefinitionEdit.DialogShow(find, FormActionMode.View); }