diff --git a/HZH_Controls/HZH_Controls/Forms/FrmDialog.Designer.cs b/HZH_Controls/HZH_Controls/Forms/FrmDialog.Designer.cs index c087607..beadffa 100644 --- a/HZH_Controls/HZH_Controls/Forms/FrmDialog.Designer.cs +++ b/HZH_Controls/HZH_Controls/Forms/FrmDialog.Designer.cs @@ -111,6 +111,7 @@ namespace HZH_Controls.Forms this.btnCancel.ConerRadius = 5; this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand; this.btnCancel.Dock = System.Windows.Forms.DockStyle.Fill; + this.btnCancel.EnabledMouseEffect = false; this.btnCancel.FillColor = System.Drawing.Color.White; this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); this.btnCancel.IsRadius = false; @@ -149,6 +150,7 @@ namespace HZH_Controls.Forms this.btnOK.ConerRadius = 5; this.btnOK.Cursor = System.Windows.Forms.Cursors.Hand; this.btnOK.Dock = System.Windows.Forms.DockStyle.Fill; + this.btnOK.EnabledMouseEffect = false; this.btnOK.FillColor = System.Drawing.Color.White; this.btnOK.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); this.btnOK.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(77)))), ((int)(((byte)(59))))); @@ -178,6 +180,7 @@ namespace HZH_Controls.Forms this.lblMsg.Size = new System.Drawing.Size(427, 218); this.lblMsg.TabIndex = 2; this.lblMsg.Text = "这是一个提示信息。"; + this.lblMsg.TextAlign = System.Drawing.ContentAlignment.TopCenter; // // lblTitle // diff --git a/RfidWeb/FormMain.Designer.cs b/RfidWeb/FormMain.Designer.cs index 335fae1..ef145fa 100644 --- a/RfidWeb/FormMain.Designer.cs +++ b/RfidWeb/FormMain.Designer.cs @@ -30,6 +30,9 @@ { this.panel1 = new System.Windows.Forms.Panel(); this.panel6 = new System.Windows.Forms.Panel(); + this.panel7 = new System.Windows.Forms.Panel(); + this.panContent = new System.Windows.Forms.Panel(); + this.panel9 = 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(); @@ -46,17 +49,14 @@ this.panel5 = new System.Windows.Forms.Panel(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); - this.panel7 = new System.Windows.Forms.Panel(); - this.panel9 = new System.Windows.Forms.Panel(); - this.panContent = new System.Windows.Forms.Panel(); this.panel1.SuspendLayout(); this.panel6.SuspendLayout(); + this.panel7.SuspendLayout(); this.panel8.SuspendLayout(); this.panel2.SuspendLayout(); this.panel3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.panel5.SuspendLayout(); - this.panel7.SuspendLayout(); this.SuspendLayout(); // // panel1 @@ -83,6 +83,32 @@ this.panel6.Size = new System.Drawing.Size(1280, 956); this.panel6.TabIndex = 1; // + // panel7 + // + this.panel7.Controls.Add(this.panContent); + this.panel7.Controls.Add(this.panel9); + this.panel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel7.Location = new System.Drawing.Point(370, 0); + this.panel7.Name = "panel7"; + this.panel7.Size = new System.Drawing.Size(910, 956); + this.panel7.TabIndex = 4; + // + // panContent + // + this.panContent.Dock = System.Windows.Forms.DockStyle.Fill; + this.panContent.Location = new System.Drawing.Point(0, 14); + this.panContent.Name = "panContent"; + this.panContent.Size = new System.Drawing.Size(910, 942); + this.panContent.TabIndex = 1; + // + // panel9 + // + this.panel9.Dock = System.Windows.Forms.DockStyle.Top; + this.panel9.Location = new System.Drawing.Point(0, 0); + this.panel9.Name = "panel9"; + this.panel9.Size = new System.Drawing.Size(910, 14); + this.panel9.TabIndex = 0; + // // panel8 // this.panel8.BackColor = System.Drawing.Color.Transparent; @@ -106,10 +132,10 @@ 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(22, 590); + this.button4.Location = new System.Drawing.Point(84, 590); this.button4.Margin = new System.Windows.Forms.Padding(4); this.button4.Name = "button4"; - this.button4.Size = new System.Drawing.Size(168, 159); + this.button4.Size = new System.Drawing.Size(146, 159); this.button4.TabIndex = 6; this.button4.UseVisualStyleBackColor = true; // @@ -163,13 +189,14 @@ this.btnAlarm.TabIndex = 3; this.btnAlarm.Text = "报警记录"; this.btnAlarm.UseVisualStyleBackColor = true; + this.btnAlarm.Click += new System.EventHandler(this.btnAlarm_Click); // // 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(22, 846); + this.btnExit.Location = new System.Drawing.Point(22, 812); this.btnExit.Margin = new System.Windows.Forms.Padding(4); this.btnExit.Name = "btnExit"; this.btnExit.Size = new System.Drawing.Size(291, 87); @@ -190,6 +217,7 @@ this.btnArgument.TabIndex = 1; this.btnArgument.Text = "参数界面"; this.btnArgument.UseVisualStyleBackColor = true; + this.btnArgument.Click += new System.EventHandler(this.btnArgument_Click); // // btnMain // @@ -203,6 +231,7 @@ this.btnMain.TabIndex = 0; this.btnMain.Text = "首页"; this.btnMain.UseVisualStyleBackColor = true; + this.btnMain.Click += new System.EventHandler(this.btnMain_Click); // // panel2 // @@ -246,7 +275,7 @@ this.pictureBox1.Location = new System.Drawing.Point(22, 14); this.pictureBox1.Margin = new System.Windows.Forms.Padding(4); this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(322, 40); + this.pictureBox1.Size = new System.Drawing.Size(300, 40); this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pictureBox1.TabIndex = 0; this.pictureBox1.TabStop = false; @@ -285,32 +314,6 @@ this.label2.TabIndex = 1; this.label2.Text = "10:25:01"; // - // panel7 - // - this.panel7.Controls.Add(this.panContent); - this.panel7.Controls.Add(this.panel9); - this.panel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel7.Location = new System.Drawing.Point(370, 0); - this.panel7.Name = "panel7"; - this.panel7.Size = new System.Drawing.Size(910, 956); - this.panel7.TabIndex = 4; - // - // panel9 - // - this.panel9.Dock = System.Windows.Forms.DockStyle.Top; - this.panel9.Location = new System.Drawing.Point(0, 0); - this.panel9.Name = "panel9"; - this.panel9.Size = new System.Drawing.Size(910, 14); - this.panel9.TabIndex = 0; - // - // panContent - // - this.panContent.Dock = System.Windows.Forms.DockStyle.Fill; - this.panContent.Location = new System.Drawing.Point(0, 14); - this.panContent.Name = "panContent"; - this.panContent.Size = new System.Drawing.Size(910, 942); - this.panContent.TabIndex = 1; - // // FormMain // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -320,13 +323,13 @@ this.Text = "FormMain"; this.panel1.ResumeLayout(false); this.panel6.ResumeLayout(false); + this.panel7.ResumeLayout(false); this.panel8.ResumeLayout(false); this.panel2.ResumeLayout(false); this.panel3.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.panel5.ResumeLayout(false); this.panel5.PerformLayout(); - this.panel7.ResumeLayout(false); this.ResumeLayout(false); } diff --git a/RfidWeb/FormMain.cs b/RfidWeb/FormMain.cs index 4d2a77a..a70c708 100644 --- a/RfidWeb/FormMain.cs +++ b/RfidWeb/FormMain.cs @@ -70,7 +70,55 @@ namespace RfidWeb private void btnExit_Click(object sender, EventArgs e) { - Application.Exit(); + + if (FrmDialog.ShowDialog(this, "是否退出系统?", "提示窗体", true) + == System.Windows.Forms.DialogResult.OK) + { + Application.Exit(); + } + + + } + + private void SetBackGroupImage(Button button) + { + var imageOld = Properties.Resources.btn; + List