This commit is contained in:
wxt
2026-01-09 15:55:44 +08:00
parent 70e3a35ec7
commit db5fcadc99
3 changed files with 7 additions and 11 deletions

View File

@@ -326,9 +326,10 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
{ {
// 添加延迟确保数据稳定 // 添加延迟确保数据稳定
await Task.Delay(500); //await Task.Delay(500);
//await Task.Delay(500);
// 加锁防止异步并发重复执行 // 加锁防止异步并发重复执行
await _asyncLock.WaitAsync(); //await _asyncLock.WaitAsync();
var model = await InsertReportAsync(); var model = await InsertReportAsync();
if (model != null && !string.IsNullOrEmpty(model.Id2)) if (model != null && !string.IsNullOrEmpty(model.Id2))
@@ -346,7 +347,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
{ {
Debug.WriteLine($"读取状态失败: {ex.Message}"); Debug.WriteLine($"读取状态失败: {ex.Message}");
} }
finally { _asyncLock.Release(); } //finally { _asyncLock.Release(); }
} }
public async Task<bool[]> ReadModbusCoilAsync(ushort registerAddress, ushort readCount) public async Task<bool[]> ReadModbusCoilAsync(ushort registerAddress, ushort readCount)
{ {
@@ -960,7 +961,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
"无氧环境/灭火 (0%)" "无氧环境/灭火 (0%)"
}; };
uiComboBox1.Items.AddRange(options); uiComboBox1.Items.AddRange(options);
uiComboBox1.SelectedIndex = 0;
} }
@@ -1027,8 +1028,6 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
} }
} }
} }
@@ -1607,9 +1606,6 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
this.Close();//返回主页面 this.Close();//返回主页面
} }
private void uiLabel23_Click(object sender, EventArgs e)
{
}
} }
} }

View File

@@ -1046,7 +1046,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
"无氧环境/灭火 (0%)" "无氧环境/灭火 (0%)"
}; };
uiComboBox1.Items.AddRange(options); uiComboBox1.Items.AddRange(options);
uiComboBox1.SelectedIndex = 0;
} }

View File

@@ -800,7 +800,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
"无氧环境/灭火 (0%)" "无氧环境/灭火 (0%)"
}; };
uiComboBox1.Items.AddRange(options); uiComboBox1.Items.AddRange(options);
uiComboBox1.SelectedIndex = 0;
} }
private void InitComboBox2Pattern() private void InitComboBox2Pattern()
{ {