private void btMark1EditSave_Click(object sender, EventArgs e) { if (!_isMark1VcEdit) { _isMark1VcEdit = true; cbMarkVc1.Enabled = true; btMark1EditSave.Text = "Sv"; } else { string vcName = cbMarkVc1.Text; if (string.IsNullOrEmpty(vcName)) { MessageBox.Show("请选择视觉配置名称"); return; } JFDLAFRecipeManager rm = JFHubCenter.Instance.RecipeManager as JFDLAFRecipeManager; JFDLAFProductRecipe recipe = rm.GetRecipe(CategoteProduct, cbRecipeID.Text) as JFDLAFProductRecipe; recipe.SetMark1LightCfg(vcName); _isMark1VcEdit = false; cbMarkVc1.Enabled = false; btMark1EditSave.Text = "Vc"; } }