diff --git a/RfidWeb/Frm/UserMain.Designer.cs b/RfidWeb/Frm/UserMain.Designer.cs new file mode 100644 index 0000000..04b38d1 --- /dev/null +++ b/RfidWeb/Frm/UserMain.Designer.cs @@ -0,0 +1,258 @@ +namespace RfidWeb.Frm +{ + partial class UserMain + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.panel2 = new System.Windows.Forms.Panel(); + this.label17 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.panel2.SuspendLayout(); + this.SuspendLayout(); + // + // panel2 + // + this.panel2.BackColor = System.Drawing.Color.RosyBrown; + this.panel2.Controls.Add(this.label17); + this.panel2.Controls.Add(this.label15); + this.panel2.Controls.Add(this.label16); + this.panel2.Controls.Add(this.label13); + this.panel2.Controls.Add(this.label14); + this.panel2.Controls.Add(this.label11); + this.panel2.Controls.Add(this.label12); + this.panel2.Controls.Add(this.label9); + this.panel2.Controls.Add(this.label10); + this.panel2.Controls.Add(this.label5); + this.panel2.Controls.Add(this.label6); + this.panel2.Controls.Add(this.label7); + this.panel2.Controls.Add(this.label8); + this.panel2.Dock = System.Windows.Forms.DockStyle.Top; + this.panel2.Location = new System.Drawing.Point(0, 0); + this.panel2.Margin = new System.Windows.Forms.Padding(2); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(615, 55); + this.panel2.TabIndex = 5; + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Font = new System.Drawing.Font("宋体", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.Location = new System.Drawing.Point(441, 34); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(11, 11); + this.label17.TabIndex = 12; + this.label17.Text = "0"; + this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.Location = new System.Drawing.Point(649, 65); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(21, 22); + this.label15.TabIndex = 11; + this.label15.Text = "0"; + this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Font = new System.Drawing.Font("宋体", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.Location = new System.Drawing.Point(412, 17); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(61, 11); + this.label16.TabIndex = 10; + this.label16.Text = "2#裁刀温度"; + this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("宋体", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label13.Location = new System.Drawing.Point(327, 33); + this.label13.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(11, 11); + this.label13.TabIndex = 9; + this.label13.Text = "0"; + this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Font = new System.Drawing.Font("宋体", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.Location = new System.Drawing.Point(312, 17); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(61, 11); + this.label14.TabIndex = 8; + this.label14.Text = "1#裁刀温度"; + this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Font = new System.Drawing.Font("宋体", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.Location = new System.Drawing.Point(234, 34); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(11, 11); + this.label11.TabIndex = 7; + this.label11.Text = "0"; + this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Font = new System.Drawing.Font("宋体", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(222, 17); + this.label12.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(50, 11); + this.label12.TabIndex = 6; + this.label12.Text = "2#收料轴"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("宋体", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label9.Location = new System.Drawing.Point(170, 34); + this.label9.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(11, 11); + this.label9.TabIndex = 5; + this.label9.Text = "0"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Font = new System.Drawing.Font("宋体", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.Location = new System.Drawing.Point(155, 17); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(50, 11); + this.label10.TabIndex = 4; + this.label10.Text = "1#收料轴"; + this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("宋体", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(90, 34); + this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(11, 11); + this.label5.TabIndex = 3; + this.label5.Text = "0"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("宋体", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label6.Location = new System.Drawing.Point(76, 17); + this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(49, 11); + this.label6.TabIndex = 2; + this.label6.Text = "裁切数量"; + this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Font = new System.Drawing.Font("宋体", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(16, 34); + this.label7.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(11, 11); + this.label7.TabIndex = 1; + this.label7.Text = "0"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("宋体", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label8.Location = new System.Drawing.Point(7, 17); + this.label8.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(49, 11); + this.label8.TabIndex = 0; + this.label8.Text = "层合数量"; + this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // UserMain + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Transparent; + this.Controls.Add(this.panel2); + this.Name = "UserMain"; + this.Size = new System.Drawing.Size(615, 616); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label8; + } +} diff --git a/RfidWeb/Frm/UserMain.cs b/RfidWeb/Frm/UserMain.cs new file mode 100644 index 0000000..eff546b --- /dev/null +++ b/RfidWeb/Frm/UserMain.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace RfidWeb.Frm +{ + public partial class UserMain : UserControl + { + public UserMain() + { + InitializeComponent(); + } + } +} diff --git a/RfidWeb/Frm/UserMain.resx b/RfidWeb/Frm/UserMain.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RfidWeb/Frm/UserMain.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RfidWeb/FrmMain.Designer.cs b/RfidWeb/FrmMain.Designer.cs index 7dfbb27..53567cb 100644 --- a/RfidWeb/FrmMain.Designer.cs +++ b/RfidWeb/FrmMain.Designer.cs @@ -28,21 +28,337 @@ /// private void InitializeComponent() { + this.panel1 = new System.Windows.Forms.Panel(); + this.panel222 = new System.Windows.Forms.Panel(); + this.panel7 = new System.Windows.Forms.Panel(); + this.panel8 = new System.Windows.Forms.Panel(); + this.button4 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.btnMes = new System.Windows.Forms.Button(); + this.btnAccount = new System.Windows.Forms.Button(); + this.btnAlarm = new System.Windows.Forms.Button(); + this.btnExit = new System.Windows.Forms.Button(); + this.btnArgument = new System.Windows.Forms.Button(); + this.btnMain = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.panel2 = new System.Windows.Forms.Panel(); + this.panel4 = new System.Windows.Forms.Panel(); + this.panel5 = new System.Windows.Forms.Panel(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.panel3 = new System.Windows.Forms.Panel(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.panel6 = new System.Windows.Forms.Panel(); + this.panel1.SuspendLayout(); + this.panel222.SuspendLayout(); + this.panel7.SuspendLayout(); + this.panel8.SuspendLayout(); + this.panel2.SuspendLayout(); + this.panel5.SuspendLayout(); + this.panel3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // + // panel1 + // + this.panel1.Controls.Add(this.panel222); + this.panel1.Controls.Add(this.panel2); + 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(856, 670); + this.panel1.TabIndex = 0; + // + // panel222 + // + this.panel222.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel222.Controls.Add(this.panel6); + this.panel222.Controls.Add(this.panel7); + this.panel222.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel222.Font = new System.Drawing.Font("宋体", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.panel222.Location = new System.Drawing.Point(0, 54); + this.panel222.Name = "panel222"; + this.panel222.Size = new System.Drawing.Size(856, 616); + this.panel222.TabIndex = 1; + // + // panel7 + // + this.panel7.BackColor = System.Drawing.Color.Transparent; + this.panel7.Controls.Add(this.panel8); + this.panel7.Controls.Add(this.button2); + this.panel7.Controls.Add(this.button1); + this.panel7.Dock = System.Windows.Forms.DockStyle.Left; + this.panel7.Location = new System.Drawing.Point(0, 0); + this.panel7.Name = "panel7"; + this.panel7.Size = new System.Drawing.Size(241, 616); + this.panel7.TabIndex = 0; + // + // panel8 + // + this.panel8.BackColor = System.Drawing.Color.Transparent; + this.panel8.Controls.Add(this.button4); + this.panel8.Controls.Add(this.button3); + this.panel8.Controls.Add(this.btnMes); + this.panel8.Controls.Add(this.btnAccount); + this.panel8.Controls.Add(this.btnAlarm); + this.panel8.Controls.Add(this.btnExit); + this.panel8.Controls.Add(this.btnArgument); + this.panel8.Controls.Add(this.btnMain); + this.panel8.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel8.Location = new System.Drawing.Point(0, 0); + this.panel8.Name = "panel8"; + this.panel8.Size = new System.Drawing.Size(241, 616); + this.panel8.TabIndex = 2; + // + // button4 + // + this.button4.BackgroundImage = global::RfidWeb.Properties.Resources.照明关; + this.button4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button4.Font = new System.Drawing.Font("宋体", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button4.Location = new System.Drawing.Point(21, 550); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(112, 106); + this.button4.TabIndex = 6; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click_1); + // + // button3 + // + this.button3.BackgroundImage = global::RfidWeb.Properties.Resources.消音开; + this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.button3.Font = new System.Drawing.Font("宋体", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button3.Location = new System.Drawing.Point(21, 463); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(200, 58); + this.button3.TabIndex = 5; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click_1); + // + // btnMes + // + this.btnMes.BackgroundImage = global::RfidWeb.Properties.Resources.btn; + 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.Location = new System.Drawing.Point(21, 374); + this.btnMes.Name = "btnMes"; + this.btnMes.Size = new System.Drawing.Size(200, 58); + this.btnMes.TabIndex = 4; + this.btnMes.Text = "生产计划"; + this.btnMes.UseVisualStyleBackColor = true; + // + // btnAccount + // + this.btnAccount.BackgroundImage = global::RfidWeb.Properties.Resources.btn; + 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.Location = new System.Drawing.Point(21, 291); + this.btnAccount.Name = "btnAccount"; + this.btnAccount.Size = new System.Drawing.Size(200, 58); + this.btnAccount.TabIndex = 3; + this.btnAccount.Text = "账户管理"; + this.btnAccount.UseVisualStyleBackColor = true; + // + // btnAlarm + // + this.btnAlarm.BackgroundImage = global::RfidWeb.Properties.Resources.btn; + 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.Location = new System.Drawing.Point(21, 211); + this.btnAlarm.Name = "btnAlarm"; + this.btnAlarm.Size = new System.Drawing.Size(200, 58); + this.btnAlarm.TabIndex = 3; + this.btnAlarm.Text = "报警记录"; + this.btnAlarm.UseVisualStyleBackColor = true; + // + // btnExit + // + this.btnExit.BackgroundImage = global::RfidWeb.Properties.Resources.btn; + this.btnExit.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnExit.Font = new System.Drawing.Font("宋体", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnExit.Location = new System.Drawing.Point(21, 851); + this.btnExit.Name = "btnExit"; + this.btnExit.Size = new System.Drawing.Size(194, 58); + this.btnExit.TabIndex = 2; + this.btnExit.Text = "退出"; + this.btnExit.UseVisualStyleBackColor = true; + this.btnExit.Click += new System.EventHandler(this.btnExit_Click); + // + // btnArgument + // + this.btnArgument.BackgroundImage = global::RfidWeb.Properties.Resources.btn; + 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.Location = new System.Drawing.Point(21, 132); + this.btnArgument.Name = "btnArgument"; + this.btnArgument.Size = new System.Drawing.Size(200, 58); + this.btnArgument.TabIndex = 1; + this.btnArgument.Text = "参数界面"; + this.btnArgument.UseVisualStyleBackColor = true; + this.btnArgument.Click += new System.EventHandler(this.button3_Click); + // + // btnMain + // + this.btnMain.BackgroundImage = global::RfidWeb.Properties.Resources.btn_sel1; + 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.Location = new System.Drawing.Point(21, 55); + this.btnMain.Name = "btnMain"; + this.btnMain.Size = new System.Drawing.Size(200, 60); + this.btnMain.TabIndex = 0; + this.btnMain.Text = "首页"; + this.btnMain.UseVisualStyleBackColor = true; + this.btnMain.Click += new System.EventHandler(this.button4_Click); + // + // button2 + // + this.button2.Font = new System.Drawing.Font("宋体", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button2.Location = new System.Drawing.Point(44, 132); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(150, 58); + this.button2.TabIndex = 1; + this.button2.Text = "首页"; + this.button2.UseVisualStyleBackColor = true; + // + // button1 + // + this.button1.Font = new System.Drawing.Font("宋体", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button1.Location = new System.Drawing.Point(44, 55); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(150, 58); + this.button1.TabIndex = 0; + this.button1.Text = "首页"; + this.button1.UseVisualStyleBackColor = true; + // + // panel2 + // + this.panel2.BackgroundImage = global::RfidWeb.Properties.Resources.frmMain; + this.panel2.Controls.Add(this.panel4); + this.panel2.Controls.Add(this.panel5); + this.panel2.Controls.Add(this.panel3); + this.panel2.Dock = System.Windows.Forms.DockStyle.Top; + this.panel2.Location = new System.Drawing.Point(0, 0); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(856, 54); + this.panel2.TabIndex = 0; + // + // panel4 + // + this.panel4.BackColor = System.Drawing.Color.Transparent; + this.panel4.BackgroundImage = global::RfidWeb.Properties.Resources.frm21; + this.panel4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.panel4.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel4.Location = new System.Drawing.Point(377, 0); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(102, 54); + this.panel4.TabIndex = 3; + // + // panel5 + // + this.panel5.BackColor = System.Drawing.Color.Transparent; + this.panel5.Controls.Add(this.label2); + this.panel5.Controls.Add(this.label1); + this.panel5.Dock = System.Windows.Forms.DockStyle.Right; + this.panel5.Location = new System.Drawing.Point(479, 0); + this.panel5.Name = "panel5"; + this.panel5.Size = new System.Drawing.Size(377, 54); + this.panel5.TabIndex = 2; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("宋体", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.Location = new System.Drawing.Point(218, 9); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(82, 27); + this.label2.TabIndex = 1; + this.label2.Text = "10:25"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("宋体", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.Location = new System.Drawing.Point(6, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(152, 27); + this.label1.TabIndex = 0; + this.label1.Text = "2024/10/25"; + // + // panel3 + // + this.panel3.BackColor = System.Drawing.Color.Transparent; + this.panel3.Controls.Add(this.pictureBox1); + this.panel3.Dock = System.Windows.Forms.DockStyle.Left; + this.panel3.Location = new System.Drawing.Point(0, 0); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(377, 54); + this.panel3.TabIndex = 0; + // + // pictureBox1 + // + this.pictureBox1.Image = global::RfidWeb.Properties.Resources.mesnac; + this.pictureBox1.Location = new System.Drawing.Point(15, 9); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(273, 27); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBox1.TabIndex = 0; + this.pictureBox1.TabStop = false; + // + // panel6 + // + this.panel6.BackColor = System.Drawing.Color.LightCoral; + this.panel6.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel6.Location = new System.Drawing.Point(241, 0); + this.panel6.Name = "panel6"; + this.panel6.Size = new System.Drawing.Size(615, 616); + this.panel6.TabIndex = 1; + // // FrmMain // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1180, 553); - this.Margin = new System.Windows.Forms.Padding(2); + this.ClientSize = new System.Drawing.Size(856, 670); + this.Controls.Add(this.panel1); + this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.Name = "FrmMain"; this.Text = "主程序"; + this.panel1.ResumeLayout(false); + this.panel222.ResumeLayout(false); + this.panel7.ResumeLayout(false); + this.panel8.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.panel5.ResumeLayout(false); + this.panel5.PerformLayout(); + this.panel3.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); } #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Panel panel5; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Panel panel222; + private System.Windows.Forms.Panel panel7; + private System.Windows.Forms.Panel panel8; + private System.Windows.Forms.Button btnArgument; + private System.Windows.Forms.Button btnMain; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button btnExit; + private System.Windows.Forms.Button btnAlarm; + private System.Windows.Forms.Button btnMes; + private System.Windows.Forms.Button btnAccount; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.Panel panel6; } } diff --git a/RfidWeb/FrmMain.cs b/RfidWeb/FrmMain.cs index b24b9a6..8eb15f1 100644 --- a/RfidWeb/FrmMain.cs +++ b/RfidWeb/FrmMain.cs @@ -1,22 +1,20 @@ -using HslCommunication.LogNet; +using Chloe.PostgreSQL.DDL; +using Chloe.RDBMS.DDL; + +using DB; +using DB.Entity; + +using HslCommunication; +using HslCommunication.LogNet; + +using NewLife.Threading; using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Web.UI; using System.Windows.Forms; -using Chloe.PostgreSQL.DDL; -using Chloe.RDBMS.DDL; -using DB; -using DB.Entity; -using NewLife.Data; -using NewLife.Log; +using RfidWeb.Frm; using Tool; -using HslCommunication; namespace RfidWeb { @@ -24,14 +22,16 @@ namespace RfidWeb { private ILogNet logNet = ILogNetFactory.GetLogNet; + TimerX _timer; + public FrmMain() { InitializeComponent(); - - + + _timer= new TimerX(TimeState, null, 10 , 1000); // 如果所有的日志在记录之前需要在控制台显示出来 logNet.BeforeSaveToFile += (object sender, HslEventArgs e) => { @@ -43,32 +43,51 @@ namespace RfidWeb } + /// 移除过期的缓存项 + void TimeState(Object state) + { + var dataTime = DateTime.Now; + this.Invoke(() => + { + + label1.Text = dataTime.ToString("yyyy'/'MM'/'dd"); + label2.Text = dataTime.ToString("HH:mm:ss"); + }); + } + + private void Init() { - //if (this.FormBorderStyle == FormBorderStyle.None) + if (this.FormBorderStyle == FormBorderStyle.None) + { + this.FormBorderStyle = FormBorderStyle.FixedSingle; + this.WindowState = FormWindowState.Normal; + } + else + { + this.FormBorderStyle = FormBorderStyle.None; + this.WindowState = FormWindowState.Maximized; + } + + panel6.Dock = DockStyle.Fill; + this.panel6.Controls.Add(new UserMain()); + + + + //// 当前写入操作的代码 The code for the current write operation + //OperateResult write = PlcConnect.Instance.Write("A1", short.Parse("4")); + //if (write.IsSuccess) //{ - // this.FormBorderStyle = FormBorderStyle.FixedSingle; - // this.WindowState = FormWindowState.Normal; + // Console.WriteLine("Write [A1] success"); //} //else //{ - // this.FormBorderStyle = FormBorderStyle.None; - // this.WindowState = FormWindowState.Maximized; + // Console.WriteLine("Write [A1] failed: " + write.Message); //} - - // 当前写入操作的代码 The code for the current write operation - OperateResult write = PlcConnect.Instance.Write("A1", short.Parse("4")); - if (write.IsSuccess) - { - Console.WriteLine("Write [A1] success"); - } - else - { - Console.WriteLine("Write [A1] failed: " + write.Message); - } + // this.panel6.Controls.Add(new UserControl1()); } @@ -100,5 +119,48 @@ namespace RfidWeb RoleLevel = 3 }); } + + private void button4_Click(object sender, EventArgs e) + { + SetBackGroupImage(btnMain); + this.panel6.Controls.Clear(); + // this.panel6.Controls.Add(new UserControl1()); + } + + private void button3_Click(object sender, EventArgs e) + { + SetBackGroupImage(btnArgument); + + this.panel6.Controls.Clear(); + // this.panel6.Controls.Add(new UserControl2()); + } + + private void SetBackGroupImage(Button button) + { + var imageOld = Properties.Resources.btn; + btnMain.BackgroundImage=imageOld; + btnArgument.BackgroundImage = imageOld; + + var imageNew = Properties.Resources.btn_sel1; + if (button != null) + { + button.BackgroundImage=imageNew; + } + } + + private void btnExit_Click(object sender, EventArgs e) + { + Application.Exit(); + } + + private void button3_Click_1(object sender, EventArgs e) + { + + } + + private void button4_Click_1(object sender, EventArgs e) + { + + } } } diff --git a/RfidWeb/Properties/Resources.Designer.cs b/RfidWeb/Properties/Resources.Designer.cs index 343f5a1..dd221e5 100644 --- a/RfidWeb/Properties/Resources.Designer.cs +++ b/RfidWeb/Properties/Resources.Designer.cs @@ -63,19 +63,80 @@ namespace RfidWeb.Properties { /// /// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// - internal static System.Drawing.Bitmap Image1 { + internal static System.Drawing.Bitmap btn { get { - object obj = ResourceManager.GetObject("Image1", resourceCulture); + object obj = ResourceManager.GetObject("btn", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// - /// 查找类似 的本地化字符串。 + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap btn_sel1 { + get { + object obj = ResourceManager.GetObject("btn_sel1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap frm21 { + get { + object obj = ResourceManager.GetObject("frm21", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap frmBei { + get { + object obj = ResourceManager.GetObject("frmBei", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// - internal static string String1 { + internal static System.Drawing.Bitmap frmMain { get { - return ResourceManager.GetString("String1", resourceCulture); + object obj = ResourceManager.GetObject("frmMain", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap mesnac { + get { + object obj = ResourceManager.GetObject("mesnac", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 消音开 { + get { + object obj = ResourceManager.GetObject("消音开", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 照明关 { + get { + object obj = ResourceManager.GetObject("照明关", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); } } } diff --git a/RfidWeb/Properties/Resources.resx b/RfidWeb/Properties/Resources.resx index fee9c12..409aa57 100644 --- a/RfidWeb/Properties/Resources.resx +++ b/RfidWeb/Properties/Resources.resx @@ -118,10 +118,28 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\Resources\Image1.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\btn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - + + ..\Resources\frmBei.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\btn_sel1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\frmMain.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\mesnac1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\frm21.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\消音开.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\照明关.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/RfidWeb/Resources/Image1.jpg b/RfidWeb/Resources/Image1.jpg deleted file mode 100644 index 21620c1..0000000 Binary files a/RfidWeb/Resources/Image1.jpg and /dev/null differ diff --git a/RfidWeb/Resources/btn.png b/RfidWeb/Resources/btn.png new file mode 100644 index 0000000..287817a Binary files /dev/null and b/RfidWeb/Resources/btn.png differ diff --git a/RfidWeb/Resources/btn_sel1.png b/RfidWeb/Resources/btn_sel1.png new file mode 100644 index 0000000..74570a8 Binary files /dev/null and b/RfidWeb/Resources/btn_sel1.png differ diff --git a/RfidWeb/Resources/frm21.png b/RfidWeb/Resources/frm21.png new file mode 100644 index 0000000..8a88b3d Binary files /dev/null and b/RfidWeb/Resources/frm21.png differ diff --git a/RfidWeb/Resources/frmBei.png b/RfidWeb/Resources/frmBei.png new file mode 100644 index 0000000..cce4543 Binary files /dev/null and b/RfidWeb/Resources/frmBei.png differ diff --git a/RfidWeb/Resources/frmMain.png b/RfidWeb/Resources/frmMain.png new file mode 100644 index 0000000..c167b7d Binary files /dev/null and b/RfidWeb/Resources/frmMain.png differ diff --git a/RfidWeb/Resources/mesnac.png b/RfidWeb/Resources/mesnac.png new file mode 100644 index 0000000..1a4ad6f Binary files /dev/null and b/RfidWeb/Resources/mesnac.png differ diff --git a/RfidWeb/Resources/mesnac1.png b/RfidWeb/Resources/mesnac1.png new file mode 100644 index 0000000..1a4ad6f Binary files /dev/null and b/RfidWeb/Resources/mesnac1.png differ diff --git a/RfidWeb/Resources/消音开.png b/RfidWeb/Resources/消音开.png new file mode 100644 index 0000000..0ccc058 Binary files /dev/null and b/RfidWeb/Resources/消音开.png differ diff --git a/RfidWeb/Resources/照明关.png b/RfidWeb/Resources/照明关.png new file mode 100644 index 0000000..99b0f5c Binary files /dev/null and b/RfidWeb/Resources/照明关.png differ diff --git a/RfidWeb/Resources/照明开.png b/RfidWeb/Resources/照明开.png new file mode 100644 index 0000000..47d0109 Binary files /dev/null and b/RfidWeb/Resources/照明开.png differ diff --git a/RfidWeb/RfidWeb.csproj b/RfidWeb/RfidWeb.csproj index 15a1840..f61ae09 100644 --- a/RfidWeb/RfidWeb.csproj +++ b/RfidWeb/RfidWeb.csproj @@ -124,25 +124,34 @@ FrmMain.cs + + UserControl + + + UserMain.cs + FrmMain.cs + + UserMain.cs + ResXFileCodeGenerator - Resources.Designer.cs Designer + Resources.Designer.cs - - True - Resources.resx - True - SettingsSingleFileGenerator Settings.Designer.cs + + True + True + Resources.resx + True Settings.settings @@ -167,7 +176,31 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file