This commit is contained in:
@@ -124,6 +124,11 @@ namespace MembranePoreTester.ViewModels
|
||||
flow = Math.Round(ConvertFlowByMode(rawFlow), 3);
|
||||
}
|
||||
|
||||
|
||||
float Pressure = await _plcService.ReadPressureAsync(StationId);
|
||||
CurrentPressure = Math.Round(rawPressure, 2);
|
||||
|
||||
|
||||
if (pressure <= 0 || flow <= 0)
|
||||
return;
|
||||
CurrentFlow = flow;
|
||||
@@ -1163,6 +1168,12 @@ namespace MembranePoreTester.ViewModels
|
||||
set => SetProperty(ref _currentFlow, value);
|
||||
}
|
||||
|
||||
private double _currentPressure;
|
||||
public double CurrentPressure
|
||||
{
|
||||
get => _currentPressure;
|
||||
set => SetProperty(ref _currentPressure, value);
|
||||
}
|
||||
|
||||
|
||||
// 修改命令初始化(构造函数中)
|
||||
|
||||
@@ -126,6 +126,7 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<!-- 新增第5行 -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
@@ -186,8 +187,8 @@
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="2" Content="实时流量(L/min):"/>
|
||||
<TextBox Grid.Row="4" Grid.Column="3" IsEnabled="False" Text="{Binding CurrentFlow, StringFormat=F3}"/>
|
||||
<!--<Label Grid.Row="4" Grid.Column="0" Content="实时流量(L/min):"/>
|
||||
<TextBox Grid.Row="4" Grid.Column="1" IsEnabled="False" Text="{Binding CurrentFlow, StringFormat=F2}"/>-->
|
||||
<Label Grid.Row="5" Grid.Column="0" Content="当前压力(kPa):"/>
|
||||
<TextBox Grid.Row="5" Grid.Column="1" IsEnabled="False" Grid.ColumnSpan="3" Text="{Binding CurrentPressure, StringFormat=F2}"/>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
Reference in New Issue
Block a user