页面逻辑调整
This commit is contained in:
@@ -142,7 +142,7 @@
|
||||
|
||||
|
||||
<system:String x:Key="Manual">Manual interface</system:String>
|
||||
<system:String x:Key="Manual1">Manual speed</system:String>
|
||||
<system:String x:Key="Manual1">Manual speed(mm/min)</system:String>
|
||||
<system:String x:Key="Manual2">Offline</system:String>
|
||||
<system:String x:Key="Manual3">settings</system:String>
|
||||
<system:String x:Key="Manual4">Tidal volume coefficient</system:String>
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
|
||||
<!--手动界面-->
|
||||
<system:String x:Key="Manual">手动界面</system:String>
|
||||
<system:String x:Key="Manual1">手动速度</system:String>
|
||||
<system:String x:Key="Manual1">手动速度(mm/min)</system:String>
|
||||
<system:String x:Key="Manual2">离线</system:String>
|
||||
<system:String x:Key="Manual3">设置</system:String>
|
||||
<system:String x:Key="Manual4">潮气量系数</system:String>
|
||||
|
||||
20
Window6.xaml
20
Window6.xaml
@@ -18,7 +18,7 @@
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="100"/>
|
||||
<Setter Property="Width" Value="160"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
@@ -76,7 +76,7 @@
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="Foreground" Value="#666666"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Width" Value="100"/>
|
||||
<Setter Property="Width" Value="160"/>
|
||||
</Style>
|
||||
|
||||
<!-- 单位文本样式 -->
|
||||
@@ -111,7 +111,7 @@
|
||||
<Button Content="{DynamicResource Manual191}" Style="{StaticResource MyButtonStyle}" Width="120" Click="Button_Click_1"/>
|
||||
<!--<Button Content="曲线" Style="{StaticResource MyButtonStyle}" Width="120"/>-->
|
||||
<!--<Button Content="手动界面" Style="{StaticResource MyButtonStyle}" Width="120" Background="#3A7BBE"/>-->
|
||||
<Button Content="{DynamicResource test28}" Style="{StaticResource MyButtonStyle}" Width="120" Click="Button_Click_3"/>
|
||||
<Button Content="{DynamicResource test28}" Style="{StaticResource MyButtonStyle}" Width="130" Click="Button_Click_3"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
@@ -157,22 +157,22 @@
|
||||
|
||||
IsReadOnly="True"
|
||||
/>
|
||||
<TextBlock Text="mm/min" Style="{StaticResource UnitTextStyle}" Grid.Row="0" Grid.Column="2"/>
|
||||
<Button Content="{DynamicResource Manual3}" Style="{StaticResource MyButtonStyle}" Width="50" Click="Button_Click_14" Grid.Row="0" Grid.Column="3"/>
|
||||
<!--<TextBlock Text="mm/min" Style="{StaticResource UnitTextStyle}" Grid.Row="0" Grid.Column="2"/>-->
|
||||
<Button Content="{DynamicResource Manual3}" Style="{StaticResource MyButtonStyle}" Width="60" Click="Button_Click_14" Grid.Row="0" Grid.Column="3"/>
|
||||
|
||||
<!-- 潮气量系数 -->
|
||||
<TextBlock Text="{DynamicResource Manual4}" Style="{StaticResource ParamLabelStyle}" Grid.Row="1" Grid.Column="0" Margin="5"/>
|
||||
<TextBox Name="moistureTxt" Style="{StaticResource MyTextBoxStyle}" Grid.Row="1" Grid.Column="1"
|
||||
IsReadOnly="True"
|
||||
/>
|
||||
<Button Content="{DynamicResource Manual3}" Style="{StaticResource MyButtonStyle}" Width="50" Click="Button_Click_15" Grid.Row="1" Grid.Column="3"/>
|
||||
<Button Content="{DynamicResource Manual3}" Style="{StaticResource MyButtonStyle}" Width="60" Click="Button_Click_15" Grid.Row="1" Grid.Column="3"/>
|
||||
|
||||
<!-- 呼气流量系数 -->
|
||||
<TextBlock Text="{DynamicResource Manual5}" Style="{StaticResource ParamLabelStyle}" Grid.Row="2" Grid.Column="0" Margin="5"/>
|
||||
<TextBox Name="OutFowRateTxt" Style="{StaticResource MyTextBoxStyle}" Grid.Row="2" Grid.Column="1"
|
||||
IsReadOnly="True"
|
||||
/>
|
||||
<Button Content="{DynamicResource Manual3}" Style="{StaticResource MyButtonStyle}" Width="50" Click="Button_Click_16" Grid.Row="2" Grid.Column="3"/>
|
||||
<Button Content="{DynamicResource Manual3}" Style="{StaticResource MyButtonStyle}" Width="60" Click="Button_Click_16" Grid.Row="2" Grid.Column="3"/>
|
||||
<!--<TextBlock Text="L/min" Style="{StaticResource UnitTextStyle}" Grid.Row="2" Grid.Column="2"/>-->
|
||||
|
||||
<!-- 吸气流量系数 -->
|
||||
@@ -180,7 +180,7 @@ IsReadOnly="True"
|
||||
<TextBox Name="InFowRateTxt" Style="{StaticResource MyTextBoxStyle}" Grid.Row="3" Grid.Column="1"
|
||||
IsReadOnly="True"
|
||||
/>
|
||||
<Button Content="{DynamicResource Manual3}" Style="{StaticResource MyButtonStyle}" Width="50" Click="Button_Click_17" Grid.Row="3" Grid.Column="3"/>
|
||||
<Button Content="{DynamicResource Manual3}" Style="{StaticResource MyButtonStyle}" Width="60" Click="Button_Click_17" Grid.Row="3" Grid.Column="3"/>
|
||||
<!--<TextBlock Text="L/min" Style="{StaticResource UnitTextStyle}" Grid.Row="3" Grid.Column="2"/>-->
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ IsReadOnly="True"
|
||||
<TextBox Name="PressRateTxt" Style="{StaticResource MyTextBoxStyle}" Grid.Row="4" Grid.Column="1"
|
||||
IsReadOnly="True"
|
||||
/>
|
||||
<Button Content="{DynamicResource Manual3}" Style="{StaticResource MyButtonStyle}" Width="50" Click="Button_Click_18" Grid.Row="4" Grid.Column="3"/>
|
||||
<Button Content="{DynamicResource Manual3}" Style="{StaticResource MyButtonStyle}" Width="60" Click="Button_Click_18" Grid.Row="4" Grid.Column="3"/>
|
||||
<!--<TextBlock Text="L/min" Style="{StaticResource UnitTextStyle}" Grid.Row="4" Grid.Column="2"/>-->
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@ IsReadOnly="True"
|
||||
</Grid>
|
||||
|
||||
<!-- 第二组:实时监测参数 -->
|
||||
<TextBlock Text="实时监测参数" Style="{StaticResource SectionTitleStyle}" Grid.Row="3"/>
|
||||
<TextBlock Text="{DynamicResource Manual8}" Style="{StaticResource SectionTitleStyle}" Grid.Row="3"/>
|
||||
<Grid Grid.Row="4">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="40"/>
|
||||
|
||||
@@ -22,7 +22,7 @@ using System.Windows.Threading;
|
||||
using OxyPlot.Axes;
|
||||
using OxyPlot.Legends;
|
||||
using 口罩泄露定制款;
|
||||
|
||||
using 睡眠呼吸暂停治疗面罩多功能测试仪.Data;
|
||||
namespace ShanghaiEnvironmentalTechnology
|
||||
{
|
||||
/// <summary>
|
||||
@@ -90,7 +90,7 @@ namespace ShanghaiEnvironmentalTechnology
|
||||
private TcpClient _tcpClient;
|
||||
private IModbusMaster _modbusMaster;
|
||||
private System.Timers.Timer resetTimer; // 启动状态实时定时器
|
||||
|
||||
string currentLang = LanguageManager.CurrentLanguage;
|
||||
#region 统计相关
|
||||
|
||||
private PlotModel _plotModel;
|
||||
@@ -137,7 +137,17 @@ namespace ShanghaiEnvironmentalTechnology
|
||||
}
|
||||
else
|
||||
{
|
||||
ResetBtn.Content = "复位";
|
||||
if (LanguageManager.IsEnglish)
|
||||
{
|
||||
// 英文逻辑
|
||||
ResetBtn.Content = "Reset";
|
||||
}
|
||||
else if (LanguageManager.IsChinese)
|
||||
{
|
||||
// 中文逻辑
|
||||
ResetBtn.Content = "复位";
|
||||
}
|
||||
//ResetBtn.Content = "复位";
|
||||
ResetBtn.Foreground = Brushes.White;
|
||||
}
|
||||
});
|
||||
@@ -226,7 +236,18 @@ namespace ShanghaiEnvironmentalTechnology
|
||||
{
|
||||
if (!IsModbusConnected())
|
||||
{
|
||||
updateAction("离线");
|
||||
//updateAction("离线");
|
||||
//// 2. 直接判断是否是英文
|
||||
if (LanguageManager.IsEnglish)
|
||||
{
|
||||
// 英文逻辑
|
||||
updateAction("Offline");
|
||||
}
|
||||
else if (LanguageManager.IsChinese)
|
||||
{
|
||||
// 中文逻辑
|
||||
updateAction("离线");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user