From 3623bcfea474b965b80e14b06ee1333a9552d11a Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Wed, 28 Mar 2018 09:59:44 +0800 Subject: [PATCH] =?UTF-8?q?IP=E5=9C=B0=E5=9D=80=20=E4=BB=8E6=E4=B8=AA?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=B08=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ClientForWEDS/ConfigUtil.cs | 8 +- ClientForWEDS/Form1.Designer.cs | 167 ++++++++++++++++++++------------ ClientForWEDS/Form1.cs | 13 ++- 3 files changed, 120 insertions(+), 68 deletions(-) diff --git a/ClientForWEDS/ConfigUtil.cs b/ClientForWEDS/ConfigUtil.cs index 1e2b2db..349a208 100644 --- a/ClientForWEDS/ConfigUtil.cs +++ b/ClientForWEDS/ConfigUtil.cs @@ -16,6 +16,8 @@ namespace ClientForWEDS { IP4 = nutFile.AsString(ConfigItem.IP4, ""); IP5 = nutFile.AsString(ConfigItem.IP5, ""); IP6 = nutFile.AsString(ConfigItem.IP6, ""); + IP7 = nutFile.AsString(ConfigItem.IP7, ""); + IP8 = nutFile.AsString(ConfigItem.IP8, ""); Port = nutFile.AsString(ConfigItem.Port, "3350"); Timeout = nutFile.AsString(ConfigItem.Timeout, "8000"); ValidateType = nutFile.AsString(ConfigItem.ValidateType, "no"); @@ -30,8 +32,10 @@ namespace ClientForWEDS { public static string IP2; public static string IP3; public static string IP4; - public static string IP5; + public static string IP5; public static string IP6; + public static string IP7; + public static string IP8; public static string Port; public static string Timeout; public static string ValidateType; @@ -48,6 +52,8 @@ namespace ClientForWEDS { public const string IP4 = "IP4"; public const string IP5 = "IP5"; public const string IP6 = "IP6"; + public const string IP7 = "IP7"; + public const string IP8 = "IP8"; public const string Port = "Port"; public const string Timeout = "Timeout"; diff --git a/ClientForWEDS/Form1.Designer.cs b/ClientForWEDS/Form1.Designer.cs index 9c4d819..d65e3d4 100644 --- a/ClientForWEDS/Form1.Designer.cs +++ b/ClientForWEDS/Form1.Designer.cs @@ -50,7 +50,17 @@ this.nudPort = new System.Windows.Forms.NumericUpDown(); this.lblConnTimeout = new System.Windows.Forms.Label(); this.lblConnPort = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); + this.txtIP6 = new System.Windows.Forms.TextBox(); + this.txtIP8 = new System.Windows.Forms.TextBox(); + this.txtIP5 = new System.Windows.Forms.TextBox(); + this.txtIP7 = new System.Windows.Forms.TextBox(); + this.txtIP4 = new System.Windows.Forms.TextBox(); this.txtIP3 = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); @@ -113,12 +123,6 @@ this.lblZdLinkStateInfo = new System.Windows.Forms.Label(); this.saveFileDialogRecive = new System.Windows.Forms.SaveFileDialog(); this.openFileDialogDangAn = new System.Windows.Forms.OpenFileDialog(); - this.txtIP4 = new System.Windows.Forms.TextBox(); - this.label9 = new System.Windows.Forms.Label(); - this.txtIP5 = new System.Windows.Forms.TextBox(); - this.label10 = new System.Windows.Forms.Label(); - this.txtIP6 = new System.Windows.Forms.TextBox(); - this.label11 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.axW4commsv21)).BeginInit(); this.panel1.SuspendLayout(); this.tabControl1.SuspendLayout(); @@ -158,7 +162,6 @@ this.btntpRecive.TabIndex = 10; this.btntpRecive.Text = "采集考勤到PC"; this.btntpRecive.UseVisualStyleBackColor = true; - this.btntpRecive.Click += new System.EventHandler(this.btntpRecive_Click); // // panel1 // @@ -203,11 +206,15 @@ this.tpConnection.Controls.Add(this.lblConnTimeout); this.tpConnection.Controls.Add(this.lblConnPort); this.tpConnection.Controls.Add(this.label11); + this.tpConnection.Controls.Add(this.label13); this.tpConnection.Controls.Add(this.label10); + this.tpConnection.Controls.Add(this.label12); this.tpConnection.Controls.Add(this.label9); this.tpConnection.Controls.Add(this.label2); this.tpConnection.Controls.Add(this.txtIP6); + this.tpConnection.Controls.Add(this.txtIP8); this.tpConnection.Controls.Add(this.txtIP5); + this.tpConnection.Controls.Add(this.txtIP7); this.tpConnection.Controls.Add(this.txtIP4); this.tpConnection.Controls.Add(this.txtIP3); this.tpConnection.Controls.Add(this.label6); @@ -253,7 +260,7 @@ // // txtReciveZDPath // - this.txtReciveZDPath.Location = new System.Drawing.Point(70, 355); + this.txtReciveZDPath.Location = new System.Drawing.Point(70, 360); this.txtReciveZDPath.Name = "txtReciveZDPath"; this.txtReciveZDPath.Size = new System.Drawing.Size(262, 21); this.txtReciveZDPath.TabIndex = 30; @@ -272,7 +279,7 @@ // lblRZdFilePath // this.lblRZdFilePath.AutoSize = true; - this.lblRZdFilePath.Location = new System.Drawing.Point(6, 323); + this.lblRZdFilePath.Location = new System.Drawing.Point(6, 328); this.lblRZdFilePath.Name = "lblRZdFilePath"; this.lblRZdFilePath.Size = new System.Drawing.Size(239, 12); this.lblRZdFilePath.TabIndex = 27; @@ -313,7 +320,7 @@ // // txtValidate // - this.txtValidate.Location = new System.Drawing.Point(231, 247); + this.txtValidate.Location = new System.Drawing.Point(231, 252); this.txtValidate.Multiline = true; this.txtValidate.Name = "txtValidate"; this.txtValidate.Size = new System.Drawing.Size(147, 65); @@ -323,7 +330,7 @@ // rbAdminValidate // this.rbAdminValidate.AutoSize = true; - this.rbAdminValidate.Location = new System.Drawing.Point(129, 291); + this.rbAdminValidate.Location = new System.Drawing.Point(129, 296); this.rbAdminValidate.Name = "rbAdminValidate"; this.rbAdminValidate.Size = new System.Drawing.Size(83, 16); this.rbAdminValidate.TabIndex = 22; @@ -335,7 +342,7 @@ // rbPassValidate // this.rbPassValidate.AutoSize = true; - this.rbPassValidate.Location = new System.Drawing.Point(129, 270); + this.rbPassValidate.Location = new System.Drawing.Point(129, 275); this.rbPassValidate.Name = "rbPassValidate"; this.rbPassValidate.Size = new System.Drawing.Size(71, 16); this.rbPassValidate.TabIndex = 21; @@ -347,7 +354,7 @@ // rbNoValidate // this.rbNoValidate.AutoSize = true; - this.rbNoValidate.Location = new System.Drawing.Point(129, 248); + this.rbNoValidate.Location = new System.Drawing.Point(129, 253); this.rbNoValidate.Name = "rbNoValidate"; this.rbNoValidate.Size = new System.Drawing.Size(59, 16); this.rbNoValidate.TabIndex = 20; @@ -359,7 +366,7 @@ // lblValidateString // this.lblValidateString.AutoSize = true; - this.lblValidateString.Location = new System.Drawing.Point(6, 247); + this.lblValidateString.Location = new System.Drawing.Point(6, 252); this.lblValidateString.Name = "lblValidateString"; this.lblValidateString.Size = new System.Drawing.Size(95, 12); this.lblValidateString.TabIndex = 19; @@ -413,6 +420,51 @@ this.lblConnPort.Text = "端 口 号:"; this.lblConnPort.TextAlign = System.Drawing.ContentAlignment.TopRight; // + // label11 + // + this.label11.Location = new System.Drawing.Point(235, 150); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(58, 17); + this.label11.TabIndex = 4; + this.label11.Text = "IP地址6:"; + this.label11.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // label13 + // + this.label13.Location = new System.Drawing.Point(235, 223); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(58, 14); + this.label13.TabIndex = 4; + this.label13.Text = "IP地址8:"; + this.label13.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // label10 + // + this.label10.Location = new System.Drawing.Point(43, 223); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(58, 14); + this.label10.TabIndex = 4; + this.label10.Text = "IP地址5:"; + this.label10.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // label12 + // + this.label12.Location = new System.Drawing.Point(235, 188); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(58, 14); + this.label12.TabIndex = 4; + this.label12.Text = "IP地址7:"; + this.label12.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // label9 + // + this.label9.Location = new System.Drawing.Point(43, 188); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(58, 14); + this.label9.TabIndex = 4; + this.label9.Text = "IP地址4:"; + this.label9.TextAlign = System.Drawing.ContentAlignment.TopRight; + // // label2 // this.label2.Location = new System.Drawing.Point(43, 150); @@ -422,6 +474,41 @@ this.label2.Text = "IP地址3:"; this.label2.TextAlign = System.Drawing.ContentAlignment.TopRight; // + // txtIP6 + // + this.txtIP6.Location = new System.Drawing.Point(299, 147); + this.txtIP6.Name = "txtIP6"; + this.txtIP6.Size = new System.Drawing.Size(120, 21); + this.txtIP6.TabIndex = 5; + // + // txtIP8 + // + this.txtIP8.Location = new System.Drawing.Point(299, 220); + this.txtIP8.Name = "txtIP8"; + this.txtIP8.Size = new System.Drawing.Size(120, 21); + this.txtIP8.TabIndex = 5; + // + // txtIP5 + // + this.txtIP5.Location = new System.Drawing.Point(107, 220); + this.txtIP5.Name = "txtIP5"; + this.txtIP5.Size = new System.Drawing.Size(120, 21); + this.txtIP5.TabIndex = 5; + // + // txtIP7 + // + this.txtIP7.Location = new System.Drawing.Point(299, 185); + this.txtIP7.Name = "txtIP7"; + this.txtIP7.Size = new System.Drawing.Size(120, 21); + this.txtIP7.TabIndex = 5; + // + // txtIP4 + // + this.txtIP4.Location = new System.Drawing.Point(107, 185); + this.txtIP4.Name = "txtIP4"; + this.txtIP4.Size = new System.Drawing.Size(120, 21); + this.txtIP4.TabIndex = 5; + // // txtIP3 // this.txtIP3.Location = new System.Drawing.Point(107, 147); @@ -1007,54 +1094,6 @@ // this.saveFileDialogRecive.Filter = "所有文件|*.*"; // - // txtIP4 - // - this.txtIP4.Location = new System.Drawing.Point(107, 185); - this.txtIP4.Name = "txtIP4"; - this.txtIP4.Size = new System.Drawing.Size(120, 21); - this.txtIP4.TabIndex = 5; - // - // label9 - // - this.label9.Location = new System.Drawing.Point(43, 188); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(58, 14); - this.label9.TabIndex = 4; - this.label9.Text = "IP地址4:"; - this.label9.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // txtIP5 - // - this.txtIP5.Location = new System.Drawing.Point(299, 147); - this.txtIP5.Name = "txtIP5"; - this.txtIP5.Size = new System.Drawing.Size(120, 21); - this.txtIP5.TabIndex = 5; - // - // label10 - // - this.label10.Location = new System.Drawing.Point(235, 150); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(58, 14); - this.label10.TabIndex = 4; - this.label10.Text = "IP地址5:"; - this.label10.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // txtIP6 - // - this.txtIP6.Location = new System.Drawing.Point(299, 182); - this.txtIP6.Name = "txtIP6"; - this.txtIP6.Size = new System.Drawing.Size(120, 21); - this.txtIP6.TabIndex = 5; - // - // label11 - // - this.label11.Location = new System.Drawing.Point(235, 185); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(58, 17); - this.label11.TabIndex = 4; - this.label11.Text = "IP地址6:"; - this.label11.TextAlign = System.Drawing.ContentAlignment.TopRight; - // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -1184,6 +1223,10 @@ private System.Windows.Forms.TextBox txtIP6; private System.Windows.Forms.TextBox txtIP5; private System.Windows.Forms.TextBox txtIP4; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.TextBox txtIP8; + private System.Windows.Forms.TextBox txtIP7; } } diff --git a/ClientForWEDS/Form1.cs b/ClientForWEDS/Form1.cs index ed5c730..d42a445 100644 --- a/ClientForWEDS/Form1.cs +++ b/ClientForWEDS/Form1.cs @@ -40,6 +40,8 @@ namespace ClientForWEDS { txtIP4.Text = ConfigUtil.IP4; txtIP5.Text = ConfigUtil.IP5; txtIP6.Text = ConfigUtil.IP6; + txtIP7.Text = ConfigUtil.IP7; + txtIP8.Text = ConfigUtil.IP8; txtTimeout.Text = ConfigUtil.Timeout; nudPort.Text = ConfigUtil.Port; txtReciveZDPath.Text = ConfigUtil.ZDPath; @@ -372,7 +374,10 @@ namespace ClientForWEDS { ipList.Add(txtIP5.Text); if (txtIP6.Text.Length > 0) ipList.Add(txtIP6.Text); - + if (txtIP7.Text.Length > 0) + ipList.Add(txtIP7.Text); + if (txtIP8.Text.Length > 0) + ipList.Add(txtIP8.Text); _zdPath = txtReciveZDPath.Text.Trim(); on_off = false; ma.Set(); @@ -403,6 +408,8 @@ namespace ClientForWEDS { nutFile.SetValue(ConfigUtil.ConfigItem.IP4, txtIP4.Text.Trim()); nutFile.SetValue(ConfigUtil.ConfigItem.IP5, txtIP5.Text.Trim()); nutFile.SetValue(ConfigUtil.ConfigItem.IP6, txtIP6.Text.Trim()); + nutFile.SetValue(ConfigUtil.ConfigItem.IP7, txtIP7.Text.Trim()); + nutFile.SetValue(ConfigUtil.ConfigItem.IP8, txtIP8.Text.Trim()); nutFile.SetValue(ConfigUtil.ConfigItem.Port, nudPort.Text.Trim()); nutFile.SetValue(ConfigUtil.ConfigItem.Timeout, txtTimeout.Text.Trim()); @@ -549,9 +556,5 @@ namespace ClientForWEDS { textBox1.Text = openFileDialogDangAn.FileName; } } - - private void btntpRecive_Click(object sender, EventArgs e) { - - } } }