| | |
| | | using Bro.Common.Interface; |
| | | using Bro.UI.Model.Winform; |
| | | using System; |
| | | using Microsoft.VisualBasic; |
| | | using System.Windows.Forms; |
| | | using Bro.Common.PubSub; |
| | | using static Bro.Common.Helper.EnumHelper; |
| | | |
| | | namespace Bro.UI.Config.MenuForms |
| | | { |
| | |
| | | Process.SaveProcessConfig(propGrid.SelectedObject as IProcessConfig); |
| | | LogAsync(DateTime.Now, "配置保存完成"); |
| | | } |
| | | |
| | | private void buttonCreateConfig_Click(object sender, EventArgs e) |
| | | { |
| | | ProductionCodeEditForm productionCodeEditForm = new ProductionCodeEditForm(); |
| | | if (productionCodeEditForm.ShowDialog(this) == DialogResult.OK) |
| | | { |
| | | string pCode = productionCodeEditForm.PCode; |
| | | productionCodeEditForm.Dispose(); |
| | | if (string.IsNullOrWhiteSpace(pCode)) |
| | | { |
| | | MessageBox.Show("请输入产品编码!"); |
| | | return; |
| | | } |
| | | Process.CreateNewConfig(propGrid.SelectedObject as IProcessConfig, pCode); |
| | | MessageBox.Show("创建新配置完成"); |
| | | PubSubCenter.GetInstance().Publish(PubSubCenterMessageType.UpdateProductionCodes.ToString(), null, null); |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |