소스 검색

修改编辑器因forth拼错而带来的规则检错多余项

cxs 1 년 전
부모
커밋
7c3537f5a7

+ 15 - 15
OTSPartA_STDEditor/UI/Form_Main.cs

@@ -403,7 +403,7 @@ namespace OTSPartA_STDEditor
 
 
                 //forth_elem干扰or分隔符,故先行去掉
-                str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
+                //str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
 
                 string[] str_Removeand = System.Text.RegularExpressions.Regex.Split(str_RemoveBlank, "and", System.Text.RegularExpressions.RegexOptions.None);
                 List<string> str_Removeandor = new List<string>();
@@ -645,12 +645,12 @@ namespace OTSPartA_STDEditor
                     List<string> UsingOtherPropertyL = new List<string>();
 
                     string str_RemoveBlank = kv.Value.Expression;
-                    //forth_elem干扰or分隔符,故先行去掉
-                    if (str_RemoveBlank.Contains("fourth_elem"))
-                    {
-                        str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
-                        UsingOtherPropertyList = "fourth_elem";
-                    }
+                    ////forth_elem干扰or分隔符,故先行去掉
+                    //if (str_RemoveBlank.Contains("fourth_elem"))
+                    //{
+                    //    str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
+                    //    UsingOtherPropertyList = "fourth_elem";
+                    //}
 
                     str_RemoveBlank = str_RemoveBlank.Replace(" ", "");
                     string[] str_Removeand = System.Text.RegularExpressions.Regex.Split(str_RemoveBlank, "and", System.Text.RegularExpressions.RegexOptions.None);
@@ -796,12 +796,12 @@ namespace OTSPartA_STDEditor
                     List<string> UsingOtherPropertyL = new List<string>();
 
                     string str_RemoveBlank = kv.Value.Expression;
-                    //forth_elem干扰or分隔符,故先行去掉
-                    if (str_RemoveBlank.Contains("fourth_elem"))
-                    {
-                        str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
-                        UsingOtherPropertyList = "fourth_elem,";
-                    }
+                    ////forth_elem干扰or分隔符,故先行去掉
+                    //if (str_RemoveBlank.Contains("fourth_elem"))
+                    //{
+                    //    str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
+                    //    UsingOtherPropertyList = "fourth_elem,";
+                    //}
 
                     str_RemoveBlank = str_RemoveBlank.Replace(" ", "");
                     string[] str_Removeand = System.Text.RegularExpressions.Regex.Split(str_RemoveBlank, "and", System.Text.RegularExpressions.RegexOptions.None);
@@ -1173,9 +1173,9 @@ namespace OTSPartA_STDEditor
                     this.Text = this.Text.Split(' ')[0] + "   " + STDDBAddress;
                     IsModified = false;
                 }
-                catch
+                catch(Exception ex)
                 {
-                    MessageBox.Show("The selected standard library is formatted incorrectly, please open the correct standard library!", "Tip");
+                    MessageBox.Show(ex.ToString(), "Tip");
                 }
             }
         }

+ 6 - 6
OTSPartA_STDEditor/UI/Form_MaxEDSRules.cs

@@ -498,11 +498,11 @@ namespace OTSPartA_STDEditor
 
                 string str_RemoveBlank = "";
                 //forth_elem干扰or分隔符,故先行去掉
-                if (XmlTree_MaxEDSRules.Nodes[num].Tag.ToString().Contains("fourth_elem"))
-                {
-                    str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
-                    UsingOtherPropertyList = "fourth_elem,";
-                }
+                //if (XmlTree_MaxEDSRules.Nodes[num].Tag.ToString().Contains("fourth_elem"))
+                //{
+                //    str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
+                //    UsingOtherPropertyList = "fourth_elem,";
+                //}
 
                 str_RemoveBlank = XmlTree_MaxEDSRules.Nodes[num].Tag.ToString().Replace(" ", "");
                 string[] str_Removeand = System.Text.RegularExpressions.Regex.Split(str_RemoveBlank, "and", System.Text.RegularExpressions.RegexOptions.None);
@@ -788,7 +788,7 @@ namespace OTSPartA_STDEditor
             }
 
             //forth_elem干扰or分隔符,故先行去掉
-            str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
+            //str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
 
             string[] str_Removeand = System.Text.RegularExpressions.Regex.Split(str_RemoveBlank, "and", System.Text.RegularExpressions.RegexOptions.None);
             List<string> str_Removeandor = new List<string>();

+ 6 - 6
OTSPartA_STDEditor/UI/Form_ZeroElementRules.cs

@@ -467,11 +467,11 @@ namespace OTSPartA_STDEditor
 
                 string str_RemoveBlank = "";
                 //forth_elem干扰or分隔符,故先行去掉
-                if (XmlTree_ZeroElementRules.Nodes[num].Tag.ToString().Contains("fourth_elem"))
-                {
-                    str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
-                    UsingOtherPropertyList = "fourth_elem,";
-                }
+                //if (XmlTree_ZeroElementRules.Nodes[num].Tag.ToString().Contains("fourth_elem"))
+                //{
+                //    str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
+                //    UsingOtherPropertyList = "fourth_elem,";
+                //}
 
                 str_RemoveBlank = XmlTree_ZeroElementRules.Nodes[num].Tag.ToString().Replace(" ", "");
                 string[] str_Removeand = System.Text.RegularExpressions.Regex.Split(str_RemoveBlank, "and", System.Text.RegularExpressions.RegexOptions.None);
@@ -781,7 +781,7 @@ namespace OTSPartA_STDEditor
             }
 
             //forth_elem干扰or分隔符,故先行去掉
-            str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
+            //str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
 
             string[] str_Removeand = System.Text.RegularExpressions.Regex.Split(str_RemoveBlank, "and", System.Text.RegularExpressions.RegexOptions.None);
             List<string> str_Removeandor = new List<string>();

+ 1 - 1
OTSPartA_STDEditor/UI/STDEditor.cs

@@ -688,7 +688,7 @@ namespace OTSPartA_STDEditor
 
             string str_RemoveBlank = textbox_STDEditor.Text.ToString().Replace(" ", "");
             str_RemoveBlank = str_RemoveBlank.Replace("\r\n", "");
-            str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
+            //str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
             string[] str_Removeand = System.Text.RegularExpressions.Regex.Split(str_RemoveBlank, "and", System.Text.RegularExpressions.RegexOptions.None);
             List<string> str_Removeandor = new List<string>();
             for (int i = 0; i < str_Removeand.Length; i++)