From 9e49f7a2615286eaad7e8549bb79bae5c10c900f Mon Sep 17 00:00:00 2001
From: wells.liu <wells.liu@broconcentric.com>
Date: 星期六, 11 七月 2020 10:21:27 +0800
Subject: [PATCH] Merge branch 'master' of http://gitblit.broconcentric.com:8088/r/M071

---
 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