From 1491846b4736bc2e79604086acfd8544aa3ba384 Mon Sep 17 00:00:00 2001
From: wells.liu <wells.liu@broconcentric.com>
Date: 星期一, 07 九月 2020 12:09:46 +0800
Subject: [PATCH] Merge branch 'master' of http://gitblit.broconcentric.com:8088/r/M071

---
 src/Bro.UI.Config/MenuForms/FrmConfig.cs |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/src/Bro.UI.Config/MenuForms/FrmConfig.cs b/src/Bro.UI.Config/MenuForms/FrmConfig.cs
index 16331d8..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,15 +53,21 @@
 
         private void buttonCreateConfig_Click(object sender, EventArgs e)
         {
-            string pCode = Interaction.InputBox("璇疯緭鍏ヤ骇鍝佺紪鐮�", "浜у搧缂栫爜","",0,0);
-            if (string.IsNullOrWhiteSpace(pCode))
+            ProductionCodeEditForm productionCodeEditForm = new ProductionCodeEditForm();
+            if (productionCodeEditForm.ShowDialog(this) == DialogResult.OK)
             {
-                MessageBox.Show("璇疯緭鍏ヤ骇鍝佺紪鐮侊紒");
-                return;
-            }
-            Process.CreateNewConfig(propGrid.SelectedObject as IProcessConfig, pCode);
+                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);
 
-            MessageBox.Show("鍒涘缓鏂伴厤缃畬鎴�");
+            }
         }
     }
 }

--
Gitblit v1.8.0