Browse Source

IP地址 从6个增加到8个

master
yibo 7 years ago
parent
commit
3623bcfea4
3 changed files with 120 additions and 68 deletions
  1. +7
    -1
      ClientForWEDS/ConfigUtil.cs
  2. +105
    -62
      ClientForWEDS/Form1.Designer.cs
  3. +8
    -5
      ClientForWEDS/Form1.cs

+ 7
- 1
ClientForWEDS/ConfigUtil.cs View File

@ -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";


+ 105
- 62
ClientForWEDS/Form1.Designer.cs View File

@ -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;
}
}


+ 8
- 5
ClientForWEDS/Form1.cs View File

@ -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) {
}
}
}

Loading…
Cancel
Save