Browse Source

更新添加指令问题

Kerry 7 years ago
parent
commit
abb28dd34c
1 changed files with 14 additions and 8 deletions
  1. 14 8
      GWSocketClient/IdItemEditor.cs

+ 14 - 8
GWSocketClient/IdItemEditor.cs View File

144
 
144
 
145
             if (lenString.Contains("-"))
145
             if (lenString.Contains("-"))
146
             {
146
             {
147
-                if (defalutValueString.Length % 2 == 0)
147
+                if (!lenString.Equals("-1"))
148
                 {
148
                 {
149
-                    richTextBoxTip.Text = "默认值长度不是整数!!!defalutValueString.Length=" + (defalutValueString.Length / 2.0);
150
-                    return;
151
-                }
152
-                if (userValueString.Length % 2 == 0)
153
-                {
154
-                    richTextBoxTip.Text = "用户值长度不是整数!!!defalutValueString.Length=" + (userValueString.Length / 2.0);
149
+                    richTextBoxTip.Text = "不定长请写-1";
155
                     return;
150
                     return;
156
                 }
151
                 }
152
+//
153
+//                if (defalutValueString.Length % 2 == 0)
154
+//                {
155
+//                   
156
+//                }
157
+//                if (userValueString.Length % 2 == 0)
158
+//                {
159
+//                    richTextBoxTip.Text = "用户值长度不是整数!!!defalutValueString.Length=" + (userValueString.Length / 2.0);
160
+//                    return;
161
+//                }
157
             }
162
             }
158
             else
163
             else
159
             {
164
             {
165
+                Console.WriteLine(lenString);
160
                 int len = int.Parse(lenString);
166
                 int len = int.Parse(lenString);
161
-                
167
+
162
                 if ((defalutValueString.Length / 2) != len)
168
                 if ((defalutValueString.Length / 2) != len)
163
                 {
169
                 {
164
                     richTextBoxTip.Text = "默认值长度不对.定义长度是=" + len + " ,你输入长度是=" +
170
                     richTextBoxTip.Text = "默认值长度不对.定义长度是=" + len + " ,你输入长度是=" +