Commit ecc9183d authored by tr's avatar tr

1、审核样例:节点渲染优化-增加激活颜色

parent f62737b4
......@@ -100,7 +100,7 @@ namespace Tools.MyCommon.controls
node.DataSource = dr;
node.Index = index;
node.AuditStateChanged += Audit_AuditStateChanged;
node.Location = new Point(0, index * 155);
node.Location = new Point(10, index * (node.Height + 5)); //距左边框10像素。间隔5像素
node.Parent = this.NodeHome;
this.NodeList.Add(node);
......
......@@ -48,6 +48,7 @@
//
// panel1
//
this.panel1.BackColor = System.Drawing.SystemColors.Window;
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.lbAuditUser);
this.panel1.Controls.Add(this.label8);
......@@ -66,13 +67,13 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(419, 153);
this.panel1.Size = new System.Drawing.Size(411, 134);
this.panel1.TabIndex = 0;
//
// lbAuditUser
//
this.lbAuditUser.AutoSize = true;
this.lbAuditUser.Location = new System.Drawing.Point(285, 40);
this.lbAuditUser.Location = new System.Drawing.Point(279, 36);
this.lbAuditUser.Name = "lbAuditUser";
this.lbAuditUser.Size = new System.Drawing.Size(41, 12);
this.lbAuditUser.TabIndex = 14;
......@@ -81,7 +82,7 @@
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(214, 40);
this.label8.Location = new System.Drawing.Point(208, 36);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(65, 12);
this.label8.TabIndex = 13;
......@@ -90,16 +91,17 @@
// tbAuditRemark
//
this.tbAuditRemark.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbAuditRemark.Location = new System.Drawing.Point(88, 65);
this.tbAuditRemark.Location = new System.Drawing.Point(83, 60);
this.tbAuditRemark.Multiline = true;
this.tbAuditRemark.Name = "tbAuditRemark";
this.tbAuditRemark.Size = new System.Drawing.Size(316, 56);
this.tbAuditRemark.Size = new System.Drawing.Size(315, 41);
this.tbAuditRemark.TabIndex = 12;
this.tbAuditRemark.Text = "#备注\r\n#备注\r\n#备注";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(16, 65);
this.label7.Location = new System.Drawing.Point(10, 60);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(65, 12);
this.label7.TabIndex = 11;
......@@ -108,7 +110,7 @@
// rbRevert
//
this.rbRevert.AutoSize = true;
this.rbRevert.Location = new System.Drawing.Point(357, 127);
this.rbRevert.Location = new System.Drawing.Point(351, 107);
this.rbRevert.Name = "rbRevert";
this.rbRevert.Size = new System.Drawing.Size(47, 16);
this.rbRevert.TabIndex = 10;
......@@ -119,7 +121,7 @@
// rbNoPass
//
this.rbNoPass.AutoSize = true;
this.rbNoPass.Location = new System.Drawing.Point(292, 127);
this.rbNoPass.Location = new System.Drawing.Point(286, 107);
this.rbNoPass.Name = "rbNoPass";
this.rbNoPass.Size = new System.Drawing.Size(59, 16);
this.rbNoPass.TabIndex = 9;
......@@ -130,7 +132,7 @@
// rbPass
//
this.rbPass.AutoSize = true;
this.rbPass.Location = new System.Drawing.Point(227, 127);
this.rbPass.Location = new System.Drawing.Point(221, 107);
this.rbPass.Name = "rbPass";
this.rbPass.Size = new System.Drawing.Size(47, 16);
this.rbPass.TabIndex = 8;
......@@ -141,7 +143,7 @@
// rbInit
//
this.rbInit.AutoSize = true;
this.rbInit.Location = new System.Drawing.Point(156, 127);
this.rbInit.Location = new System.Drawing.Point(150, 107);
this.rbInit.Name = "rbInit";
this.rbInit.Size = new System.Drawing.Size(47, 16);
this.rbInit.TabIndex = 6;
......@@ -152,7 +154,7 @@
// lbAuditDateTime
//
this.lbAuditDateTime.AutoSize = true;
this.lbAuditDateTime.Location = new System.Drawing.Point(285, 17);
this.lbAuditDateTime.Location = new System.Drawing.Point(279, 12);
this.lbAuditDateTime.Name = "lbAuditDateTime";
this.lbAuditDateTime.Size = new System.Drawing.Size(119, 12);
this.lbAuditDateTime.TabIndex = 5;
......@@ -161,7 +163,7 @@
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(214, 17);
this.label5.Location = new System.Drawing.Point(208, 12);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(65, 12);
this.label5.TabIndex = 4;
......@@ -170,7 +172,7 @@
// lbAuditState
//
this.lbAuditState.AutoSize = true;
this.lbAuditState.Location = new System.Drawing.Point(87, 17);
this.lbAuditState.Location = new System.Drawing.Point(81, 12);
this.lbAuditState.Name = "lbAuditState";
this.lbAuditState.Size = new System.Drawing.Size(29, 12);
this.lbAuditState.TabIndex = 3;
......@@ -179,7 +181,7 @@
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(16, 40);
this.label3.Location = new System.Drawing.Point(10, 36);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(65, 12);
this.label3.TabIndex = 2;
......@@ -188,7 +190,7 @@
// lbWaitAuditUser
//
this.lbWaitAuditUser.AutoSize = true;
this.lbWaitAuditUser.Location = new System.Drawing.Point(87, 40);
this.lbWaitAuditUser.Location = new System.Drawing.Point(80, 36);
this.lbWaitAuditUser.Name = "lbWaitAuditUser";
this.lbWaitAuditUser.Size = new System.Drawing.Size(41, 12);
this.lbWaitAuditUser.TabIndex = 1;
......@@ -197,19 +199,19 @@
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(16, 17);
this.label1.Location = new System.Drawing.Point(10, 12);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 12);
this.label1.TabIndex = 0;
this.label1.Text = "审核状态:";
//
// ucAudit
// ucAuditNode
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.panel1);
this.Name = "ucAudit";
this.Size = new System.Drawing.Size(419, 153);
this.Name = "ucAuditNode";
this.Size = new System.Drawing.Size(411, 134);
this.Load += new System.EventHandler(this.ucAudit_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
......
......@@ -168,8 +168,18 @@ namespace Tools.MyCommon.controls
/// </summary>
private void SetEnabled()
{
this.Enabled = this.IsActive && this.WaitAuditUser.IndexOf($";{Utils.LoginUser};") >= 0;
this.tbAuditRemark.Enabled = this.Enabled && this.IsWaitAudit;
bool IsEnabled = this.IsActive && this.WaitAuditUser.IndexOf($";{Utils.LoginUser};") >= 0;
//设定有效性
this.Enabled = IsEnabled;
this.tbAuditRemark.Enabled = IsEnabled && this.IsWaitAudit;
//设定样式
this.panel1.BackColor = IsEnabled ? Color.SkyBlue : Color.White;
this.tbAuditRemark.BorderStyle = IsEnabled ? BorderStyle.FixedSingle : BorderStyle.Fixed3D;
//焦点处理
if (IsEnabled)
{
this.tbAuditRemark.Focus();
}
}
/// <summary>
/// 设置审批信息
......
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