From 3322022068ab818912d6f5d9e5eb31f51cc639c2 Mon Sep 17 00:00:00 2001 From: patrick.xu <patrick.xu@broconcentric.com> Date: 星期四, 24 二月 2022 09:12:30 +0800 Subject: [PATCH] 添加配置文件的DataShift2 --- src/Bro.UI.Config/MenuForms/FrmConfig.cs | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/Bro.UI.Config/MenuForms/FrmConfig.cs b/src/Bro.UI.Config/MenuForms/FrmConfig.cs index a216390..053494c 100644 --- a/src/Bro.UI.Config/MenuForms/FrmConfig.cs +++ b/src/Bro.UI.Config/MenuForms/FrmConfig.cs @@ -3,6 +3,8 @@ using System; using Microsoft.VisualBasic; using System.Windows.Forms; +using Bro.Common.PubSub; +using static Bro.Common.Helper.EnumHelper; namespace Bro.UI.Config.MenuForms { @@ -51,13 +53,21 @@ private void buttonCreateConfig_Click(object sender, EventArgs e) { - string pCode = Interaction.InputBox("璇疯緭鍏ヤ骇鍝佺紪鐮�", "浜у搧缂栫爜", "", 100, 100); - if (string.IsNullOrWhiteSpace(pCode)) + ProductionCodeEditForm productionCodeEditForm = new ProductionCodeEditForm(); + if (productionCodeEditForm.ShowDialog(this) == DialogResult.OK) { - MessageBox.Show("璇疯緭鍏ヤ骇鍝佺紪鐮侊紒"); - return; - } + 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); + } } } } -- Gitblit v1.8.0