Selaa lähdekoodia

labelcheck修复tabPage关闭问题

shim 8 vuotta sitten
vanhempi
commit
c51fe63086

+ 2 - 1
UAS-MES/FunctionCode/Make/Make_LabelCheck.cs

@@ -60,7 +60,8 @@ namespace UAS_MES.Make
         {
             //关闭当前页面
             showResult.Clear();
-            this.Close();
+            //this.Close();
+            (this.Parent.Parent as TabControl).TabPages.Remove(this.Parent as TabPage);
         }
 
         private void sncode_KeyDown(object sender, KeyEventArgs e)

+ 6 - 0
UAS-MES/FunctionCode/Make/Make_SeqProgramTransform.cs

@@ -220,6 +220,12 @@ namespace UAS_MES.Make
         {
             if (checkbox.Checked == true)
             {
+                //如果勾选没有填值
+                if (textbox.Text == "")
+                {
+                    OperateResult.AppendText(">>勾选长度或者前缀需要填写内容\n", Color.Red);
+                    return false;
+                }
                 if (type == "长度")
                 {
                     //则判断输入转换前的序列号长度是否合法,不合法则提示

+ 5 - 0
UAS-MES/FunctionCode/Make/Make_SeqTransform.cs

@@ -350,6 +350,11 @@ namespace UAS_MES.Make
         {
             if (checkbox.Checked == true)
             {
+                //如果勾选没有填值
+                if (textbox.Text=="") {
+                    OperateResult.AppendText(">>勾选长度或者前缀需要填写内容\n", Color.Red);
+                    return false;
+                }
                 if (type == "长度")
                 {
                     //则判断输入转换前的序列号长度是否合法,不合法则提示