From 0bbf0f746d4385f445ef8eb5049beaee10d7c6f7 Mon Sep 17 00:00:00 2001 From: "GukSang.Jin" Date: Wed, 4 Feb 2026 11:26:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96UI=20=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StatusSettingsForm.Designer.cs | 388 ++---------------- 全自动水压检测仪/StatusSettingsForm.cs | 333 ++++++++++++++- 2 files changed, 376 insertions(+), 345 deletions(-) diff --git a/全自动水压检测仪/StatusSettingsForm.Designer.cs b/全自动水压检测仪/StatusSettingsForm.Designer.cs index 3af21be..8109964 100644 --- a/全自动水压检测仪/StatusSettingsForm.Designer.cs +++ b/全自动水压检测仪/StatusSettingsForm.Designer.cs @@ -2,9 +2,51 @@ namespace 全自动水压检测仪 { partial class StatusSettingsForm { + /// + /// Required designer variable. + /// private System.ComponentModel.IContainer components = null; - - // 控件声明 + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.SuspendLayout(); + // + // StatusSettingsForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(900, 600); + this.Name = "StatusSettingsForm"; + this.Text = "状态监控设置"; + this.Padding = new System.Windows.Forms.Padding(0, 35, 0, 0); + this.Load += new System.EventHandler(this.StatusSettingsForm_Load); + this.ResumeLayout(false); + } + + #endregion + + private Sunny.UI.UIPanel mainPanel; + private Sunny.UI.UIPanel tempModePanel; + private Sunny.UI.UIPanel valveStatusPanel; private Sunny.UI.UILight uiLight1_Status; private Sunny.UI.UILight uiLight2_Status; private Sunny.UI.UILight uiLight3_Status; @@ -19,347 +61,5 @@ namespace 全自动水压检测仪 private Sunny.UI.UILight uiLight12_Status; private Sunny.UI.UILabel uiLabel11_Status; private Sunny.UI.UIButton uiButton_Close; - private Sunny.UI.UIPanel mainPanel; - private Sunny.UI.UIPanel tempModePanel; - private Sunny.UI.UIPanel valveStatusPanel; - - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - private void InitializeComponent() - { - this.mainPanel = new Sunny.UI.UIPanel(); - this.tempModePanel = new Sunny.UI.UIPanel(); - this.valveStatusPanel = new Sunny.UI.UIPanel(); - this.uiLight1_Status = new Sunny.UI.UILight(); - this.uiLight2_Status = new Sunny.UI.UILight(); - this.uiLight3_Status = new Sunny.UI.UILight(); - this.uiLight4_Status = new Sunny.UI.UILight(); - this.uiLight5_Status = new Sunny.UI.UILight(); - this.uiLight6_Status = new Sunny.UI.UILight(); - this.uiLight7_Status = new Sunny.UI.UILight(); - this.uiLight8_Status = new Sunny.UI.UILight(); - this.uiLight9_Status = new Sunny.UI.UILight(); - this.uiLight10_Status = new Sunny.UI.UILight(); - this.uiLight11_Status = new Sunny.UI.UILight(); - this.uiLight12_Status = new Sunny.UI.UILight(); - this.uiLabel11_Status = new Sunny.UI.UILabel(); - this.uiButton_Close = new Sunny.UI.UIButton(); - - this.mainPanel.SuspendLayout(); - this.tempModePanel.SuspendLayout(); - this.valveStatusPanel.SuspendLayout(); - this.SuspendLayout(); - - // mainPanel - this.mainPanel.Dock = System.Windows.Forms.DockStyle.Fill; - this.mainPanel.Location = new System.Drawing.Point(0, 35); - this.mainPanel.Name = "mainPanel"; - this.mainPanel.Size = new System.Drawing.Size(900, 565); - this.mainPanel.TabIndex = 0; - this.mainPanel.FillColor = System.Drawing.Color.FromArgb(243, 249, 255); - this.mainPanel.RectColor = System.Drawing.Color.FromArgb(243, 249, 255); - - // tempModePanel - 温度模式区域 - this.tempModePanel.Location = new System.Drawing.Point(30, 20); - this.tempModePanel.Size = new System.Drawing.Size(840, 140); - this.tempModePanel.FillColor = System.Drawing.Color.White; - this.tempModePanel.RectColor = System.Drawing.Color.FromArgb(220, 220, 220); - this.tempModePanel.Radius = 10; - this.tempModePanel.Name = "tempModePanel"; - this.tempModePanel.TabIndex = 0; - - // 温度模式标题 - var tempModeTitle = new Sunny.UI.UILabel(); - tempModeTitle.Location = new System.Drawing.Point(20, 15); - tempModeTitle.Size = new System.Drawing.Size(200, 30); - tempModeTitle.Text = "温度模式状态"; - tempModeTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Bold); - tempModeTitle.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48); - this.tempModePanel.Controls.Add(tempModeTitle); - - // 常温模式指示 - var normalTempLabel = new Sunny.UI.UILabel(); - normalTempLabel.Location = new System.Drawing.Point(80, 65); - normalTempLabel.Size = new System.Drawing.Size(120, 30); - normalTempLabel.Text = "常温模式"; - normalTempLabel.Font = new System.Drawing.Font("微软雅黑", 12F); - normalTempLabel.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48); - normalTempLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.tempModePanel.Controls.Add(normalTempLabel); - - this.uiLight1_Status.Location = new System.Drawing.Point(40, 67); - this.uiLight1_Status.Size = new System.Drawing.Size(30, 30); - this.uiLight1_Status.OnColor = System.Drawing.Color.FromArgb(80, 160, 255); - this.uiLight1_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); - this.uiLight1_Status.Radius = 15; - this.uiLight1_Status.Name = "uiLight1_Status"; - this.tempModePanel.Controls.Add(this.uiLight1_Status); - - // 高温模式指示 - var highTempLabel = new Sunny.UI.UILabel(); - highTempLabel.Location = new System.Drawing.Point(330, 65); - highTempLabel.Size = new System.Drawing.Size(120, 30); - highTempLabel.Text = "高温模式"; - highTempLabel.Font = new System.Drawing.Font("微软雅黑", 12F); - highTempLabel.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48); - highTempLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.tempModePanel.Controls.Add(highTempLabel); - - this.uiLight2_Status.Location = new System.Drawing.Point(290, 67); - this.uiLight2_Status.Size = new System.Drawing.Size(30, 30); - this.uiLight2_Status.OnColor = System.Drawing.Color.FromArgb(255, 80, 80); - this.uiLight2_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); - this.uiLight2_Status.Radius = 15; - this.uiLight2_Status.Name = "uiLight2_Status"; - this.tempModePanel.Controls.Add(this.uiLight2_Status); - - // 当前模式显示 - var currentModeLabel = new Sunny.UI.UILabel(); - currentModeLabel.Location = new System.Drawing.Point(520, 65); - currentModeLabel.Size = new System.Drawing.Size(120, 30); - currentModeLabel.Text = "当前模式:"; - currentModeLabel.Font = new System.Drawing.Font("微软雅黑", 11F); - currentModeLabel.ForeColor = System.Drawing.Color.FromArgb(100, 100, 100); - currentModeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.tempModePanel.Controls.Add(currentModeLabel); - - this.uiLabel11_Status.Location = new System.Drawing.Point(640, 65); - this.uiLabel11_Status.Size = new System.Drawing.Size(150, 30); - this.uiLabel11_Status.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold); - this.uiLabel11_Status.ForeColor = System.Drawing.Color.FromArgb(80, 160, 255); - this.uiLabel11_Status.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.tempModePanel.Controls.Add(this.uiLabel11_Status); - - // valveStatusPanel - 阀门状态区域 - this.valveStatusPanel.Location = new System.Drawing.Point(30, 180); - this.valveStatusPanel.Size = new System.Drawing.Size(840, 310); - this.valveStatusPanel.FillColor = System.Drawing.Color.White; - this.valveStatusPanel.RectColor = System.Drawing.Color.FromArgb(220, 220, 220); - this.valveStatusPanel.Radius = 10; - this.valveStatusPanel.Name = "valveStatusPanel"; - this.valveStatusPanel.TabIndex = 1; - - // 阀门状态标题 - var valveStatusTitle = new Sunny.UI.UILabel(); - valveStatusTitle.Location = new System.Drawing.Point(20, 15); - valveStatusTitle.Size = new System.Drawing.Size(200, 30); - valveStatusTitle.Text = "阀门状态监控"; - valveStatusTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Bold); - valveStatusTitle.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48); - this.valveStatusPanel.Controls.Add(valveStatusTitle); - - // 阀门状态指示灯 - 优化布局 - int startX = 40, startY = 65, spacingX = 160, spacingY = 55; - - // 第一行 - // 高压出阀 - this.uiLight3_Status.Location = new System.Drawing.Point(startX, startY); - this.uiLight3_Status.Size = new System.Drawing.Size(28, 28); - this.uiLight3_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); - this.uiLight3_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); - this.uiLight3_Status.Radius = 14; - this.valveStatusPanel.Controls.Add(this.uiLight3_Status); - - var lbl3 = new Sunny.UI.UILabel(); - lbl3.Location = new System.Drawing.Point(startX + 38, startY); - lbl3.Size = new System.Drawing.Size(115, 28); - lbl3.Text = "高压出阀"; - lbl3.Font = new System.Drawing.Font("微软雅黑", 10F); - lbl3.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); - lbl3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.valveStatusPanel.Controls.Add(lbl3); - - // 高压进阀 - this.uiLight4_Status.Location = new System.Drawing.Point(startX + spacingX, startY); - this.uiLight4_Status.Size = new System.Drawing.Size(28, 28); - this.uiLight4_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); - this.uiLight4_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); - this.uiLight4_Status.Radius = 14; - this.valveStatusPanel.Controls.Add(this.uiLight4_Status); - - var lbl4 = new Sunny.UI.UILabel(); - lbl4.Location = new System.Drawing.Point(startX + spacingX + 38, startY); - lbl4.Size = new System.Drawing.Size(115, 28); - lbl4.Text = "高压进阀"; - lbl4.Font = new System.Drawing.Font("微软雅黑", 10F); - lbl4.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); - lbl4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.valveStatusPanel.Controls.Add(lbl4); - - // 常温抽水阀 - this.uiLight5_Status.Location = new System.Drawing.Point(startX + spacingX * 2, startY); - this.uiLight5_Status.Size = new System.Drawing.Size(28, 28); - this.uiLight5_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); - this.uiLight5_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); - this.uiLight5_Status.Radius = 14; - this.valveStatusPanel.Controls.Add(this.uiLight5_Status); - - var lbl5 = new Sunny.UI.UILabel(); - lbl5.Location = new System.Drawing.Point(startX + spacingX * 2 + 38, startY); - lbl5.Size = new System.Drawing.Size(115, 28); - lbl5.Text = "常温抽水阀"; - lbl5.Font = new System.Drawing.Font("微软雅黑", 10F); - lbl5.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); - lbl5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.valveStatusPanel.Controls.Add(lbl5); - - // 常温水箱加水阀 - this.uiLight6_Status.Location = new System.Drawing.Point(startX + spacingX * 3, startY); - this.uiLight6_Status.Size = new System.Drawing.Size(28, 28); - this.uiLight6_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); - this.uiLight6_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); - this.uiLight6_Status.Radius = 14; - this.valveStatusPanel.Controls.Add(this.uiLight6_Status); - - var lbl6 = new Sunny.UI.UILabel(); - lbl6.Location = new System.Drawing.Point(startX + spacingX * 3 + 38, startY); - lbl6.Size = new System.Drawing.Size(115, 28); - lbl6.Text = "常温水箱加水阀"; - lbl6.Font = new System.Drawing.Font("微软雅黑", 10F); - lbl6.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); - lbl6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.valveStatusPanel.Controls.Add(lbl6); - - // 高温抽水阀 - this.uiLight7_Status.Location = new System.Drawing.Point(startX + spacingX * 4, startY); - this.uiLight7_Status.Size = new System.Drawing.Size(28, 28); - this.uiLight7_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); - this.uiLight7_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); - this.uiLight7_Status.Radius = 14; - this.valveStatusPanel.Controls.Add(this.uiLight7_Status); - - var lbl7 = new Sunny.UI.UILabel(); - lbl7.Location = new System.Drawing.Point(startX + spacingX * 4 + 38, startY); - lbl7.Size = new System.Drawing.Size(115, 28); - lbl7.Text = "高温抽水阀"; - lbl7.Font = new System.Drawing.Font("微软雅黑", 10F); - lbl7.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); - lbl7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.valveStatusPanel.Controls.Add(lbl7); - - // 第二行 - // 空气抽气阀 - this.uiLight8_Status.Location = new System.Drawing.Point(startX, startY + spacingY); - this.uiLight8_Status.Size = new System.Drawing.Size(28, 28); - this.uiLight8_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); - this.uiLight8_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); - this.uiLight8_Status.Radius = 14; - this.valveStatusPanel.Controls.Add(this.uiLight8_Status); - - var lbl8 = new Sunny.UI.UILabel(); - lbl8.Location = new System.Drawing.Point(startX + 38, startY + spacingY); - lbl8.Size = new System.Drawing.Size(115, 28); - lbl8.Text = "空气抽气阀"; - lbl8.Font = new System.Drawing.Font("微软雅黑", 10F); - lbl8.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); - lbl8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.valveStatusPanel.Controls.Add(lbl8); - - // 加热状态 - this.uiLight9_Status.Location = new System.Drawing.Point(startX + spacingX, startY + spacingY); - this.uiLight9_Status.Size = new System.Drawing.Size(28, 28); - this.uiLight9_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); - this.uiLight9_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); - this.uiLight9_Status.Radius = 14; - this.valveStatusPanel.Controls.Add(this.uiLight9_Status); - - var lbl9 = new Sunny.UI.UILabel(); - lbl9.Location = new System.Drawing.Point(startX + spacingX + 38, startY + spacingY); - lbl9.Size = new System.Drawing.Size(115, 28); - lbl9.Text = "加热状态"; - lbl9.Font = new System.Drawing.Font("微软雅黑", 10F); - lbl9.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); - lbl9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.valveStatusPanel.Controls.Add(lbl9); - - // 常温回水阀 - this.uiLight10_Status.Location = new System.Drawing.Point(startX + spacingX * 2, startY + spacingY); - this.uiLight10_Status.Size = new System.Drawing.Size(28, 28); - this.uiLight10_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); - this.uiLight10_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); - this.uiLight10_Status.Radius = 14; - this.valveStatusPanel.Controls.Add(this.uiLight10_Status); - - var lbl10 = new Sunny.UI.UILabel(); - lbl10.Location = new System.Drawing.Point(startX + spacingX * 2 + 38, startY + spacingY); - lbl10.Size = new System.Drawing.Size(115, 28); - lbl10.Text = "常温回水阀"; - lbl10.Font = new System.Drawing.Font("微软雅黑", 10F); - lbl10.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); - lbl10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.valveStatusPanel.Controls.Add(lbl10); - - // 高温水箱加水阀 - this.uiLight11_Status.Location = new System.Drawing.Point(startX + spacingX * 3, startY + spacingY); - this.uiLight11_Status.Size = new System.Drawing.Size(28, 28); - this.uiLight11_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); - this.uiLight11_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); - this.uiLight11_Status.Radius = 14; - this.valveStatusPanel.Controls.Add(this.uiLight11_Status); - - var lbl11 = new Sunny.UI.UILabel(); - lbl11.Location = new System.Drawing.Point(startX + spacingX * 3 + 38, startY + spacingY); - lbl11.Size = new System.Drawing.Size(115, 28); - lbl11.Text = "高温水箱加水阀"; - lbl11.Font = new System.Drawing.Font("微软雅黑", 10F); - lbl11.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); - lbl11.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.valveStatusPanel.Controls.Add(lbl11); - - // 高温回水阀 - this.uiLight12_Status.Location = new System.Drawing.Point(startX + spacingX * 4, startY + spacingY); - this.uiLight12_Status.Size = new System.Drawing.Size(28, 28); - this.uiLight12_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); - this.uiLight12_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); - this.uiLight12_Status.Radius = 14; - this.valveStatusPanel.Controls.Add(this.uiLight12_Status); - - var lbl12 = new Sunny.UI.UILabel(); - lbl12.Location = new System.Drawing.Point(startX + spacingX * 4 + 38, startY + spacingY); - lbl12.Size = new System.Drawing.Size(115, 28); - lbl12.Text = "高温回水阀"; - lbl12.Font = new System.Drawing.Font("微软雅黑", 10F); - lbl12.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); - lbl12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.valveStatusPanel.Controls.Add(lbl12); - - // 关闭按钮 - this.uiButton_Close.Location = new System.Drawing.Point(375, 510); - this.uiButton_Close.Size = new System.Drawing.Size(150, 42); - this.uiButton_Close.Text = "关闭"; - this.uiButton_Close.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold); - this.uiButton_Close.FillColor = System.Drawing.Color.FromArgb(80, 160, 255); - this.uiButton_Close.FillHoverColor = System.Drawing.Color.FromArgb(100, 180, 255); - this.uiButton_Close.FillPressColor = System.Drawing.Color.FromArgb(60, 140, 235); - this.uiButton_Close.RectColor = System.Drawing.Color.FromArgb(80, 160, 255); - this.uiButton_Close.Radius = 20; - this.uiButton_Close.Cursor = System.Windows.Forms.Cursors.Hand; - this.uiButton_Close.Click += new System.EventHandler(this.uiButton_Close_Click); - - // 添加控件到主面板 - this.mainPanel.Controls.Add(this.tempModePanel); - this.mainPanel.Controls.Add(this.valveStatusPanel); - this.mainPanel.Controls.Add(this.uiButton_Close); - - this.Controls.Add(this.mainPanel); - - // 窗体设置 - this.ClientSize = new System.Drawing.Size(900, 600); - this.Name = "StatusSettingsForm"; - this.Text = "状态监控设置"; - this.Padding = new System.Windows.Forms.Padding(0, 35, 0, 0); - - this.mainPanel.ResumeLayout(false); - this.tempModePanel.ResumeLayout(false); - this.valveStatusPanel.ResumeLayout(false); - this.ResumeLayout(false); - } } } diff --git a/全自动水压检测仪/StatusSettingsForm.cs b/全自动水压检测仪/StatusSettingsForm.cs index e02edad..11aba22 100644 --- a/全自动水压检测仪/StatusSettingsForm.cs +++ b/全自动水压检测仪/StatusSettingsForm.cs @@ -17,6 +17,8 @@ namespace 全自动水压检测仪 public StatusSettingsForm(NormalTemperatureMode parentForm) { _parentForm = parentForm; + + // 基本的 InitializeComponent 会在 Designer.cs 中调用 InitializeComponent(); // 设置窗体属性 @@ -34,7 +36,6 @@ namespace 全自动水压检测仪 _updateTimer.Interval = 500; // 每500ms更新一次 _updateTimer.Tick += UpdateTimer_Tick; - this.Load += StatusSettingsForm_Load; this.FormClosing += StatusSettingsForm_FormClosing; } @@ -98,7 +99,13 @@ namespace 全自动水压检测仪 private void StatusSettingsForm_Load(object sender, EventArgs e) { + // 初始化所有控件 + InitializeControls(); + + // 启动定时器 _updateTimer?.Start(); + + // 初始更新 UpdateStatusDisplay(); } @@ -112,5 +119,329 @@ namespace 全自动水压检测仪 { this.Close(); } + + private void InitializeControls() + { + this.mainPanel = new Sunny.UI.UIPanel(); + this.tempModePanel = new Sunny.UI.UIPanel(); + this.valveStatusPanel = new Sunny.UI.UIPanel(); + this.uiLight1_Status = new Sunny.UI.UILight(); + this.uiLight2_Status = new Sunny.UI.UILight(); + this.uiLight3_Status = new Sunny.UI.UILight(); + this.uiLight4_Status = new Sunny.UI.UILight(); + this.uiLight5_Status = new Sunny.UI.UILight(); + this.uiLight6_Status = new Sunny.UI.UILight(); + this.uiLight7_Status = new Sunny.UI.UILight(); + this.uiLight8_Status = new Sunny.UI.UILight(); + this.uiLight9_Status = new Sunny.UI.UILight(); + this.uiLight10_Status = new Sunny.UI.UILight(); + this.uiLight11_Status = new Sunny.UI.UILight(); + this.uiLight12_Status = new Sunny.UI.UILight(); + this.uiLabel11_Status = new Sunny.UI.UILabel(); + this.uiButton_Close = new Sunny.UI.UIButton(); + + this.SuspendLayout(); + this.mainPanel.SuspendLayout(); + + // mainPanel + this.mainPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.mainPanel.Location = new System.Drawing.Point(0, 35); + this.mainPanel.Name = "mainPanel"; + this.mainPanel.Size = new System.Drawing.Size(900, 565); + this.mainPanel.TabIndex = 0; + this.mainPanel.FillColor = System.Drawing.Color.FromArgb(243, 249, 255); + this.mainPanel.RectColor = System.Drawing.Color.FromArgb(243, 249, 255); + + // tempModePanel + this.tempModePanel.Location = new System.Drawing.Point(30, 20); + this.tempModePanel.Size = new System.Drawing.Size(840, 140); + this.tempModePanel.FillColor = System.Drawing.Color.White; + this.tempModePanel.RectColor = System.Drawing.Color.FromArgb(220, 220, 220); + this.tempModePanel.Radius = 10; + this.tempModePanel.Name = "tempModePanel"; + this.tempModePanel.TabIndex = 0; + + // 温度模式标题 + var tempModeTitle = new Sunny.UI.UILabel(); + tempModeTitle.Location = new System.Drawing.Point(20, 15); + tempModeTitle.Size = new System.Drawing.Size(200, 30); + tempModeTitle.Text = "温度模式状态"; + tempModeTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Bold); + tempModeTitle.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48); + this.tempModePanel.Controls.Add(tempModeTitle); + + // 常温模式指示 + var normalTempLabel = new Sunny.UI.UILabel(); + normalTempLabel.Location = new System.Drawing.Point(80, 65); + normalTempLabel.Size = new System.Drawing.Size(120, 30); + normalTempLabel.Text = "常温模式"; + normalTempLabel.Font = new System.Drawing.Font("微软雅黑", 12F); + normalTempLabel.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48); + normalTempLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.tempModePanel.Controls.Add(normalTempLabel); + + // uiLight1_Status + this.uiLight1_Status.Location = new System.Drawing.Point(40, 67); + this.uiLight1_Status.Size = new System.Drawing.Size(30, 30); + this.uiLight1_Status.OnColor = System.Drawing.Color.FromArgb(80, 160, 255); + this.uiLight1_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); + this.uiLight1_Status.Radius = 15; + this.uiLight1_Status.Name = "uiLight1_Status"; + this.tempModePanel.Controls.Add(this.uiLight1_Status); + + // 高温模式指示 + var highTempLabel = new Sunny.UI.UILabel(); + highTempLabel.Location = new System.Drawing.Point(330, 65); + highTempLabel.Size = new System.Drawing.Size(120, 30); + highTempLabel.Text = "高温模式"; + highTempLabel.Font = new System.Drawing.Font("微软雅黑", 12F); + highTempLabel.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48); + highTempLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.tempModePanel.Controls.Add(highTempLabel); + + // uiLight2_Status + this.uiLight2_Status.Location = new System.Drawing.Point(290, 67); + this.uiLight2_Status.Size = new System.Drawing.Size(30, 30); + this.uiLight2_Status.OnColor = System.Drawing.Color.FromArgb(255, 80, 80); + this.uiLight2_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); + this.uiLight2_Status.Radius = 15; + this.uiLight2_Status.Name = "uiLight2_Status"; + this.tempModePanel.Controls.Add(this.uiLight2_Status); + + // 当前模式显示 + var currentModeLabel = new Sunny.UI.UILabel(); + currentModeLabel.Location = new System.Drawing.Point(520, 65); + currentModeLabel.Size = new System.Drawing.Size(120, 30); + currentModeLabel.Text = "当前模式:"; + currentModeLabel.Font = new System.Drawing.Font("微软雅黑", 11F); + currentModeLabel.ForeColor = System.Drawing.Color.FromArgb(100, 100, 100); + currentModeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.tempModePanel.Controls.Add(currentModeLabel); + + // uiLabel11_Status + this.uiLabel11_Status.Location = new System.Drawing.Point(640, 65); + this.uiLabel11_Status.Size = new System.Drawing.Size(150, 30); + this.uiLabel11_Status.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold); + this.uiLabel11_Status.ForeColor = System.Drawing.Color.FromArgb(80, 160, 255); + this.uiLabel11_Status.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.tempModePanel.Controls.Add(this.uiLabel11_Status); + + // valveStatusPanel + this.valveStatusPanel.Location = new System.Drawing.Point(30, 180); + this.valveStatusPanel.Size = new System.Drawing.Size(840, 310); + this.valveStatusPanel.FillColor = System.Drawing.Color.White; + this.valveStatusPanel.RectColor = System.Drawing.Color.FromArgb(220, 220, 220); + this.valveStatusPanel.Radius = 10; + this.valveStatusPanel.Name = "valveStatusPanel"; + this.valveStatusPanel.TabIndex = 1; + + // 阀门状态标题 + var valveStatusTitle = new Sunny.UI.UILabel(); + valveStatusTitle.Location = new System.Drawing.Point(20, 15); + valveStatusTitle.Size = new System.Drawing.Size(200, 30); + valveStatusTitle.Text = "阀门状态监控"; + valveStatusTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Bold); + valveStatusTitle.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48); + this.valveStatusPanel.Controls.Add(valveStatusTitle); + + // 阀门状态指示灯布局 + int startX = 40; + int startY = 65; + int spacingX = 160; + int spacingY = 55; + + // 第一行 - 高压出阀 + this.uiLight3_Status.Location = new System.Drawing.Point(startX, startY); + this.uiLight3_Status.Size = new System.Drawing.Size(28, 28); + this.uiLight3_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); + this.uiLight3_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); + this.uiLight3_Status.Radius = 14; + this.valveStatusPanel.Controls.Add(this.uiLight3_Status); + + var lbl3 = new Sunny.UI.UILabel(); + lbl3.Location = new System.Drawing.Point(startX + 38, startY); + lbl3.Size = new System.Drawing.Size(115, 28); + lbl3.Text = "高压出阀"; + lbl3.Font = new System.Drawing.Font("微软雅黑", 10F); + lbl3.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); + lbl3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.valveStatusPanel.Controls.Add(lbl3); + + // 高压进阀 + this.uiLight4_Status.Location = new System.Drawing.Point(startX + spacingX, startY); + this.uiLight4_Status.Size = new System.Drawing.Size(28, 28); + this.uiLight4_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); + this.uiLight4_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); + this.uiLight4_Status.Radius = 14; + this.valveStatusPanel.Controls.Add(this.uiLight4_Status); + + var lbl4 = new Sunny.UI.UILabel(); + lbl4.Location = new System.Drawing.Point(startX + spacingX + 38, startY); + lbl4.Size = new System.Drawing.Size(115, 28); + lbl4.Text = "高压进阀"; + lbl4.Font = new System.Drawing.Font("微软雅黑", 10F); + lbl4.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); + lbl4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.valveStatusPanel.Controls.Add(lbl4); + + // 常温抽水阀 + this.uiLight5_Status.Location = new System.Drawing.Point(startX + spacingX * 2, startY); + this.uiLight5_Status.Size = new System.Drawing.Size(28, 28); + this.uiLight5_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); + this.uiLight5_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); + this.uiLight5_Status.Radius = 14; + this.valveStatusPanel.Controls.Add(this.uiLight5_Status); + + var lbl5 = new Sunny.UI.UILabel(); + lbl5.Location = new System.Drawing.Point(startX + spacingX * 2 + 38, startY); + lbl5.Size = new System.Drawing.Size(115, 28); + lbl5.Text = "常温抽水阀"; + lbl5.Font = new System.Drawing.Font("微软雅黑", 10F); + lbl5.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); + lbl5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.valveStatusPanel.Controls.Add(lbl5); + + // 常温水箱加水阀 + this.uiLight6_Status.Location = new System.Drawing.Point(startX + spacingX * 3, startY); + this.uiLight6_Status.Size = new System.Drawing.Size(28, 28); + this.uiLight6_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); + this.uiLight6_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); + this.uiLight6_Status.Radius = 14; + this.valveStatusPanel.Controls.Add(this.uiLight6_Status); + + var lbl6 = new Sunny.UI.UILabel(); + lbl6.Location = new System.Drawing.Point(startX + spacingX * 3 + 38, startY); + lbl6.Size = new System.Drawing.Size(115, 28); + lbl6.Text = "常温水箱加水阀"; + lbl6.Font = new System.Drawing.Font("微软雅黑", 10F); + lbl6.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); + lbl6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.valveStatusPanel.Controls.Add(lbl6); + + // 高温抽水阀 + this.uiLight7_Status.Location = new System.Drawing.Point(startX + spacingX * 4, startY); + this.uiLight7_Status.Size = new System.Drawing.Size(28, 28); + this.uiLight7_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); + this.uiLight7_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); + this.uiLight7_Status.Radius = 14; + this.valveStatusPanel.Controls.Add(this.uiLight7_Status); + + var lbl7 = new Sunny.UI.UILabel(); + lbl7.Location = new System.Drawing.Point(startX + spacingX * 4 + 38, startY); + lbl7.Size = new System.Drawing.Size(115, 28); + lbl7.Text = "高温抽水阀"; + lbl7.Font = new System.Drawing.Font("微软雅黑", 10F); + lbl7.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); + lbl7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.valveStatusPanel.Controls.Add(lbl7); + + // 第二行 - 空气抽气阀 + this.uiLight8_Status.Location = new System.Drawing.Point(startX, startY + spacingY); + this.uiLight8_Status.Size = new System.Drawing.Size(28, 28); + this.uiLight8_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); + this.uiLight8_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); + this.uiLight8_Status.Radius = 14; + this.valveStatusPanel.Controls.Add(this.uiLight8_Status); + + var lbl8 = new Sunny.UI.UILabel(); + lbl8.Location = new System.Drawing.Point(startX + 38, startY + spacingY); + lbl8.Size = new System.Drawing.Size(115, 28); + lbl8.Text = "空气抽气阀"; + lbl8.Font = new System.Drawing.Font("微软雅黑", 10F); + lbl8.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); + lbl8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.valveStatusPanel.Controls.Add(lbl8); + + // 加热状态 + this.uiLight9_Status.Location = new System.Drawing.Point(startX + spacingX, startY + spacingY); + this.uiLight9_Status.Size = new System.Drawing.Size(28, 28); + this.uiLight9_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); + this.uiLight9_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); + this.uiLight9_Status.Radius = 14; + this.valveStatusPanel.Controls.Add(this.uiLight9_Status); + + var lbl9 = new Sunny.UI.UILabel(); + lbl9.Location = new System.Drawing.Point(startX + spacingX + 38, startY + spacingY); + lbl9.Size = new System.Drawing.Size(115, 28); + lbl9.Text = "加热状态"; + lbl9.Font = new System.Drawing.Font("微软雅黑", 10F); + lbl9.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); + lbl9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.valveStatusPanel.Controls.Add(lbl9); + + // 常温回水阀 + this.uiLight10_Status.Location = new System.Drawing.Point(startX + spacingX * 2, startY + spacingY); + this.uiLight10_Status.Size = new System.Drawing.Size(28, 28); + this.uiLight10_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); + this.uiLight10_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); + this.uiLight10_Status.Radius = 14; + this.valveStatusPanel.Controls.Add(this.uiLight10_Status); + + var lbl10 = new Sunny.UI.UILabel(); + lbl10.Location = new System.Drawing.Point(startX + spacingX * 2 + 38, startY + spacingY); + lbl10.Size = new System.Drawing.Size(115, 28); + lbl10.Text = "常温回水阀"; + lbl10.Font = new System.Drawing.Font("微软雅黑", 10F); + lbl10.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); + lbl10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.valveStatusPanel.Controls.Add(lbl10); + + // 高温水箱加水阀 + this.uiLight11_Status.Location = new System.Drawing.Point(startX + spacingX * 3, startY + spacingY); + this.uiLight11_Status.Size = new System.Drawing.Size(28, 28); + this.uiLight11_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); + this.uiLight11_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); + this.uiLight11_Status.Radius = 14; + this.valveStatusPanel.Controls.Add(this.uiLight11_Status); + + var lbl11 = new Sunny.UI.UILabel(); + lbl11.Location = new System.Drawing.Point(startX + spacingX * 3 + 38, startY + spacingY); + lbl11.Size = new System.Drawing.Size(115, 28); + lbl11.Text = "高温水箱加水阀"; + lbl11.Font = new System.Drawing.Font("微软雅黑", 10F); + lbl11.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); + lbl11.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.valveStatusPanel.Controls.Add(lbl11); + + // 高温回水阀 + this.uiLight12_Status.Location = new System.Drawing.Point(startX + spacingX * 4, startY + spacingY); + this.uiLight12_Status.Size = new System.Drawing.Size(28, 28); + this.uiLight12_Status.OnColor = System.Drawing.Color.FromArgb(0, 190, 0); + this.uiLight12_Status.OffColor = System.Drawing.Color.FromArgb(200, 200, 200); + this.uiLight12_Status.Radius = 14; + this.valveStatusPanel.Controls.Add(this.uiLight12_Status); + + var lbl12 = new Sunny.UI.UILabel(); + lbl12.Location = new System.Drawing.Point(startX + spacingX * 4 + 38, startY + spacingY); + lbl12.Size = new System.Drawing.Size(115, 28); + lbl12.Text = "高温回水阀"; + lbl12.Font = new System.Drawing.Font("微软雅黑", 10F); + lbl12.ForeColor = System.Drawing.Color.FromArgb(60, 60, 60); + lbl12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.valveStatusPanel.Controls.Add(lbl12); + + // 关闭按钮 + this.uiButton_Close.Location = new System.Drawing.Point(375, 510); + this.uiButton_Close.Size = new System.Drawing.Size(150, 42); + this.uiButton_Close.Text = "关闭"; + this.uiButton_Close.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold); + this.uiButton_Close.FillColor = System.Drawing.Color.FromArgb(80, 160, 255); + this.uiButton_Close.FillHoverColor = System.Drawing.Color.FromArgb(100, 180, 255); + this.uiButton_Close.FillPressColor = System.Drawing.Color.FromArgb(60, 140, 235); + this.uiButton_Close.RectColor = System.Drawing.Color.FromArgb(80, 160, 255); + this.uiButton_Close.Radius = 20; + this.uiButton_Close.Cursor = System.Windows.Forms.Cursors.Hand; + this.uiButton_Close.Click += new System.EventHandler(this.uiButton_Close_Click); + + // 添加控件到主面板 + this.mainPanel.Controls.Add(this.tempModePanel); + this.mainPanel.Controls.Add(this.valveStatusPanel); + this.mainPanel.Controls.Add(this.uiButton_Close); + + this.Controls.Add(this.mainPanel); + + this.mainPanel.ResumeLayout(false); + this.ResumeLayout(false); + } } }