This commit is contained in:
@@ -315,6 +315,15 @@ namespace MembranePoreTester.ViewModels
|
||||
|
||||
private void OpenPressureCalibration()
|
||||
{
|
||||
// 弹出确认对话框
|
||||
var result = MessageBox.Show(
|
||||
"确定要进行压力校准吗?此操作将向PLC写入校准信号。",
|
||||
"确认校准",
|
||||
MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Question);
|
||||
|
||||
if (result != MessageBoxResult.Yes)
|
||||
return;
|
||||
ushort address = new ushort();
|
||||
switch (StationId)
|
||||
{
|
||||
@@ -338,12 +347,18 @@ namespace MembranePoreTester.ViewModels
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await _plcService.WriteCoilAsync(address, true);
|
||||
MessageBox.Show("校准成功!");
|
||||
//MessageBox.Show("校准成功!");
|
||||
});
|
||||
}
|
||||
|
||||
private void OpenPressureCalibration2()
|
||||
{
|
||||
// 弹出确认对话框
|
||||
var result = MessageBox.Show(
|
||||
"确定要进行压力校准吗?此操作将向PLC写入校准信号。",
|
||||
"确认校准",
|
||||
MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Question);
|
||||
ushort address = new ushort();
|
||||
switch (StationId)
|
||||
{
|
||||
@@ -367,7 +382,7 @@ namespace MembranePoreTester.ViewModels
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await _plcService.WriteCoilAsync(address, true);
|
||||
MessageBox.Show("校准成功!");
|
||||
// MessageBox.Show("校准成功!");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -209,6 +209,11 @@ namespace MembranePoreTester.ViewModels
|
||||
MessageBox.Show("低压模式,加压上限不能超过200!");
|
||||
return;
|
||||
}
|
||||
if (!_suppressPressureValidation && HighLowPressure.Contains("高压") && value > 800)
|
||||
{
|
||||
MessageBox.Show("高压模式,加压上限不能超过500!");
|
||||
return;
|
||||
}
|
||||
|
||||
bool changed = SetProperty(ref _pressureUpperLimit, value);
|
||||
// 仅在非抑制模式下将改变写回PLC,避免把PLC读回的值再次写入造成循环
|
||||
|
||||
@@ -820,6 +820,12 @@ namespace MembranePoreTester.ViewModels
|
||||
|
||||
private void OpenFlowCalibration()
|
||||
{
|
||||
// 弹出确认对话框
|
||||
var result = MessageBox.Show(
|
||||
"确定要进行流量校准吗?此操作将向PLC写入校准信号。",
|
||||
"确认校准",
|
||||
MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Question);
|
||||
ushort address = new ushort();
|
||||
switch (StationId)
|
||||
{
|
||||
@@ -843,12 +849,18 @@ namespace MembranePoreTester.ViewModels
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await _plcService.WriteCoilAsync(address, true);
|
||||
MessageBox.Show("校准成功!");
|
||||
//MessageBox.Show("校准成功!");
|
||||
});
|
||||
}
|
||||
|
||||
private void OpenFlowCalibration2()
|
||||
{
|
||||
// 弹出确认对话框
|
||||
var result = MessageBox.Show(
|
||||
"确定要进行流量校准吗?此操作将向PLC写入校准信号。",
|
||||
"确认校准",
|
||||
MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Question);
|
||||
ushort address = new ushort();
|
||||
switch (StationId)
|
||||
{
|
||||
@@ -872,7 +884,7 @@ namespace MembranePoreTester.ViewModels
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await _plcService.WriteCoilAsync(address, true);
|
||||
MessageBox.Show("校准成功!");
|
||||
//MessageBox.Show("校准成功!");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user