This commit is contained in:
xyy
2026-01-07 15:07:23 +08:00
7 changed files with 58 additions and 15 deletions

View File

@@ -11,9 +11,9 @@ namespace 外科辅料和患者防护罩激光抗性测试仪.Model
public int sampleType { get; set; }
public string result { get; set; }
public string O2 { get; set; }
public float? FireDate { get; set; }
public float? yuhui { get; set; }
public float? yuyan { get; set; }
public double? FireDate { get; set; }
public double? yuhui { get; set; }
public double? yuyan { get; set; }
public bool Iszixi { get; set; }
public double? costTime { get; set; }

View File

@@ -30,6 +30,8 @@
{
uiTableLayoutPanel1 = new Sunny.UI.UITableLayoutPanel();
uiPanel3 = new Sunny.UI.UIPanel();
uiTextBox7 = new Sunny.UI.UITextBox();
uiLabel17 = new Sunny.UI.UILabel();
uiLabel8 = new Sunny.UI.UILabel();
uiLabel9 = new Sunny.UI.UILabel();
uiTextBox3 = new Sunny.UI.UITextBox();
@@ -84,6 +86,8 @@
//
// uiPanel3
//
uiPanel3.Controls.Add(uiTextBox7);
uiPanel3.Controls.Add(uiLabel17);
uiPanel3.Controls.Add(uiLabel8);
uiPanel3.Controls.Add(uiLabel9);
uiPanel3.Controls.Add(uiTextBox3);
@@ -111,6 +115,36 @@
uiPanel3.Text = null;
uiPanel3.TextAlignment = ContentAlignment.MiddleCenter;
//
// uiTextBox7
//
uiTextBox7.Font = new Font("微软雅黑", 12F, FontStyle.Regular, GraphicsUnit.Point, 134);
uiTextBox7.Location = new Point(1641, 27);
uiTextBox7.Margin = new Padding(4, 5, 4, 5);
uiTextBox7.MinimumSize = new Size(1, 16);
uiTextBox7.Name = "uiTextBox7";
uiTextBox7.Padding = new Padding(5);
uiTextBox7.Radius = 3;
uiTextBox7.RectColor = Color.FromArgb(220, 220, 220);
uiTextBox7.ShowText = false;
uiTextBox7.Size = new Size(186, 40);
uiTextBox7.Style = Sunny.UI.UIStyle.Custom;
uiTextBox7.StyleCustomMode = true;
uiTextBox7.TabIndex = 10;
uiTextBox7.Text = "0.000";
uiTextBox7.TextAlignment = ContentAlignment.MiddleLeft;
uiTextBox7.Watermark = "";
uiTextBox7.Click += uiTextBox7_Click;
//
// uiLabel17
//
uiLabel17.Font = new Font("微软雅黑", 13F, FontStyle.Regular, GraphicsUnit.Point, 134);
uiLabel17.ForeColor = Color.FromArgb(48, 48, 48);
uiLabel17.Location = new Point(1473, 29);
uiLabel17.Name = "uiLabel17";
uiLabel17.Size = new Size(150, 35);
uiLabel17.TabIndex = 9;
uiLabel17.Text = "功率设置:";
//
// uiLabel8
//
uiLabel8.Font = new Font("微软雅黑", 14F, FontStyle.Bold, GraphicsUnit.Point, 134);
@@ -515,5 +549,7 @@
private Sunny.UI.UITextBox uiTextBox5;
private Sunny.UI.UILabel uiLabel16;
private Sunny.UI.UILabel uiLabel15;
private Sunny.UI.UITextBox uiTextBox7;
private Sunny.UI.UILabel uiLabel17;
}
}

View File

@@ -80,6 +80,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
ReadAndUpdateFloatAsync(1378,2,uiTextBox2,"F3",""),//湿地系数
ReadAndUpdateFloatAsync(1528,2,uiTextBox4,"F3",""),//氧浓度系数
ReadAndUpdateFloatAsync(1578,2,uiTextBox3,"F3",""),//穿透温度系数
ReadAndUpdateFloatAsync(220,2,uiTextBox7,"F3",""),//功率系数
};
await Task.WhenAll(tasks);
@@ -542,6 +543,11 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
}
}
private void uiTextBox7_Click(object sender, EventArgs e)
{
ma?.WriteToPLCForNew(uiTextBox7.Text.Trim(), 220, Function.DataType., 3);
}
private void SwitchToForm<T>() where T : Form, new()
{
using (T form = new T())

View File

@@ -57,7 +57,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
{
var timer = new System.Windows.Forms.Timer()
{
Interval = 1000,
Interval = 500,
};
timer.Tick += async (s, e) =>
{
@@ -78,7 +78,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
{
var timer = new System.Windows.Forms.Timer()
{
Interval = 1000,
Interval = 300,
};
timer.Tick += async (s, e) =>
{

View File

@@ -1182,9 +1182,9 @@
//
uiLabel31.Font = new Font("微软雅黑", 12F, FontStyle.Bold, GraphicsUnit.Point, 134);
uiLabel31.ForeColor = Color.FromArgb(64, 158, 255);
uiLabel31.Location = new Point(261, 241);
uiLabel31.Location = new Point(289, 241);
uiLabel31.Name = "uiLabel31";
uiLabel31.Size = new Size(246, 31);
uiLabel31.Size = new Size(169, 31);
uiLabel31.Style = Sunny.UI.UIStyle.Custom;
uiLabel31.StyleCustomMode = true;
uiLabel31.TabIndex = 7;

View File

@@ -96,7 +96,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
{
var timer = new System.Windows.Forms.Timer()
{
Interval = 1000,
Interval = 100,
};
timer.Tick += async (s, e) =>
{
@@ -338,7 +338,8 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 300, 4);
if (yhlocation != null && yhlocation.Length >= 3)
{
yy = c.UshortToFloat(yhlocation[1], yhlocation[0]); //余焰
//yy = c.UshortToFloat(yhlocation[1], yhlocation[0]); //余焰
yy = c.UshortToFloat(yhlocation[1], yhlocation[0]);
yh = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
}
bool[] fire1 = await ReadModbusCoilAsync(280, 1);

View File

@@ -46,7 +46,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
{
var timer = new System.Windows.Forms.Timer()
{
Interval = 1000,
Interval = 500,
};
timer.Tick += async (s, e) =>
{
@@ -75,9 +75,9 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
{
ReadFloatAsync(156,2,uiLabel7,"F0",""),//点火时间
ReadFloatAsync(164,2,uiLabel8,"F0",""),//余焰时间
ReadFloatAsync(168,2,uiLabel12,"F0",""),//余辉时间
ReadFloatAsync(156,2,uiLabel7,"F1",""),//点火时间
ReadFloatAsync(164,2,uiLabel8,"F1",""),//余焰时间
ReadFloatAsync(168,2,uiLabel12,"F1",""),//余辉时间
ReadLightStatusAsync(),