1023
nodyang@aliyun.com 1 week ago
parent 6ee596983b
commit b5da282858

@ -44,6 +44,7 @@
this.btnMain = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.btnShow = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.panel6.SuspendLayout();
this.panel7.SuspendLayout();
@ -105,6 +106,7 @@
// panel8
//
this.panel8.BackColor = System.Drawing.Color.Transparent;
this.panel8.Controls.Add(this.btnShow);
this.panel8.Controls.Add(this.button4);
this.panel8.Controls.Add(this.button3);
this.panel8.Controls.Add(this.btnMes);
@ -150,10 +152,10 @@
this.btnMes.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.btnMes.Font = new System.Drawing.Font("宋体", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMes.ForeColor = System.Drawing.SystemColors.Window;
this.btnMes.Location = new System.Drawing.Point(22, 400);
this.btnMes.Location = new System.Drawing.Point(22, 304);
this.btnMes.Margin = new System.Windows.Forms.Padding(4);
this.btnMes.Name = "btnMes";
this.btnMes.Size = new System.Drawing.Size(300, 87);
this.btnMes.Size = new System.Drawing.Size(300, 50);
this.btnMes.TabIndex = 4;
this.btnMes.Text = "生产计划";
this.btnMes.UseVisualStyleBackColor = false;
@ -164,10 +166,10 @@
this.btnAccount.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.btnAccount.Font = new System.Drawing.Font("宋体", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAccount.ForeColor = System.Drawing.SystemColors.Window;
this.btnAccount.Location = new System.Drawing.Point(22, 305);
this.btnAccount.Location = new System.Drawing.Point(22, 246);
this.btnAccount.Margin = new System.Windows.Forms.Padding(4);
this.btnAccount.Name = "btnAccount";
this.btnAccount.Size = new System.Drawing.Size(300, 87);
this.btnAccount.Size = new System.Drawing.Size(300, 50);
this.btnAccount.TabIndex = 3;
this.btnAccount.Text = "账户管理";
this.btnAccount.UseVisualStyleBackColor = false;
@ -179,10 +181,10 @@
this.btnAlarm.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.btnAlarm.Font = new System.Drawing.Font("宋体", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAlarm.ForeColor = System.Drawing.SystemColors.Window;
this.btnAlarm.Location = new System.Drawing.Point(22, 210);
this.btnAlarm.Location = new System.Drawing.Point(22, 188);
this.btnAlarm.Margin = new System.Windows.Forms.Padding(4);
this.btnAlarm.Name = "btnAlarm";
this.btnAlarm.Size = new System.Drawing.Size(300, 87);
this.btnAlarm.Size = new System.Drawing.Size(300, 50);
this.btnAlarm.TabIndex = 3;
this.btnAlarm.Text = "报警记录";
this.btnAlarm.UseVisualStyleBackColor = false;
@ -207,10 +209,10 @@
this.btnArgument.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.btnArgument.Font = new System.Drawing.Font("宋体", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnArgument.ForeColor = System.Drawing.SystemColors.Window;
this.btnArgument.Location = new System.Drawing.Point(22, 115);
this.btnArgument.Location = new System.Drawing.Point(22, 130);
this.btnArgument.Margin = new System.Windows.Forms.Padding(4);
this.btnArgument.Name = "btnArgument";
this.btnArgument.Size = new System.Drawing.Size(300, 87);
this.btnArgument.Size = new System.Drawing.Size(300, 50);
this.btnArgument.TabIndex = 1;
this.btnArgument.Text = "参数界面";
this.btnArgument.UseVisualStyleBackColor = false;
@ -222,10 +224,10 @@
this.btnMain.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.btnMain.Font = new System.Drawing.Font("宋体", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMain.ForeColor = System.Drawing.SystemColors.Window;
this.btnMain.Location = new System.Drawing.Point(22, 17);
this.btnMain.Location = new System.Drawing.Point(22, 72);
this.btnMain.Margin = new System.Windows.Forms.Padding(4);
this.btnMain.Name = "btnMain";
this.btnMain.Size = new System.Drawing.Size(300, 90);
this.btnMain.Size = new System.Drawing.Size(300, 50);
this.btnMain.TabIndex = 0;
this.btnMain.Text = "首页";
this.btnMain.UseVisualStyleBackColor = false;
@ -255,6 +257,21 @@
this.label1.TabIndex = 0;
this.label1.Text = "佳通RFID层合裁切设备";
//
// btnShow
//
this.btnShow.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(182)))), ((int)(((byte)(173)))));
this.btnShow.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.btnShow.Font = new System.Drawing.Font("宋体", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnShow.ForeColor = System.Drawing.SystemColors.Window;
this.btnShow.Location = new System.Drawing.Point(22, 14);
this.btnShow.Margin = new System.Windows.Forms.Padding(4);
this.btnShow.Name = "btnShow";
this.btnShow.Size = new System.Drawing.Size(300, 50);
this.btnShow.TabIndex = 7;
this.btnShow.Text = "总览图";
this.btnShow.UseVisualStyleBackColor = false;
this.btnShow.Click += new System.EventHandler(this.btnShow_Click);
//
// FormMain
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@ -289,5 +306,6 @@
private System.Windows.Forms.Panel panel9;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnShow;
}
}

@ -29,6 +29,7 @@ namespace RfidWeb
private ILogNet logNet = ILogNetFactory.GetLogNet;
private ICache cache;
TimerX _timer;
List<Button> buttons=new List<Button>();
public FormMain()
{
cache=Cache.Default;
@ -37,16 +38,16 @@ namespace RfidWeb
var rfidSetting = RfidSetting.Current;
InitializeComponent();
if (this.FormBorderStyle == FormBorderStyle.None)
{
this.FormBorderStyle = FormBorderStyle.FixedSingle;
this.WindowState = FormWindowState.Normal;
}
else
{
this.FormBorderStyle = FormBorderStyle.None;
this.WindowState = FormWindowState.Maximized;
}
//if (this.FormBorderStyle == FormBorderStyle.None)
//{
// this.FormBorderStyle = FormBorderStyle.FixedSingle;
// this.WindowState = FormWindowState.Normal;
//}
//else
//{
// this.FormBorderStyle = FormBorderStyle.None;
// this.WindowState = FormWindowState.Maximized;
//}
Init();
}
@ -61,10 +62,15 @@ namespace RfidWeb
};
logNet.ConsoleOutput = true;
logNet.WriteInfo("nihao");
buttons.Clear();
buttons.Add(btnShow);
buttons.Add(btnMain);
buttons.Add(btnArgument);
buttons.Add(btnAlarm);
buttons.Add(btnAccount);
buttons.Add(btnMes);
this.panContent.Controls.Clear();
this.panContent.Controls.Add(new UserAlarmShow());
btnShow_Click(new object(), new EventArgs());
}
@ -195,5 +201,30 @@ namespace RfidWeb
}
Color checkColor = System.Drawing.Color.FromArgb(168, 188, 195);
Color defaultColor = System.Drawing.Color.FromArgb(21, 181, 173);
private void CheckButton(Button btn)
{
foreach (var bt in buttons)
{
if (bt.BackColor != defaultColor)
{
bt.BackColor = defaultColor;
}
}
btn.BackColor = checkColor;
}
private void btnShow_Click(object sender, EventArgs e)
{
panContent.Controls.Clear();
panContent.Controls.Add(new UserAlarmShow());
CheckButton(btnShow);
}
}
}

Loading…
Cancel
Save