This commit is contained in:
xyy
2026-03-14 09:25:02 +08:00
parent 502dbfa624
commit 613da5810a
2 changed files with 92 additions and 34 deletions

View File

@@ -80,12 +80,10 @@ namespace 全自动水压检测仪
this.uiLabel39 = new Sunny.UI.UILabel();
this.uiTableLayoutPanel13 = new Sunny.UI.UITableLayoutPanel();
this.uiPanel31 = new Sunny.UI.UIPanel();
this.uiProcessBar2 = new Sunny.UI.UIProcessBar();
this.uiLabel7 = new Sunny.UI.UILabel();
this.uiLabel8 = new Sunny.UI.UILabel();
this.uiLabel34 = new Sunny.UI.UILabel();
this.uiPanel23 = new Sunny.UI.UIPanel();
this.uiProcessBar1 = new Sunny.UI.UIProcessBar();
this.uiLabel12 = new Sunny.UI.UILabel();
this.uiLabel16 = new Sunny.UI.UILabel();
this.uiLabel17 = new Sunny.UI.UILabel();
@@ -173,6 +171,10 @@ namespace 全自动水压检测仪
this.uiPanel2 = new Sunny.UI.UIPanel();
this.uiLabel1 = new Sunny.UI.UILabel();
this.uiLight1 = new Sunny.UI.UILight();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.checkBox3 = new System.Windows.Forms.CheckBox();
this.checkBox4 = new System.Windows.Forms.CheckBox();
this.uiTableLayoutPanel1.SuspendLayout();
this.uiPanel1.SuspendLayout();
this.uiPanel4.SuspendLayout();
@@ -1016,7 +1018,6 @@ namespace 全自动水压检测仪
//
// uiPanel31
//
this.uiPanel31.Controls.Add(this.uiProcessBar2);
this.uiPanel31.Controls.Add(this.uiLabel7);
this.uiPanel31.Controls.Add(this.uiLabel8);
this.uiPanel31.Controls.Add(this.uiLabel34);
@@ -1033,17 +1034,6 @@ namespace 全自动水压检测仪
this.uiPanel31.Text = null;
this.uiPanel31.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
//
// uiProcessBar2
//
this.uiProcessBar2.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.uiProcessBar2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiProcessBar2.Location = new System.Drawing.Point(3, 33);
this.uiProcessBar2.MinimumSize = new System.Drawing.Size(3, 3);
this.uiProcessBar2.Name = "uiProcessBar2";
this.uiProcessBar2.Size = new System.Drawing.Size(236, 10);
this.uiProcessBar2.TabIndex = 4;
this.uiProcessBar2.Text = "uiProcessBar2";
//
// uiLabel7
//
this.uiLabel7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(245)))), ((int)(((byte)(245)))), ((int)(((byte)(245)))));
@@ -1079,7 +1069,6 @@ namespace 全自动水压检测仪
//
// uiPanel23
//
this.uiPanel23.Controls.Add(this.uiProcessBar1);
this.uiPanel23.Controls.Add(this.uiLabel12);
this.uiPanel23.Controls.Add(this.uiLabel16);
this.uiPanel23.Controls.Add(this.uiLabel17);
@@ -1096,17 +1085,6 @@ namespace 全自动水压检测仪
this.uiPanel23.Text = null;
this.uiPanel23.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
//
// uiProcessBar1
//
this.uiProcessBar1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.uiProcessBar1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiProcessBar1.Location = new System.Drawing.Point(2, 31);
this.uiProcessBar1.MinimumSize = new System.Drawing.Size(3, 3);
this.uiProcessBar1.Name = "uiProcessBar1";
this.uiProcessBar1.Size = new System.Drawing.Size(236, 10);
this.uiProcessBar1.TabIndex = 3;
this.uiProcessBar1.Text = "uiProcessBar1";
//
// uiLabel12
//
this.uiLabel12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(245)))), ((int)(((byte)(245)))), ((int)(((byte)(245)))));
@@ -1450,6 +1428,10 @@ namespace 全自动水压检测仪
//
// uiPanel14
//
this.uiPanel14.Controls.Add(this.checkBox4);
this.uiPanel14.Controls.Add(this.checkBox3);
this.uiPanel14.Controls.Add(this.checkBox2);
this.uiPanel14.Controls.Add(this.checkBox1);
this.uiPanel14.Controls.Add(this.uiLabel26);
this.uiPanel14.Controls.Add(this.uiTextBox14);
this.uiPanel14.Controls.Add(this.uiLabel25);
@@ -2411,6 +2393,50 @@ namespace 全自动水压检测仪
this.uiLight1.TabIndex = 1;
this.uiLight1.Text = "uiLight1";
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Enabled = false;
this.checkBox1.Location = new System.Drawing.Point(11, 175);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(131, 24);
this.checkBox1.TabIndex = 27;
this.checkBox1.Text = "高温低液位";
this.checkBox1.UseVisualStyleBackColor = true;
//
// checkBox2
//
this.checkBox2.AutoSize = true;
this.checkBox2.Enabled = false;
this.checkBox2.Location = new System.Drawing.Point(150, 175);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(131, 24);
this.checkBox2.TabIndex = 28;
this.checkBox2.Text = "高温高液位";
this.checkBox2.UseVisualStyleBackColor = true;
//
// checkBox3
//
this.checkBox3.AutoSize = true;
this.checkBox3.Enabled = false;
this.checkBox3.Location = new System.Drawing.Point(298, 175);
this.checkBox3.Name = "checkBox3";
this.checkBox3.Size = new System.Drawing.Size(131, 24);
this.checkBox3.TabIndex = 29;
this.checkBox3.Text = "常温低液位";
this.checkBox3.UseVisualStyleBackColor = true;
//
// checkBox4
//
this.checkBox4.AutoSize = true;
this.checkBox4.Enabled = false;
this.checkBox4.Location = new System.Drawing.Point(425, 175);
this.checkBox4.Name = "checkBox4";
this.checkBox4.Size = new System.Drawing.Size(131, 24);
this.checkBox4.TabIndex = 30;
this.checkBox4.Text = "常温高液位";
this.checkBox4.UseVisualStyleBackColor = true;
//
// NormalTemperatureMode
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -2462,6 +2488,7 @@ namespace 全自动水压检测仪
this.uiTableLayoutPanel8.ResumeLayout(false);
this.uiTableLayoutPanel9.ResumeLayout(false);
this.uiPanel14.ResumeLayout(false);
this.uiPanel14.PerformLayout();
this.uiPanel9.ResumeLayout(false);
this.uiTableLayoutPanel6.ResumeLayout(false);
this.uiPanel11.ResumeLayout(false);
@@ -2596,8 +2623,6 @@ namespace 全自动水压检测仪
private Sunny.UI.UIPanel uiPanel20;
private Sunny.UI.UILabel uiLabel9;
private Sunny.UI.UILabel uiLabel10;
private Sunny.UI.UIProcessBar uiProcessBar1;
private Sunny.UI.UIProcessBar uiProcessBar2;
private Sunny.UI.UIButton uiButton8;
private Sunny.UI.UITabControl uiTabControl_Main;
private System.Windows.Forms.TabPage tabPage_Chart;
@@ -2627,6 +2652,10 @@ namespace 全自动水压检测仪
private Sunny.UI.UITextBox uiTextBox12;
private Sunny.UI.UILabel uiLabel26;
private Sunny.UI.UITextBox uiTextBox14;
private CheckBox checkBox4;
private CheckBox checkBox3;
private CheckBox checkBox2;
private CheckBox checkBox1;
}
}

View File

@@ -500,9 +500,37 @@ namespace 全自动水压检测仪
if (percentage < 0) percentage = 0;
if (percentage > 100) percentage = 100;
// 更新进度条
if (uiProcessBar1 != null && !uiProcessBar1.IsDisposed)
uiProcessBar1.Value = (int)percentage;
bool[] a = _modbusMaster?.ReadCoils(1, 10040, 1);
bool[] b = _modbusMaster?.ReadCoils(1, 10041, 1);
bool[] cc = _modbusMaster?.ReadCoils(1, 10042, 1);
bool[] d = _modbusMaster?.ReadCoils(1, 10043, 1);
if (a != null && a.Length > 0)
{
checkBox1.Checked = a[0] ? true : false;
}
if (b != null && b.Length > 0)
{
checkBox2.Checked = b[0] ? true : false;
}
if (cc != null && cc.Length > 0)
{
checkBox3.Checked = cc[0] ? true : false;
}
if (d != null && d.Length > 0)
{
checkBox4.Checked = d[0] ? true : false;
}
//// 更新进度条
//if (uiProcessBar1 != null && !uiProcessBar1.IsDisposed)
// uiProcessBar1.Value = (int)percentage;
uiLabel12.Text = value1.ToString("F2");
}
@@ -555,9 +583,10 @@ namespace 全自动水压检测仪
if (percentage < 0) percentage = 0;
if (percentage > 100) percentage = 100;
// 更新进度条
if (uiProcessBar2 != null && !uiProcessBar2.IsDisposed)
uiProcessBar2.Value = (int)percentage;
//// 更新进度条
//if (uiProcessBar2 != null && !uiProcessBar2.IsDisposed)
// uiProcessBar2.Value = (int)percentage;
uiLabel7.Text = value8.ToString("F2");
}