private void btMark2EditSave_Click(object sender, EventArgs e) { if (!_isMark2VcEdit) { _isMark2VcEdit = true; cbMarkVc2.Enabled = true; btMark2EditSave.Text = "Sv"; } else { string vcName = cbMarkVc2.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.SetMark2LightCfg(vcName); _isMark2VcEdit = false; cbMarkVc2.Enabled = false; btMark2EditSave.Text = "Vc"; } }