Commit 08b4fe05 by 任天宇

怎么登录状态显示

parent ec6dd993
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
this.tbxUserName = new System.Windows.Forms.TextBox(); this.tbxUserName = new System.Windows.Forms.TextBox();
this.plToolBar = new System.Windows.Forms.Panel(); this.plToolBar = new System.Windows.Forms.Panel();
this.gbTools = new System.Windows.Forms.GroupBox(); this.gbTools = new System.Windows.Forms.GroupBox();
this.ckbAutoCreatePackage = new System.Windows.Forms.CheckBox();
this.lbTips = new System.Windows.Forms.Label(); this.lbTips = new System.Windows.Forms.Label();
this.lbScanSample = new System.Windows.Forms.Label(); this.lbScanSample = new System.Windows.Forms.Label();
this.tbScanSample = new System.Windows.Forms.TextBox(); this.tbScanSample = new System.Windows.Forms.TextBox();
...@@ -71,7 +72,7 @@ ...@@ -71,7 +72,7 @@
this.SampleDeadTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.SampleDeadTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.SampleQuantityUnit = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.SampleQuantityUnit = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.SamplePackageName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.SamplePackageName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ckbAutoCreatePackage = new System.Windows.Forms.CheckBox(); this.lbLogStatus = new System.Windows.Forms.Label();
this.plLeft.SuspendLayout(); this.plLeft.SuspendLayout();
this.gbInfo.SuspendLayout(); this.gbInfo.SuspendLayout();
this.gbLogin.SuspendLayout(); this.gbLogin.SuspendLayout();
...@@ -103,9 +104,9 @@ ...@@ -103,9 +104,9 @@
this.gbInfo.Controls.Add(this.tbCurrentLocation); this.gbInfo.Controls.Add(this.tbCurrentLocation);
this.gbInfo.Controls.Add(this.tbCurrentDepartment); this.gbInfo.Controls.Add(this.tbCurrentDepartment);
this.gbInfo.Dock = System.Windows.Forms.DockStyle.Fill; this.gbInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.gbInfo.Location = new System.Drawing.Point(0, 316); this.gbInfo.Location = new System.Drawing.Point(0, 346);
this.gbInfo.Name = "gbInfo"; this.gbInfo.Name = "gbInfo";
this.gbInfo.Size = new System.Drawing.Size(265, 343); this.gbInfo.Size = new System.Drawing.Size(265, 313);
this.gbInfo.TabIndex = 1; this.gbInfo.TabIndex = 1;
this.gbInfo.TabStop = false; this.gbInfo.TabStop = false;
this.gbInfo.Text = "信息"; this.gbInfo.Text = "信息";
...@@ -116,7 +117,7 @@ ...@@ -116,7 +117,7 @@
this.lbCurrentPackageNode.Font = new System.Drawing.Font("宋体", 12F); this.lbCurrentPackageNode.Font = new System.Drawing.Font("宋体", 12F);
this.lbCurrentPackageNode.Location = new System.Drawing.Point(16, 180); this.lbCurrentPackageNode.Location = new System.Drawing.Point(16, 180);
this.lbCurrentPackageNode.Name = "lbCurrentPackageNode"; this.lbCurrentPackageNode.Name = "lbCurrentPackageNode";
this.lbCurrentPackageNode.Size = new System.Drawing.Size(79, 16); this.lbCurrentPackageNode.Size = new System.Drawing.Size(80, 16);
this.lbCurrentPackageNode.TabIndex = 7; this.lbCurrentPackageNode.TabIndex = 7;
this.lbCurrentPackageNode.Text = "当前袋子:"; this.lbCurrentPackageNode.Text = "当前袋子:";
// //
...@@ -126,7 +127,7 @@ ...@@ -126,7 +127,7 @@
this.lbCurrentPackage.Font = new System.Drawing.Font("宋体", 12F); this.lbCurrentPackage.Font = new System.Drawing.Font("宋体", 12F);
this.lbCurrentPackage.Location = new System.Drawing.Point(16, 127); this.lbCurrentPackage.Location = new System.Drawing.Point(16, 127);
this.lbCurrentPackage.Name = "lbCurrentPackage"; this.lbCurrentPackage.Name = "lbCurrentPackage";
this.lbCurrentPackage.Size = new System.Drawing.Size(79, 16); this.lbCurrentPackage.Size = new System.Drawing.Size(80, 16);
this.lbCurrentPackage.TabIndex = 6; this.lbCurrentPackage.TabIndex = 6;
this.lbCurrentPackage.Text = "当前箱号:"; this.lbCurrentPackage.Text = "当前箱号:";
// //
...@@ -136,7 +137,7 @@ ...@@ -136,7 +137,7 @@
this.lbCurrentLocation.Font = new System.Drawing.Font("宋体", 12F); this.lbCurrentLocation.Font = new System.Drawing.Font("宋体", 12F);
this.lbCurrentLocation.Location = new System.Drawing.Point(16, 74); this.lbCurrentLocation.Location = new System.Drawing.Point(16, 74);
this.lbCurrentLocation.Name = "lbCurrentLocation"; this.lbCurrentLocation.Name = "lbCurrentLocation";
this.lbCurrentLocation.Size = new System.Drawing.Size(79, 16); this.lbCurrentLocation.Size = new System.Drawing.Size(80, 16);
this.lbCurrentLocation.TabIndex = 5; this.lbCurrentLocation.TabIndex = 5;
this.lbCurrentLocation.Text = "当前位置:"; this.lbCurrentLocation.Text = "当前位置:";
// //
...@@ -146,7 +147,7 @@ ...@@ -146,7 +147,7 @@
this.lbCurrentDepartment.Font = new System.Drawing.Font("宋体", 12F); this.lbCurrentDepartment.Font = new System.Drawing.Font("宋体", 12F);
this.lbCurrentDepartment.Location = new System.Drawing.Point(16, 21); this.lbCurrentDepartment.Location = new System.Drawing.Point(16, 21);
this.lbCurrentDepartment.Name = "lbCurrentDepartment"; this.lbCurrentDepartment.Name = "lbCurrentDepartment";
this.lbCurrentDepartment.Size = new System.Drawing.Size(79, 16); this.lbCurrentDepartment.Size = new System.Drawing.Size(80, 16);
this.lbCurrentDepartment.TabIndex = 4; this.lbCurrentDepartment.TabIndex = 4;
this.lbCurrentDepartment.Text = "当前部门:"; this.lbCurrentDepartment.Text = "当前部门:";
// //
...@@ -192,6 +193,7 @@ ...@@ -192,6 +193,7 @@
// //
// gbLogin // gbLogin
// //
this.gbLogin.Controls.Add(this.lbLogStatus);
this.gbLogin.Controls.Add(this.btnLogout); this.gbLogin.Controls.Add(this.btnLogout);
this.gbLogin.Controls.Add(this.btnLogin); this.gbLogin.Controls.Add(this.btnLogin);
this.gbLogin.Controls.Add(this.lblUrl); this.gbLogin.Controls.Add(this.lblUrl);
...@@ -203,7 +205,7 @@ ...@@ -203,7 +205,7 @@
this.gbLogin.Dock = System.Windows.Forms.DockStyle.Top; this.gbLogin.Dock = System.Windows.Forms.DockStyle.Top;
this.gbLogin.Location = new System.Drawing.Point(0, 0); this.gbLogin.Location = new System.Drawing.Point(0, 0);
this.gbLogin.Name = "gbLogin"; this.gbLogin.Name = "gbLogin";
this.gbLogin.Size = new System.Drawing.Size(265, 316); this.gbLogin.Size = new System.Drawing.Size(265, 346);
this.gbLogin.TabIndex = 0; this.gbLogin.TabIndex = 0;
this.gbLogin.TabStop = false; this.gbLogin.TabStop = false;
this.gbLogin.Text = "登录"; this.gbLogin.Text = "登录";
...@@ -213,7 +215,7 @@ ...@@ -213,7 +215,7 @@
this.btnLogout.BackColor = System.Drawing.Color.LavenderBlush; this.btnLogout.BackColor = System.Drawing.Color.LavenderBlush;
this.btnLogout.Font = new System.Drawing.Font("宋体", 15F); this.btnLogout.Font = new System.Drawing.Font("宋体", 15F);
this.btnLogout.ForeColor = System.Drawing.Color.Crimson; this.btnLogout.ForeColor = System.Drawing.Color.Crimson;
this.btnLogout.Location = new System.Drawing.Point(135, 267); this.btnLogout.Location = new System.Drawing.Point(131, 288);
this.btnLogout.Name = "btnLogout"; this.btnLogout.Name = "btnLogout";
this.btnLogout.Size = new System.Drawing.Size(107, 43); this.btnLogout.Size = new System.Drawing.Size(107, 43);
this.btnLogout.TabIndex = 28; this.btnLogout.TabIndex = 28;
...@@ -226,7 +228,7 @@ ...@@ -226,7 +228,7 @@
this.btnLogin.BackColor = System.Drawing.Color.MintCream; this.btnLogin.BackColor = System.Drawing.Color.MintCream;
this.btnLogin.Font = new System.Drawing.Font("宋体", 15F); this.btnLogin.Font = new System.Drawing.Font("宋体", 15F);
this.btnLogin.ForeColor = System.Drawing.Color.DarkGreen; this.btnLogin.ForeColor = System.Drawing.Color.DarkGreen;
this.btnLogin.Location = new System.Drawing.Point(16, 267); this.btnLogin.Location = new System.Drawing.Point(12, 288);
this.btnLogin.Name = "btnLogin"; this.btnLogin.Name = "btnLogin";
this.btnLogin.Size = new System.Drawing.Size(107, 43); this.btnLogin.Size = new System.Drawing.Size(107, 43);
this.btnLogin.TabIndex = 27; this.btnLogin.TabIndex = 27;
...@@ -320,6 +322,18 @@ ...@@ -320,6 +322,18 @@
this.gbTools.TabStop = false; this.gbTools.TabStop = false;
this.gbTools.Text = "操作台"; this.gbTools.Text = "操作台";
// //
// ckbAutoCreatePackage
//
this.ckbAutoCreatePackage.AutoSize = true;
this.ckbAutoCreatePackage.Checked = true;
this.ckbAutoCreatePackage.CheckState = System.Windows.Forms.CheckState.Checked;
this.ckbAutoCreatePackage.Location = new System.Drawing.Point(196, 41);
this.ckbAutoCreatePackage.Name = "ckbAutoCreatePackage";
this.ckbAutoCreatePackage.Size = new System.Drawing.Size(72, 16);
this.ckbAutoCreatePackage.TabIndex = 81;
this.ckbAutoCreatePackage.Text = "创建箱号";
this.ckbAutoCreatePackage.UseVisualStyleBackColor = true;
//
// lbTips // lbTips
// //
this.lbTips.AutoSize = true; this.lbTips.AutoSize = true;
...@@ -542,17 +556,16 @@ ...@@ -542,17 +556,16 @@
this.SamplePackageName.ReadOnly = true; this.SamplePackageName.ReadOnly = true;
this.SamplePackageName.Width = 120; this.SamplePackageName.Width = 120;
// //
// ckbAutoCreatePackage // lbLogStatus
// //
this.ckbAutoCreatePackage.AutoSize = true; this.lbLogStatus.AutoSize = true;
this.ckbAutoCreatePackage.Checked = true; this.lbLogStatus.Font = new System.Drawing.Font("宋体", 25F);
this.ckbAutoCreatePackage.CheckState = System.Windows.Forms.CheckState.Checked; this.lbLogStatus.ForeColor = System.Drawing.Color.Red;
this.ckbAutoCreatePackage.Location = new System.Drawing.Point(196, 41); this.lbLogStatus.Location = new System.Drawing.Point(12, 242);
this.ckbAutoCreatePackage.Name = "ckbAutoCreatePackage"; this.lbLogStatus.Name = "lbLogStatus";
this.ckbAutoCreatePackage.Size = new System.Drawing.Size(72, 16); this.lbLogStatus.Size = new System.Drawing.Size(117, 34);
this.ckbAutoCreatePackage.TabIndex = 81; this.lbLogStatus.TabIndex = 29;
this.ckbAutoCreatePackage.Text = "创建箱号"; this.lbLogStatus.Text = "未登录";
this.ckbAutoCreatePackage.UseVisualStyleBackColor = true;
// //
// FrmMain // FrmMain
// //
...@@ -625,6 +638,7 @@ ...@@ -625,6 +638,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn SampleQuantityUnit; private System.Windows.Forms.DataGridViewTextBoxColumn SampleQuantityUnit;
private System.Windows.Forms.DataGridViewTextBoxColumn SamplePackageName; private System.Windows.Forms.DataGridViewTextBoxColumn SamplePackageName;
private System.Windows.Forms.CheckBox ckbAutoCreatePackage; private System.Windows.Forms.CheckBox ckbAutoCreatePackage;
private System.Windows.Forms.Label lbLogStatus;
} }
} }
...@@ -510,6 +510,8 @@ namespace Kivii.Client.SamplePackages ...@@ -510,6 +510,8 @@ namespace Kivii.Client.SamplePackages
tbxServiceUrl.Enabled = btnLogin.Enabled; tbxServiceUrl.Enabled = btnLogin.Enabled;
tbxUserName.Enabled = btnLogin.Enabled; tbxUserName.Enabled = btnLogin.Enabled;
tbxPassword.Enabled = btnLogin.Enabled; tbxPassword.Enabled = btnLogin.Enabled;
lbLogStatus.Text = "登录成功";
lbLogStatus.ForeColor = Color.Green;
//tbSetCurrentPackage.Enabled = !btnLogin.Enabled; //tbSetCurrentPackage.Enabled = !btnLogin.Enabled;
setDefault(tbxServiceUrl, tbxUserName, tbxPassword); setDefault(tbxServiceUrl, tbxUserName, tbxPassword);
}, true); }, true);
...@@ -536,6 +538,8 @@ namespace Kivii.Client.SamplePackages ...@@ -536,6 +538,8 @@ namespace Kivii.Client.SamplePackages
task.Success(resp => task.Success(resp =>
{ {
initControls(); initControls();
lbLogStatus.Text = "未登录";
lbLogStatus.ForeColor = Color.Red;
_client.Dispose(); _client.Dispose();
_client = null; _client = null;
initUserInfo(); initUserInfo();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment