Files
Sleep-Multi-functionality/Window1.xaml

132 lines
7.3 KiB
Plaintext
Raw Normal View History

2026-05-04 14:46:58 +08:00
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:av="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="av" x:Class="ShanghaiEnvironmentalTechnology.Window1"
2026-05-07 16:51:45 +08:00
Title="{DynamicResource WindowTitle1}"
2026-05-11 19:06:26 +08:00
WindowState="Maximized" Height="768" Width="1024" Loaded="Window_Loaded" WindowStartupLocation="CenterScreen">
2026-05-04 14:46:58 +08:00
<Window.Resources>
<Style x:Key="MyButtonStyle" TargetType="{x:Type Button}">
<Setter Property="Background" Value="#4A90E2"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="Margin" Value="10"/>
<Setter Property="Padding" Value="10,5"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Height" Value="40"/>
<Setter Property="Width" Value="120"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}" CornerRadius="20">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#3A7BBE"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#2A5E9A"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="MyTextBoxStyle" TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="#FFFFFF"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="BorderBrush" Value="#4A90E2"/>
<Setter Property="BorderThickness" Value="2"/>
<Setter Property="Padding" Value="10,10"/>
<Setter Property="FontSize" Value="18"/>
<Setter Property="Height" Value="50"/>
<!-- 增加高度 -->
<Setter Property="Width" Value="120"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<!-- 垂直居中 -->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="20">
<ScrollViewer x:Name="PART_ContentHost"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="18"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Margin" Value="5"/>
</Style>
</Window.Resources>
<Grid Margin="20">
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Width="800">
2026-05-07 16:51:45 +08:00
<TextBlock Text="{DynamicResource WindowTitle1}"
2026-05-04 14:46:58 +08:00
FontSize="36"
FontWeight="Bold"
HorizontalAlignment="Center"
Margin="0,0,0,20"/>
2026-05-07 16:51:45 +08:00
<TextBlock Text="{DynamicResource RealTimeDisplay}"
2026-05-04 14:46:58 +08:00
HorizontalAlignment="Center"
Margin="0,0,0,30"/>
<StackPanel Orientation="Vertical" Margin="0,0,0,20">
2026-05-12 14:03:24 +08:00
<StackPanel Orientation="Horizontal" Margin="0,10" Width="550">
2026-05-07 16:51:45 +08:00
<TextBlock Text="{DynamicResource CurrentTest}" VerticalAlignment="Center" Foreground="Black"/>
2026-05-26 17:17:09 +08:00
<TextBox x:Name="SettingPaTextBox" Width="140" Margin="10,0" Style="{StaticResource MyTextBoxStyle}"
2026-05-04 14:46:58 +08:00
IsReadOnly="True"
InputScope="Number" PreviewTextInput="SettingPaTextBox_PreviewTextInput" />
2026-05-07 16:51:45 +08:00
2026-05-04 14:46:58 +08:00
<TextBlock Text="pa" VerticalAlignment="Center" Foreground="Black"/>
2026-05-09 10:30:14 +08:00
<Button Name="btnsetting" Content="{DynamicResource Setting}" Style="{StaticResource MyButtonStyle}" Click="SettingPaTextBox_MouseLeave"/>
2026-05-04 14:46:58 +08:00
<!--<Button Content="确定" Style="{StaticResource MyButtonStyle}"/>-->
</StackPanel>
2026-05-12 14:03:24 +08:00
<StackPanel Orientation="Horizontal" Margin="0,10" Width="554">
2026-05-07 16:51:45 +08:00
<TextBlock Text="{DynamicResource RealTimePressure}" VerticalAlignment="Center" Foreground="Black"/>
2026-05-26 17:17:09 +08:00
<TextBox x:Name="RealTimePressureTextBox" Width="140" Margin="32,0" Style="{StaticResource MyTextBoxStyle}" IsReadOnly="True" IsEnabled="True"/>
<TextBlock Text="pa" VerticalAlignment="Center" Margin="-20" Foreground="Black"/>
<Button Name="btnjiaozhun" Content="{DynamicResource TriggerDisplacement}" Width="150" Style="{StaticResource MyButtonStyle}" Click="Button_Click"/>
2026-05-04 14:46:58 +08:00
</StackPanel>
</StackPanel>
<StackPanel Orientation="Vertical" Margin="0,20">
2026-05-12 14:03:24 +08:00
<StackPanel Orientation="Horizontal" Margin="0,10" Width="504">
2026-05-07 16:51:45 +08:00
<TextBlock Text="{DynamicResource CurrentPosition}" VerticalAlignment="Center" Foreground="Black"/>
2026-05-04 14:46:58 +08:00
<TextBlock x:Name="txtFolw" Text="???" Margin="10,0" VerticalAlignment="Center" Foreground="Black"/>
<TextBlock Text="L/min" VerticalAlignment="Center" Foreground="Black"/>
</StackPanel>
2026-05-12 14:03:24 +08:00
<StackPanel Orientation="Horizontal" Margin="0,10" Width="552">
2026-05-07 16:51:45 +08:00
<Button Content="{DynamicResource EndDisplacement}" Width="150" Style="{StaticResource MyButtonStyle}" Click="Button_Click_4"/>
2026-05-04 14:46:58 +08:00
<TextBlock x:Name="saveFlowTxt" Text="???" Margin="10,0" VerticalAlignment="Center" Foreground="Black"/>
<TextBlock Text="L/min" VerticalAlignment="Center" Foreground="Black"/>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,30">
2026-05-07 16:51:45 +08:00
<Button Content="{DynamicResource Deformation}" Style="{StaticResource MyButtonStyle}" Click="Button_Click_1"/>
<Button x:Name="TestStartButton" Content="{DynamicResource Maximumforcevaluetestresult(N)}" Style="{StaticResource MyButtonStyle}" Click="Button_Click_2"/>
<Button Content="{DynamicResource Deformation test results}" Style="{StaticResource MyButtonStyle}" Click="Button_Click_3" />
<Button Content="{DynamicResource ViewReport}" Width="150" Style="{StaticResource MyButtonStyle}" Click="Button_Click_5" />
2026-05-04 14:46:58 +08:00
</StackPanel>
</StackPanel>
</Grid>
</Window>