Quellcode durchsuchen

添加域名连接!

张泳健 vor 8 Jahren
Ursprung
Commit
440f67f012

BIN
.vs/GWSocketClient/v15/.suo Datei anzeigen


+ 24 - 22
GWSocketClient/Form1.Designer.cs Datei anzeigen

@@ -95,10 +95,10 @@
95 95
             this.groupBox1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
96 96
             this.groupBox1.Name = "groupBox1";
97 97
             this.groupBox1.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4);
98
-            this.groupBox1.Size = new System.Drawing.Size(1030, 147);
98
+            this.groupBox1.Size = new System.Drawing.Size(1123, 147);
99 99
             this.groupBox1.TabIndex = 0;
100 100
             this.groupBox1.TabStop = false;
101
-            this.groupBox1.Text = "groupBox1";
101
+            this.groupBox1.Text = "基本信息栏";
102 102
             // 
103 103
             // label7
104 104
             // 
@@ -133,16 +133,18 @@
133 133
             this.tfTmpSendData.Location = new System.Drawing.Point(484, 102);
134 134
             this.tfTmpSendData.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
135 135
             this.tfTmpSendData.Name = "tfTmpSendData";
136
-            this.tfTmpSendData.Size = new System.Drawing.Size(538, 23);
136
+            this.tfTmpSendData.Size = new System.Drawing.Size(631, 23);
137 137
             this.tfTmpSendData.TabIndex = 13;
138 138
             // 
139 139
             // tbCCID
140 140
             // 
141
+            this.tbCCID.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
142
+            | System.Windows.Forms.AnchorStyles.Right)));
141 143
             this.tbCCID.ForeColor = System.Drawing.Color.Blue;
142
-            this.tbCCID.Location = new System.Drawing.Point(541, 20);
144
+            this.tbCCID.Location = new System.Drawing.Point(701, 21);
143 145
             this.tbCCID.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
144 146
             this.tbCCID.Name = "tbCCID";
145
-            this.tbCCID.Size = new System.Drawing.Size(342, 23);
147
+            this.tbCCID.Size = new System.Drawing.Size(414, 23);
146 148
             this.tbCCID.TabIndex = 12;
147 149
             this.tbCCID.Text = "3839383630324231313931353530343739383737";
148 150
             this.tbCCID.TextChanged += new System.EventHandler(this.tbCCID_TextChanged);
@@ -150,7 +152,7 @@
150 152
             // label5
151 153
             // 
152 154
             this.label5.AutoSize = true;
153
-            this.label5.Location = new System.Drawing.Point(493, 24);
155
+            this.label5.Location = new System.Drawing.Point(650, 24);
154 156
             this.label5.Name = "label5";
155 157
             this.label5.Size = new System.Drawing.Size(45, 17);
156 158
             this.label5.TabIndex = 11;
@@ -221,18 +223,18 @@
221 223
             // tbEquipmentAddress
222 224
             // 
223 225
             this.tbEquipmentAddress.ForeColor = System.Drawing.Color.Blue;
224
-            this.tbEquipmentAddress.Location = new System.Drawing.Point(343, 20);
226
+            this.tbEquipmentAddress.Location = new System.Drawing.Point(462, 21);
225 227
             this.tbEquipmentAddress.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
226 228
             this.tbEquipmentAddress.Name = "tbEquipmentAddress";
227
-            this.tbEquipmentAddress.Size = new System.Drawing.Size(143, 23);
229
+            this.tbEquipmentAddress.Size = new System.Drawing.Size(182, 23);
228 230
             this.tbEquipmentAddress.TabIndex = 5;
229
-            this.tbEquipmentAddress.Text = "4442832e833c";
231
+            this.tbEquipmentAddress.Text = "4442832E833C";
230 232
             this.tbEquipmentAddress.TextChanged += new System.EventHandler(this.tbEquipmentAddress_TextChanged);
231 233
             // 
232 234
             // tbPort
233 235
             // 
234 236
             this.tbPort.ForeColor = System.Drawing.Color.Blue;
235
-            this.tbPort.Location = new System.Drawing.Point(199, 20);
237
+            this.tbPort.Location = new System.Drawing.Point(329, 21);
236 238
             this.tbPort.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
237 239
             this.tbPort.Name = "tbPort";
238 240
             this.tbPort.Size = new System.Drawing.Size(65, 23);
@@ -242,7 +244,7 @@
242 244
             // label3
243 245
             // 
244 246
             this.label3.AutoSize = true;
245
-            this.label3.Location = new System.Drawing.Point(273, 24);
247
+            this.label3.Location = new System.Drawing.Point(400, 24);
246 248
             this.label3.Name = "label3";
247 249
             this.label3.Size = new System.Drawing.Size(56, 17);
248 250
             this.label3.TabIndex = 4;
@@ -251,7 +253,7 @@
251 253
             // label2
252 254
             // 
253 255
             this.label2.AutoSize = true;
254
-            this.label2.Location = new System.Drawing.Point(157, 24);
256
+            this.label2.Location = new System.Drawing.Point(291, 24);
255 257
             this.label2.Name = "label2";
256 258
             this.label2.Size = new System.Drawing.Size(32, 17);
257 259
             this.label2.TabIndex = 2;
@@ -260,10 +262,10 @@
260 262
             // tbIpaddress
261 263
             // 
262 264
             this.tbIpaddress.ForeColor = System.Drawing.Color.Blue;
263
-            this.tbIpaddress.Location = new System.Drawing.Point(33, 20);
265
+            this.tbIpaddress.Location = new System.Drawing.Point(33, 21);
264 266
             this.tbIpaddress.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
265 267
             this.tbIpaddress.Name = "tbIpaddress";
266
-            this.tbIpaddress.Size = new System.Drawing.Size(116, 23);
268
+            this.tbIpaddress.Size = new System.Drawing.Size(252, 23);
267 269
             this.tbIpaddress.TabIndex = 1;
268 270
             this.tbIpaddress.Text = "127.0.0.1";
269 271
             // 
@@ -283,7 +285,7 @@
283 285
             this.menuStrip1.Location = new System.Drawing.Point(0, 0);
284 286
             this.menuStrip1.Name = "menuStrip1";
285 287
             this.menuStrip1.Padding = new System.Windows.Forms.Padding(7, 3, 0, 3);
286
-            this.menuStrip1.Size = new System.Drawing.Size(1058, 27);
288
+            this.menuStrip1.Size = new System.Drawing.Size(1151, 27);
287 289
             this.menuStrip1.TabIndex = 1;
288 290
             this.menuStrip1.Text = "menuStrip1";
289 291
             // 
@@ -312,7 +314,7 @@
312 314
             this.statusStrip1.Location = new System.Drawing.Point(0, 883);
313 315
             this.statusStrip1.Name = "statusStrip1";
314 316
             this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 16, 0);
315
-            this.statusStrip1.Size = new System.Drawing.Size(1058, 22);
317
+            this.statusStrip1.Size = new System.Drawing.Size(1151, 22);
316 318
             this.statusStrip1.TabIndex = 2;
317 319
             this.statusStrip1.Text = "statusStrip1";
318 320
             // 
@@ -350,10 +352,10 @@
350 352
             this.groupBox2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
351 353
             this.groupBox2.Name = "groupBox2";
352 354
             this.groupBox2.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4);
353
-            this.groupBox2.Size = new System.Drawing.Size(1030, 309);
355
+            this.groupBox2.Size = new System.Drawing.Size(1123, 309);
354 356
             this.groupBox2.TabIndex = 13;
355 357
             this.groupBox2.TabStop = false;
356
-            this.groupBox2.Text = "groupBox2";
358
+            this.groupBox2.Text = "显示信息栏";
357 359
             // 
358 360
             // listBoxShow
359 361
             // 
@@ -362,14 +364,14 @@
362 364
             | System.Windows.Forms.AnchorStyles.Right)));
363 365
             this.listBoxShow.ContextMenuStrip = this.cmslistboxRightMenu;
364 366
             this.listBoxShow.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
365
-            this.listBoxShow.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
367
+            this.listBoxShow.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
366 368
             this.listBoxShow.FormattingEnabled = true;
367 369
             this.listBoxShow.HorizontalScrollbar = true;
368
-            this.listBoxShow.ItemHeight = 14;
370
+            this.listBoxShow.ItemHeight = 18;
369 371
             this.listBoxShow.Location = new System.Drawing.Point(9, 28);
370 372
             this.listBoxShow.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
371 373
             this.listBoxShow.Name = "listBoxShow";
372
-            this.listBoxShow.Size = new System.Drawing.Size(1013, 242);
374
+            this.listBoxShow.Size = new System.Drawing.Size(1106, 274);
373 375
             this.listBoxShow.TabIndex = 0;
374 376
             this.listBoxShow.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.listBoxShow_DrawItem);
375 377
             // 
@@ -399,7 +401,7 @@
399 401
             // 
400 402
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
401 403
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
402
-            this.ClientSize = new System.Drawing.Size(1058, 905);
404
+            this.ClientSize = new System.Drawing.Size(1151, 905);
403 405
             this.Controls.Add(this.groupBox2);
404 406
             this.Controls.Add(this.statusStrip1);
405 407
             this.Controls.Add(this.groupBox1);

+ 24 - 20
GWSocketClient/Form1.cs Datei anzeigen

@@ -251,29 +251,33 @@ namespace GWSocketClient
251 251
 
252 252
         private void listBoxShow_DrawItem(object sender, DrawItemEventArgs e)
253 253
         {
254
-            e.DrawBackground();
255
-            //
256
-            string res = listBoxShow.Items[e.Index].ToString().ToLower();
257
-            if (res.Contains("收到服务端"))
254
+            if (e.Index >= 0 && e.Index < listBoxShow.Items.Count)
258 255
             {
259
-                Font f = new Font("微软雅黑", e.Font.Size, FontStyle.Bold);
256
+                e.DrawBackground();
257
+                //
258
+                string res = listBoxShow.Items[e.Index].ToString().ToLower();
259
+                if (res.Contains("收到服务端"))
260
+                {
261
+                    Font f = new Font("微软雅黑", e.Font.Size, FontStyle.Bold);
260 262
 
261
-                e.Graphics.DrawString(((ListBox) sender).Items[e.Index].ToString(), f, new SolidBrush(Color.Blue),
262
-                    e.Bounds);
263
-            }
264
-            else if (res.Contains("发送到服务端") || res.Contains("回复"))
265
-            {
266
-                Font f = new Font("微软雅黑", e.Font.Size, FontStyle.Italic);
267
-                e.Graphics.DrawString(((ListBox) sender).Items[e.Index].ToString(), f,
268
-                    new SolidBrush(Color.BlueViolet),
269
-                    e.Bounds);
270
-            }
271
-            else
272
-            {
273
-                e.Graphics.DrawString(((ListBox) sender).Items[e.Index].ToString(), e.Font, new SolidBrush(e.ForeColor),
274
-                    e.Bounds);
263
+                    e.Graphics.DrawString(((ListBox) sender).Items[e.Index].ToString(), f, new SolidBrush(Color.Blue),
264
+                        e.Bounds);
265
+                }
266
+                else if (res.Contains("发送到服务端") || res.Contains("回复"))
267
+                {
268
+                    Font f = new Font("微软雅黑", e.Font.Size, FontStyle.Italic);
269
+                    e.Graphics.DrawString(((ListBox) sender).Items[e.Index].ToString(), f,
270
+                        new SolidBrush(Color.BlueViolet),
271
+                        e.Bounds);
272
+                }
273
+                else
274
+                {
275
+                    e.Graphics.DrawString(((ListBox) sender).Items[e.Index].ToString(), e.Font,
276
+                        new SolidBrush(e.ForeColor),
277
+                        e.Bounds);
278
+                }
279
+                e.DrawFocusRectangle();
275 280
             }
276
-            e.DrawFocusRectangle();
277 281
         }
278 282
     }
279 283
 }

BIN
GWSocketClient/dlls/XuanJiSocket.dll Datei anzeigen