Browse Source

添加域名连接!

张泳健 8 years ago
parent
commit
440f67f012

BIN
.vs/GWSocketClient/v15/.suo View File


+ 24 - 22
GWSocketClient/Form1.Designer.cs View File

95
             this.groupBox1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
95
             this.groupBox1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
96
             this.groupBox1.Name = "groupBox1";
96
             this.groupBox1.Name = "groupBox1";
97
             this.groupBox1.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4);
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
             this.groupBox1.TabIndex = 0;
99
             this.groupBox1.TabIndex = 0;
100
             this.groupBox1.TabStop = false;
100
             this.groupBox1.TabStop = false;
101
-            this.groupBox1.Text = "groupBox1";
101
+            this.groupBox1.Text = "基本信息栏";
102
             // 
102
             // 
103
             // label7
103
             // label7
104
             // 
104
             // 
133
             this.tfTmpSendData.Location = new System.Drawing.Point(484, 102);
133
             this.tfTmpSendData.Location = new System.Drawing.Point(484, 102);
134
             this.tfTmpSendData.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
134
             this.tfTmpSendData.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
135
             this.tfTmpSendData.Name = "tfTmpSendData";
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
             this.tfTmpSendData.TabIndex = 13;
137
             this.tfTmpSendData.TabIndex = 13;
138
             // 
138
             // 
139
             // tbCCID
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
             this.tbCCID.ForeColor = System.Drawing.Color.Blue;
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
             this.tbCCID.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
145
             this.tbCCID.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
144
             this.tbCCID.Name = "tbCCID";
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
             this.tbCCID.TabIndex = 12;
148
             this.tbCCID.TabIndex = 12;
147
             this.tbCCID.Text = "3839383630324231313931353530343739383737";
149
             this.tbCCID.Text = "3839383630324231313931353530343739383737";
148
             this.tbCCID.TextChanged += new System.EventHandler(this.tbCCID_TextChanged);
150
             this.tbCCID.TextChanged += new System.EventHandler(this.tbCCID_TextChanged);
150
             // label5
152
             // label5
151
             // 
153
             // 
152
             this.label5.AutoSize = true;
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
             this.label5.Name = "label5";
156
             this.label5.Name = "label5";
155
             this.label5.Size = new System.Drawing.Size(45, 17);
157
             this.label5.Size = new System.Drawing.Size(45, 17);
156
             this.label5.TabIndex = 11;
158
             this.label5.TabIndex = 11;
221
             // tbEquipmentAddress
223
             // tbEquipmentAddress
222
             // 
224
             // 
223
             this.tbEquipmentAddress.ForeColor = System.Drawing.Color.Blue;
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
             this.tbEquipmentAddress.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
227
             this.tbEquipmentAddress.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
226
             this.tbEquipmentAddress.Name = "tbEquipmentAddress";
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
             this.tbEquipmentAddress.TabIndex = 5;
230
             this.tbEquipmentAddress.TabIndex = 5;
229
-            this.tbEquipmentAddress.Text = "4442832e833c";
231
+            this.tbEquipmentAddress.Text = "4442832E833C";
230
             this.tbEquipmentAddress.TextChanged += new System.EventHandler(this.tbEquipmentAddress_TextChanged);
232
             this.tbEquipmentAddress.TextChanged += new System.EventHandler(this.tbEquipmentAddress_TextChanged);
231
             // 
233
             // 
232
             // tbPort
234
             // tbPort
233
             // 
235
             // 
234
             this.tbPort.ForeColor = System.Drawing.Color.Blue;
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
             this.tbPort.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
238
             this.tbPort.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
237
             this.tbPort.Name = "tbPort";
239
             this.tbPort.Name = "tbPort";
238
             this.tbPort.Size = new System.Drawing.Size(65, 23);
240
             this.tbPort.Size = new System.Drawing.Size(65, 23);
242
             // label3
244
             // label3
243
             // 
245
             // 
244
             this.label3.AutoSize = true;
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
             this.label3.Name = "label3";
248
             this.label3.Name = "label3";
247
             this.label3.Size = new System.Drawing.Size(56, 17);
249
             this.label3.Size = new System.Drawing.Size(56, 17);
248
             this.label3.TabIndex = 4;
250
             this.label3.TabIndex = 4;
251
             // label2
253
             // label2
252
             // 
254
             // 
253
             this.label2.AutoSize = true;
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
             this.label2.Name = "label2";
257
             this.label2.Name = "label2";
256
             this.label2.Size = new System.Drawing.Size(32, 17);
258
             this.label2.Size = new System.Drawing.Size(32, 17);
257
             this.label2.TabIndex = 2;
259
             this.label2.TabIndex = 2;
260
             // tbIpaddress
262
             // tbIpaddress
261
             // 
263
             // 
262
             this.tbIpaddress.ForeColor = System.Drawing.Color.Blue;
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
             this.tbIpaddress.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
266
             this.tbIpaddress.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
265
             this.tbIpaddress.Name = "tbIpaddress";
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
             this.tbIpaddress.TabIndex = 1;
269
             this.tbIpaddress.TabIndex = 1;
268
             this.tbIpaddress.Text = "127.0.0.1";
270
             this.tbIpaddress.Text = "127.0.0.1";
269
             // 
271
             // 
283
             this.menuStrip1.Location = new System.Drawing.Point(0, 0);
285
             this.menuStrip1.Location = new System.Drawing.Point(0, 0);
284
             this.menuStrip1.Name = "menuStrip1";
286
             this.menuStrip1.Name = "menuStrip1";
285
             this.menuStrip1.Padding = new System.Windows.Forms.Padding(7, 3, 0, 3);
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
             this.menuStrip1.TabIndex = 1;
289
             this.menuStrip1.TabIndex = 1;
288
             this.menuStrip1.Text = "menuStrip1";
290
             this.menuStrip1.Text = "menuStrip1";
289
             // 
291
             // 
312
             this.statusStrip1.Location = new System.Drawing.Point(0, 883);
314
             this.statusStrip1.Location = new System.Drawing.Point(0, 883);
313
             this.statusStrip1.Name = "statusStrip1";
315
             this.statusStrip1.Name = "statusStrip1";
314
             this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 16, 0);
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
             this.statusStrip1.TabIndex = 2;
318
             this.statusStrip1.TabIndex = 2;
317
             this.statusStrip1.Text = "statusStrip1";
319
             this.statusStrip1.Text = "statusStrip1";
318
             // 
320
             // 
350
             this.groupBox2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
352
             this.groupBox2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
351
             this.groupBox2.Name = "groupBox2";
353
             this.groupBox2.Name = "groupBox2";
352
             this.groupBox2.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4);
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
             this.groupBox2.TabIndex = 13;
356
             this.groupBox2.TabIndex = 13;
355
             this.groupBox2.TabStop = false;
357
             this.groupBox2.TabStop = false;
356
-            this.groupBox2.Text = "groupBox2";
358
+            this.groupBox2.Text = "显示信息栏";
357
             // 
359
             // 
358
             // listBoxShow
360
             // listBoxShow
359
             // 
361
             // 
362
             | System.Windows.Forms.AnchorStyles.Right)));
364
             | System.Windows.Forms.AnchorStyles.Right)));
363
             this.listBoxShow.ContextMenuStrip = this.cmslistboxRightMenu;
365
             this.listBoxShow.ContextMenuStrip = this.cmslistboxRightMenu;
364
             this.listBoxShow.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
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
             this.listBoxShow.FormattingEnabled = true;
368
             this.listBoxShow.FormattingEnabled = true;
367
             this.listBoxShow.HorizontalScrollbar = true;
369
             this.listBoxShow.HorizontalScrollbar = true;
368
-            this.listBoxShow.ItemHeight = 14;
370
+            this.listBoxShow.ItemHeight = 18;
369
             this.listBoxShow.Location = new System.Drawing.Point(9, 28);
371
             this.listBoxShow.Location = new System.Drawing.Point(9, 28);
370
             this.listBoxShow.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
372
             this.listBoxShow.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
371
             this.listBoxShow.Name = "listBoxShow";
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
             this.listBoxShow.TabIndex = 0;
375
             this.listBoxShow.TabIndex = 0;
374
             this.listBoxShow.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.listBoxShow_DrawItem);
376
             this.listBoxShow.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.listBoxShow_DrawItem);
375
             // 
377
             // 
399
             // 
401
             // 
400
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
402
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
401
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
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
             this.Controls.Add(this.groupBox2);
405
             this.Controls.Add(this.groupBox2);
404
             this.Controls.Add(this.statusStrip1);
406
             this.Controls.Add(this.statusStrip1);
405
             this.Controls.Add(this.groupBox1);
407
             this.Controls.Add(this.groupBox1);

+ 24 - 20
GWSocketClient/Form1.cs View File

251
 
251
 
252
         private void listBoxShow_DrawItem(object sender, DrawItemEventArgs e)
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 View File