1240 lines
77 KiB
XML
1240 lines
77 KiB
XML
<Window x:Class="DentistryHandpieces.MainWindow"
|
||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:local="clr-namespace:DentistryHandpieces"
|
||
Title="牙科手机夹持性能测试仪"
|
||
Width="1024"
|
||
Height="768"
|
||
MinWidth="1024"
|
||
MinHeight="768"
|
||
WindowState="Maximized"
|
||
WindowStartupLocation="CenterScreen"
|
||
FontFamily="Microsoft YaHei UI"
|
||
FontSize="16"
|
||
Background="#EDF2F5">
|
||
<Window.Resources>
|
||
<Style TargetType="TextBlock">
|
||
<Setter Property="Foreground" Value="#18232E" />
|
||
</Style>
|
||
|
||
<Style TargetType="TextBox">
|
||
<Setter Property="Height" Value="40" />
|
||
<Setter Property="Padding" Value="12,4" />
|
||
<Setter Property="FontSize" Value="18" />
|
||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||
<Setter Property="Background" Value="#F8FAFC" />
|
||
<Setter Property="BorderBrush" Value="#B8C5D1" />
|
||
<Setter Property="BorderThickness" Value="1" />
|
||
</Style>
|
||
|
||
<Style TargetType="Button">
|
||
<Setter Property="MinHeight" Value="46" />
|
||
<Setter Property="Padding" Value="18,8" />
|
||
<Setter Property="FontSize" Value="17" />
|
||
<Setter Property="FontWeight" Value="SemiBold" />
|
||
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
||
<Setter Property="Background" Value="#1F4F73" />
|
||
<Setter Property="Foreground" Value="White" />
|
||
<Setter Property="BorderBrush" Value="#15384F" />
|
||
<Setter Property="BorderThickness" Value="1" />
|
||
<Setter Property="Template">
|
||
<Setter.Value>
|
||
<ControlTemplate TargetType="Button">
|
||
<Border x:Name="Chrome"
|
||
Background="{TemplateBinding Background}"
|
||
BorderBrush="{TemplateBinding BorderBrush}"
|
||
BorderThickness="{TemplateBinding BorderThickness}"
|
||
CornerRadius="8"
|
||
SnapsToDevicePixels="True">
|
||
<Grid>
|
||
<Border Background="#24FFFFFF"
|
||
CornerRadius="8"
|
||
Height="18"
|
||
Margin="1"
|
||
VerticalAlignment="Top" />
|
||
<ContentPresenter HorizontalAlignment="Center"
|
||
VerticalAlignment="Center"
|
||
Margin="{TemplateBinding Padding}"
|
||
RecognizesAccessKey="True" />
|
||
</Grid>
|
||
</Border>
|
||
<ControlTemplate.Triggers>
|
||
<Trigger Property="IsMouseOver" Value="True">
|
||
<Setter TargetName="Chrome" Property="Opacity" Value="0.94" />
|
||
</Trigger>
|
||
<Trigger Property="IsPressed" Value="True">
|
||
<Setter TargetName="Chrome" Property="Opacity" Value="0.86" />
|
||
</Trigger>
|
||
<Trigger Property="IsEnabled" Value="False">
|
||
<Setter TargetName="Chrome" Property="Opacity" Value="0.45" />
|
||
</Trigger>
|
||
</ControlTemplate.Triggers>
|
||
</ControlTemplate>
|
||
</Setter.Value>
|
||
</Setter>
|
||
</Style>
|
||
|
||
<Style x:Key="RoundedActionButton" TargetType="Button">
|
||
<Setter Property="MinHeight" Value="46" />
|
||
<Setter Property="Padding" Value="18,8" />
|
||
<Setter Property="FontSize" Value="17" />
|
||
<Setter Property="FontWeight" Value="SemiBold" />
|
||
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
||
<Setter Property="Background" Value="#1F4F73" />
|
||
<Setter Property="Foreground" Value="White" />
|
||
<Setter Property="BorderBrush" Value="#15384F" />
|
||
<Setter Property="BorderThickness" Value="1" />
|
||
<Setter Property="Template">
|
||
<Setter.Value>
|
||
<ControlTemplate TargetType="Button">
|
||
<Border x:Name="Chrome"
|
||
Background="{TemplateBinding Background}"
|
||
BorderBrush="{TemplateBinding BorderBrush}"
|
||
BorderThickness="{TemplateBinding BorderThickness}"
|
||
CornerRadius="8"
|
||
RenderTransformOrigin="0.5,0.5"
|
||
SnapsToDevicePixels="True">
|
||
<Border.RenderTransform>
|
||
<ScaleTransform ScaleX="1" ScaleY="1" />
|
||
</Border.RenderTransform>
|
||
<Grid>
|
||
<Border Background="#24FFFFFF"
|
||
CornerRadius="8"
|
||
Height="18"
|
||
Margin="1"
|
||
VerticalAlignment="Top" />
|
||
<ContentPresenter HorizontalAlignment="Center"
|
||
VerticalAlignment="Center"
|
||
Margin="{TemplateBinding Padding}"
|
||
RecognizesAccessKey="True" />
|
||
</Grid>
|
||
</Border>
|
||
<ControlTemplate.Triggers>
|
||
<Trigger Property="IsMouseOver" Value="True">
|
||
<Setter TargetName="Chrome" Property="Opacity" Value="0.94" />
|
||
</Trigger>
|
||
<Trigger Property="IsPressed" Value="True">
|
||
<Setter TargetName="Chrome" Property="Opacity" Value="0.86" />
|
||
</Trigger>
|
||
<Trigger Property="IsEnabled" Value="False">
|
||
<Setter TargetName="Chrome" Property="Opacity" Value="0.45" />
|
||
</Trigger>
|
||
</ControlTemplate.Triggers>
|
||
</ControlTemplate>
|
||
</Setter.Value>
|
||
</Setter>
|
||
</Style>
|
||
|
||
<Style x:Key="StartButtonStyle" TargetType="Button" BasedOn="{StaticResource RoundedActionButton}">
|
||
<Setter Property="Background" Value="#0F766E" />
|
||
<Setter Property="BorderBrush" Value="#0A5D56" />
|
||
</Style>
|
||
|
||
<Style x:Key="StopButtonStyle" TargetType="Button" BasedOn="{StaticResource RoundedActionButton}">
|
||
<Setter Property="Background" Value="#A33A2A" />
|
||
<Setter Property="BorderBrush" Value="#7F2C21" />
|
||
</Style>
|
||
|
||
<Style x:Key="AxialForceModeButton" TargetType="Button" BasedOn="{StaticResource RoundedActionButton}">
|
||
<Setter Property="MinHeight" Value="42" />
|
||
<Setter Property="Padding" Value="12,6" />
|
||
<Setter Property="FontSize" Value="17" />
|
||
<Setter Property="FontWeight" Value="SemiBold" />
|
||
<Setter Property="Background" Value="#F8FAFC" />
|
||
<Setter Property="Foreground" Value="#1F2933" />
|
||
<Setter Property="BorderBrush" Value="#CBD5E1" />
|
||
<Setter Property="BorderThickness" Value="1" />
|
||
</Style>
|
||
|
||
<Style TargetType="TabControl">
|
||
<Setter Property="Background" Value="#FFFFFF" />
|
||
<Setter Property="BorderBrush" Value="#C9D4DD" />
|
||
<Setter Property="BorderThickness" Value="1" />
|
||
<Setter Property="Padding" Value="18" />
|
||
<Setter Property="ItemsPanel">
|
||
<Setter.Value>
|
||
<ItemsPanelTemplate>
|
||
<UniformGrid Rows="1" />
|
||
</ItemsPanelTemplate>
|
||
</Setter.Value>
|
||
</Setter>
|
||
<Setter Property="Template">
|
||
<Setter.Value>
|
||
<ControlTemplate TargetType="TabControl">
|
||
<Grid KeyboardNavigation.TabNavigation="Local"
|
||
SnapsToDevicePixels="True">
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="*" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<Border Background="#E6EDF3"
|
||
BorderBrush="#C6D2DC"
|
||
BorderThickness="1"
|
||
CornerRadius="10"
|
||
Padding="6"
|
||
Margin="0,0,0,10">
|
||
<ItemsPresenter x:Name="HeaderPanel"
|
||
KeyboardNavigation.TabIndex="1"
|
||
Panel.ZIndex="1" />
|
||
</Border>
|
||
|
||
<Border Grid.Row="1"
|
||
Background="{TemplateBinding Background}"
|
||
BorderBrush="{TemplateBinding BorderBrush}"
|
||
BorderThickness="{TemplateBinding BorderThickness}"
|
||
CornerRadius="8"
|
||
Padding="{TemplateBinding Padding}">
|
||
<ContentPresenter x:Name="PART_SelectedContentHost"
|
||
ContentSource="SelectedContent"
|
||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||
</Border>
|
||
</Grid>
|
||
</ControlTemplate>
|
||
</Setter.Value>
|
||
</Setter>
|
||
</Style>
|
||
|
||
<Style TargetType="TabItem">
|
||
<Setter Property="MinWidth" Value="0" />
|
||
<Setter Property="MinHeight" Value="48" />
|
||
<Setter Property="Margin" Value="3,0" />
|
||
<Setter Property="Padding" Value="12,9" />
|
||
<Setter Property="FontSize" Value="18" />
|
||
<Setter Property="FontWeight" Value="SemiBold" />
|
||
<Setter Property="Foreground" Value="#415466" />
|
||
<Setter Property="Template">
|
||
<Setter.Value>
|
||
<ControlTemplate TargetType="TabItem">
|
||
<Border x:Name="Chrome"
|
||
MinWidth="{TemplateBinding MinWidth}"
|
||
MinHeight="{TemplateBinding MinHeight}"
|
||
Background="Transparent"
|
||
BorderBrush="Transparent"
|
||
BorderThickness="1"
|
||
CornerRadius="7"
|
||
SnapsToDevicePixels="True">
|
||
<Grid>
|
||
<ContentPresenter HorizontalAlignment="Center"
|
||
VerticalAlignment="Center"
|
||
Margin="{TemplateBinding Padding}"
|
||
ContentSource="Header"
|
||
RecognizesAccessKey="True"
|
||
TextElement.Foreground="{TemplateBinding Foreground}" />
|
||
<Border x:Name="Accent"
|
||
Height="3"
|
||
Margin="14,0"
|
||
VerticalAlignment="Bottom"
|
||
Background="#0F766E"
|
||
CornerRadius="2"
|
||
Opacity="0" />
|
||
</Grid>
|
||
</Border>
|
||
<ControlTemplate.Triggers>
|
||
<Trigger Property="IsMouseOver" Value="True">
|
||
<Setter TargetName="Chrome" Property="Background" Value="#F8FAFC" />
|
||
<Setter TargetName="Chrome" Property="BorderBrush" Value="#D4DEE7" />
|
||
<Setter Property="Foreground" Value="#0F2F45" />
|
||
</Trigger>
|
||
<Trigger Property="IsSelected" Value="True">
|
||
<Setter TargetName="Chrome" Property="Background" Value="#FFFFFF" />
|
||
<Setter TargetName="Chrome" Property="BorderBrush" Value="#AFC1CF" />
|
||
<Setter Property="Foreground" Value="#0F4A66" />
|
||
<Setter Property="FontWeight" Value="Bold" />
|
||
<Setter TargetName="Accent" Property="Opacity" Value="1" />
|
||
</Trigger>
|
||
<Trigger Property="IsEnabled" Value="False">
|
||
<Setter TargetName="Chrome" Property="Opacity" Value="0.5" />
|
||
</Trigger>
|
||
</ControlTemplate.Triggers>
|
||
</ControlTemplate>
|
||
</Setter.Value>
|
||
</Setter>
|
||
</Style>
|
||
|
||
<Style x:Key="PanelBorder" TargetType="Border">
|
||
<Setter Property="Background" Value="White" />
|
||
<Setter Property="BorderBrush" Value="#C9D4DD" />
|
||
<Setter Property="BorderThickness" Value="1" />
|
||
<Setter Property="CornerRadius" Value="6" />
|
||
<Setter Property="Padding" Value="16" />
|
||
</Style>
|
||
|
||
<Style x:Key="MetricTitle" TargetType="TextBlock">
|
||
<Setter Property="FontSize" Value="21" />
|
||
<Setter Property="FontWeight" Value="Bold" />
|
||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||
<Setter Property="Foreground" Value="#22313F" />
|
||
</Style>
|
||
|
||
<Style x:Key="MetricValue" TargetType="TextBlock">
|
||
<Setter Property="FontSize" Value="58" />
|
||
<Setter Property="FontWeight" Value="Bold" />
|
||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||
<Setter Property="Margin" Value="0,8,0,0" />
|
||
</Style>
|
||
|
||
<Style x:Key="FormLabel" TargetType="TextBlock">
|
||
<Setter Property="FontSize" Value="17" />
|
||
<Setter Property="FontWeight" Value="SemiBold" />
|
||
<Setter Property="VerticalAlignment" Value="Center" />
|
||
<Setter Property="Foreground" Value="#334155" />
|
||
</Style>
|
||
|
||
<Style x:Key="ResultValue" TargetType="TextBlock">
|
||
<Setter Property="FontSize" Value="23" />
|
||
<Setter Property="FontWeight" Value="Bold" />
|
||
<Setter Property="VerticalAlignment" Value="Center" />
|
||
<Setter Property="Foreground" Value="#0F2F45" />
|
||
</Style>
|
||
|
||
<Style x:Key="MutedText" TargetType="TextBlock">
|
||
<Setter Property="FontSize" Value="16" />
|
||
<Setter Property="Foreground" Value="#52616F" />
|
||
<Setter Property="TextWrapping" Value="Wrap" />
|
||
</Style>
|
||
|
||
<Style x:Key="InfoStrip" TargetType="Border">
|
||
<Setter Property="Background" Value="#F8FAFC" />
|
||
<Setter Property="BorderBrush" Value="#D4DEE7" />
|
||
<Setter Property="BorderThickness" Value="1" />
|
||
<Setter Property="CornerRadius" Value="5" />
|
||
<Setter Property="Padding" Value="12,9" />
|
||
</Style>
|
||
</Window.Resources>
|
||
|
||
<Grid>
|
||
<DockPanel LastChildFill="True">
|
||
<TabControl x:Name="MainTabs">
|
||
<TabItem Header="轴向位移动量测试">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="*" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<ScrollViewer Grid.Row="0"
|
||
VerticalScrollBarVisibility="Auto"
|
||
HorizontalScrollBarVisibility="Disabled"
|
||
PanningMode="VerticalOnly">
|
||
<Grid Margin="0,0,0,0">
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<Grid MinHeight="210">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<Border Style="{StaticResource PanelBorder}" Margin="0,0,8,0">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="*" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<TextBlock Text="实时千分表" Style="{StaticResource MetricTitle}" />
|
||
<TextBlock Grid.Row="1"
|
||
x:Name="RelativeDisplacementText"
|
||
Text="{Binding RelativeDisplacementText}"
|
||
Style="{StaticResource MetricValue}"
|
||
Foreground="#0F766E"
|
||
VerticalAlignment="Center" />
|
||
<TextBlock Grid.Row="2"
|
||
x:Name="DisplacementStatusText"
|
||
Text="{Binding DisplacementStatusText}"
|
||
FontSize="22"
|
||
FontWeight="SemiBold"
|
||
HorizontalAlignment="Center"
|
||
Foreground="#52616F" />
|
||
</Grid>
|
||
</Border>
|
||
|
||
<Border Grid.Column="1" Style="{StaticResource PanelBorder}" Margin="8,0,0,0">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="*" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<TextBlock Text="实时轴向力" Style="{StaticResource MetricTitle}" />
|
||
<TextBlock Grid.Row="1"
|
||
x:Name="AxialForceText"
|
||
Text="{Binding AxialForceText}"
|
||
Style="{StaticResource MetricValue}"
|
||
Foreground="#1D4ED8"
|
||
VerticalAlignment="Center" />
|
||
<TextBlock Grid.Row="2"
|
||
Text="达到设定力自动停止"
|
||
FontSize="18"
|
||
HorizontalAlignment="Center"
|
||
Foreground="#52616F" />
|
||
</Grid>
|
||
</Border>
|
||
</Grid>
|
||
|
||
<Grid Grid.Row="1" Margin="0,14,0,0">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<Border Style="{StaticResource PanelBorder}" Margin="0,0,8,0">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="190" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
<TextBlock Grid.Row="1"
|
||
Grid.ColumnSpan="2"
|
||
x:Name="AxialConfigSummaryText"
|
||
Text="{Binding AxialConfigSummaryText}"
|
||
Style="{StaticResource MutedText}"
|
||
Margin="0,8,0,0" />
|
||
|
||
<TextBlock Grid.Row="2" Text="轴向拉力/跳动力设置" Style="{StaticResource FormLabel}" Margin="0,18,0,0" />
|
||
<Grid Grid.Row="2" Grid.Column="1" Margin="0,18,0,0">
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<Grid Grid.Row="0">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
<Button Content="轴向力拉力"
|
||
Command="{Binding SelectAxialPullForceSetpointModeCommand}"
|
||
Margin="0,0,6,0">
|
||
<Button.Style>
|
||
<Style TargetType="Button" BasedOn="{StaticResource AxialForceModeButton}">
|
||
<Style.Triggers>
|
||
<DataTrigger Binding="{Binding IsAxialPullForceSetpointSelected}" Value="True">
|
||
<Setter Property="Background" Value="#1D4ED8" />
|
||
<Setter Property="Foreground" Value="White" />
|
||
<Setter Property="BorderBrush" Value="#1D4ED8" />
|
||
</DataTrigger>
|
||
</Style.Triggers>
|
||
</Style>
|
||
</Button.Style>
|
||
</Button>
|
||
<Button Grid.Column="1"
|
||
Content="轴向跳动力"
|
||
Command="{Binding SelectAxialJumpForceSetpointModeCommand}"
|
||
Margin="6,0,0,0">
|
||
<Button.Style>
|
||
<Style TargetType="Button" BasedOn="{StaticResource AxialForceModeButton}">
|
||
<Style.Triggers>
|
||
<DataTrigger Binding="{Binding IsAxialJumpForceSetpointSelected}" Value="True">
|
||
<Setter Property="Background" Value="#0F766E" />
|
||
<Setter Property="Foreground" Value="White" />
|
||
<Setter Property="BorderBrush" Value="#0F766E" />
|
||
</DataTrigger>
|
||
</Style.Triggers>
|
||
</Style>
|
||
</Button.Style>
|
||
</Button>
|
||
</Grid>
|
||
<Grid Grid.Row="1" Margin="0,8,0,0">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="50" />
|
||
</Grid.ColumnDefinitions>
|
||
<TextBox x:Name="AxialForceSetpointInput"
|
||
Text="{Binding AxialForceSetpointInput, UpdateSourceTrigger=PropertyChanged}" />
|
||
<TextBlock Grid.Column="1"
|
||
Text="N"
|
||
Style="{StaticResource MutedText}"
|
||
VerticalAlignment="Center"
|
||
Margin="10,0,0,0" />
|
||
</Grid>
|
||
</Grid>
|
||
|
||
<TextBlock Grid.Row="3" Text="轴向力时间设置" Style="{StaticResource FormLabel}" Margin="0,14,0,0" />
|
||
<Grid Grid.Row="3" Grid.Column="1" Margin="0,14,0,0">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="50" />
|
||
</Grid.ColumnDefinitions>
|
||
<TextBox x:Name="AxialForceHoldTimeInput"
|
||
Text="{Binding AxialForceHoldTimeInput, UpdateSourceTrigger=PropertyChanged}" />
|
||
<TextBlock Grid.Column="1"
|
||
Text="s"
|
||
Style="{StaticResource MutedText}"
|
||
VerticalAlignment="Center"
|
||
Margin="10,0,0,0" />
|
||
</Grid>
|
||
|
||
<TextBlock Grid.Row="4" Text="当前位置" Style="{StaticResource FormLabel}" Margin="0,14,0,0" />
|
||
<TextBlock Grid.Row="4"
|
||
Grid.Column="1"
|
||
x:Name="AxialAxisPositionText"
|
||
Text="{Binding AxialAxisPositionText}"
|
||
Style="{StaticResource ResultValue}"
|
||
Margin="0,14,0,0" />
|
||
|
||
<TextBlock Grid.Row="5" Text="采集数据" Style="{StaticResource FormLabel}" Margin="0,14,0,0" />
|
||
<TextBlock Grid.Row="5"
|
||
Grid.Column="1"
|
||
x:Name="AxialSamplePairText"
|
||
Text="{Binding AxialSamplePairText}"
|
||
Style="{StaticResource ResultValue}"
|
||
Margin="0,14,0,0" />
|
||
|
||
<TextBlock Grid.Row="6" Text="数据差值" Style="{StaticResource FormLabel}" Margin="0,14,0,0" />
|
||
<TextBlock Grid.Row="6"
|
||
Grid.Column="1"
|
||
x:Name="AxialSampleDifferenceText"
|
||
Text="{Binding AxialSampleDifferenceText}"
|
||
Style="{StaticResource ResultValue}"
|
||
Margin="0,14,0,0" />
|
||
</Grid>
|
||
</Border>
|
||
|
||
<Border Grid.Column="1" Style="{StaticResource PanelBorder}" Margin="8,0,0,0">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="170" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<TextBlock Text="最大位移" Style="{StaticResource FormLabel}" />
|
||
<TextBlock Grid.Column="1"
|
||
x:Name="MaxDisplacementText"
|
||
Text="{Binding MaxDisplacementText}"
|
||
Style="{StaticResource ResultValue}" />
|
||
|
||
<TextBlock Grid.Row="1" Text="最终位移" Style="{StaticResource FormLabel}" Margin="0,18,0,0" />
|
||
<TextBlock Grid.Row="1"
|
||
Grid.Column="1"
|
||
x:Name="FinalDisplacementText"
|
||
Text="{Binding FinalDisplacementText}"
|
||
Style="{StaticResource ResultValue}"
|
||
Margin="0,18,0,0" />
|
||
|
||
<TextBlock Grid.Row="2" Text="最终轴向力" Style="{StaticResource FormLabel}" Margin="0,18,0,0" />
|
||
<TextBlock Grid.Row="2"
|
||
Grid.Column="1"
|
||
x:Name="FinalAxialForceText"
|
||
Text="{Binding FinalAxialForceText}"
|
||
Style="{StaticResource ResultValue}"
|
||
Margin="0,18,0,0" />
|
||
</Grid>
|
||
</Border>
|
||
</Grid>
|
||
|
||
</Grid>
|
||
</ScrollViewer>
|
||
|
||
<Grid Grid.Row="1" Margin="0,14,0,0">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
<Button Content="前进"
|
||
Tag="AxialForward"
|
||
PreviewMouseLeftButtonDown="ManualMotionButton_PreviewMouseLeftButtonDown"
|
||
PreviewMouseLeftButtonUp="ManualMotionButton_PreviewMouseLeftButtonUp"
|
||
PreviewTouchDown="ManualMotionButton_PreviewTouchDown"
|
||
PreviewTouchUp="ManualMotionButton_PreviewTouchUp"
|
||
MouseLeave="ManualMotionButton_MouseLeave"
|
||
LostMouseCapture="ManualMotionButton_LostMouseCapture"
|
||
LostTouchCapture="ManualMotionButton_LostTouchCapture"
|
||
Margin="0,0,8,0" />
|
||
<Button Grid.Column="1"
|
||
Content="后退"
|
||
Tag="AxialBackward"
|
||
PreviewMouseLeftButtonDown="ManualMotionButton_PreviewMouseLeftButtonDown"
|
||
PreviewMouseLeftButtonUp="ManualMotionButton_PreviewMouseLeftButtonUp"
|
||
PreviewTouchDown="ManualMotionButton_PreviewTouchDown"
|
||
PreviewTouchUp="ManualMotionButton_PreviewTouchUp"
|
||
MouseLeave="ManualMotionButton_MouseLeave"
|
||
LostMouseCapture="ManualMotionButton_LostMouseCapture"
|
||
LostTouchCapture="ManualMotionButton_LostTouchCapture"
|
||
Margin="8,0,8,0" />
|
||
<Button Grid.Column="2"
|
||
x:Name="StartDisplacementButton"
|
||
Content="启动"
|
||
Command="{Binding StartDisplacementCommand}"
|
||
Style="{StaticResource StartButtonStyle}"
|
||
Margin="8,0,8,0" />
|
||
<Button Grid.Column="3"
|
||
x:Name="StopDisplacementButton"
|
||
Content="停止"
|
||
Command="{Binding StopDisplacementCommand}"
|
||
Style="{StaticResource StopButtonStyle}"
|
||
Margin="8,0,8,0" />
|
||
<Button Grid.Column="4"
|
||
Content="{Binding DisplacementResetButtonText}"
|
||
Command="{Binding ResetDisplacementCommand}"
|
||
Margin="8,0,0,0" />
|
||
</Grid>
|
||
</Grid>
|
||
</TabItem>
|
||
|
||
<TabItem Header="转速/扭矩测试">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="*" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<ScrollViewer Grid.Row="0"
|
||
VerticalScrollBarVisibility="Auto"
|
||
HorizontalScrollBarVisibility="Disabled"
|
||
PanningMode="VerticalOnly">
|
||
<Grid Margin="0,0,0,0">
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<Grid MinHeight="220">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="0.9*" />
|
||
<ColumnDefinition Width="1.1*" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<Border Style="{StaticResource PanelBorder}" Margin="0,0,10,0">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="*" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<TextBlock Text="实时转速" Style="{StaticResource MetricTitle}" />
|
||
<TextBlock Grid.Row="1"
|
||
x:Name="RealtimeSpeedText"
|
||
Text="{Binding RealtimeSpeedText}"
|
||
Style="{StaticResource MetricValue}"
|
||
FontSize="50"
|
||
Foreground="#0F766E"
|
||
VerticalAlignment="Center" />
|
||
<Border Grid.Row="2" Style="{StaticResource InfoStrip}">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<TextBlock x:Name="SpeedTorqueStatusText"
|
||
Text="{Binding SpeedTorqueStatusText}"
|
||
FontSize="19"
|
||
FontWeight="SemiBold"
|
||
HorizontalAlignment="Center"
|
||
Foreground="#334155" />
|
||
<TextBlock Grid.Row="1"
|
||
x:Name="RealtimePressureText"
|
||
Text="{Binding RealtimePressureText}"
|
||
FontSize="16"
|
||
HorizontalAlignment="Center"
|
||
Foreground="#52616F"
|
||
Margin="0,4,0,0" />
|
||
</Grid>
|
||
</Border>
|
||
</Grid>
|
||
</Border>
|
||
|
||
<Border Grid.Column="1" Style="{StaticResource PanelBorder}" Margin="10,0,0,0">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="*" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<TextBlock Text="实时扭矩" Style="{StaticResource MetricTitle}" />
|
||
<TextBlock Grid.Row="1"
|
||
x:Name="RealtimeTorqueText"
|
||
Text="{Binding RealtimeTorqueText}"
|
||
Style="{StaticResource MetricValue}"
|
||
FontSize="50"
|
||
Foreground="#1D4ED8"
|
||
Margin="0,2,0,4" />
|
||
<Grid Grid.Row="2" MinHeight="96" Margin="0,2,0,0">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="*" />
|
||
</Grid.RowDefinitions>
|
||
<Grid Grid.Row="1">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="17*"/>
|
||
<ColumnDefinition Width="50*"/>
|
||
</Grid.ColumnDefinitions>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="*" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<local:TorqueTrendControl Samples="{Binding TorqueSamples}"
|
||
MinHeight="86" Grid.ColumnSpan="2" />
|
||
<TextBlock Grid.Row="1"
|
||
Text="{Binding TorqueCurveStatusText}"
|
||
FontSize="14"
|
||
FontWeight="SemiBold"
|
||
Foreground="#52616F"
|
||
HorizontalAlignment="Left"
|
||
Margin="115,4,0,0" Grid.Column="1" />
|
||
</Grid>
|
||
</Grid>
|
||
</Grid>
|
||
<TextBlock Grid.Row="3"
|
||
x:Name="FinalSpeedTorqueText"
|
||
Text="{Binding FinalSpeedTorqueText}"
|
||
FontSize="17"
|
||
HorizontalAlignment="Center"
|
||
Foreground="#52616F"
|
||
Margin="0,4,0,0" />
|
||
</Grid>
|
||
</Border>
|
||
</Grid>
|
||
|
||
<Grid Grid.Row="1" Margin="0,12,0,0">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="0.9*" />
|
||
<ColumnDefinition Width="1.1*" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<Border Style="{StaticResource PanelBorder}" Margin="0,0,10,0">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<TextBlock Grid.Row="1"
|
||
x:Name="SpeedTorqueConfigSummaryText"
|
||
Text="{Binding SpeedTorqueConfigSummaryText}"
|
||
Style="{StaticResource MutedText}"
|
||
Margin="0,8,0,0" />
|
||
|
||
<Grid Grid.Row="2" Margin="0,16,0,0">
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="80" />
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="58" />
|
||
</Grid.ColumnDefinitions>
|
||
<TextBlock Text="扭矩设置"
|
||
Style="{StaticResource FormLabel}"
|
||
VerticalAlignment="Center"
|
||
Margin="0,0,12,0" />
|
||
<TextBox Grid.Column="1"
|
||
x:Name="HoldTorqueInput"
|
||
Text="{Binding HoldTorqueInput, UpdateSourceTrigger=PropertyChanged}" TextChanged="HoldTorqueInput_TextChanged" />
|
||
<TextBlock Grid.Column="2"
|
||
Text="Ncm"
|
||
Style="{StaticResource MutedText}"
|
||
VerticalAlignment="Center"
|
||
Margin="8,0,0,0" />
|
||
</Grid>
|
||
<Grid Grid.Row="1" Margin="0,12,0,0">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="80" />
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="58" />
|
||
</Grid.ColumnDefinitions>
|
||
<TextBlock Text="扭矩时间"
|
||
Style="{StaticResource FormLabel}"
|
||
VerticalAlignment="Center"
|
||
Margin="0,0,12,0" />
|
||
<TextBox Grid.Column="1"
|
||
x:Name="TorqueHoldTimeInput"
|
||
Text="{Binding TorqueHoldTimeInput, UpdateSourceTrigger=PropertyChanged}" />
|
||
<TextBlock Grid.Column="2"
|
||
Text="s"
|
||
Style="{StaticResource MutedText}"
|
||
VerticalAlignment="Center"
|
||
Margin="8,0,0,0" />
|
||
</Grid>
|
||
</Grid>
|
||
|
||
</Grid>
|
||
</Border>
|
||
|
||
<Border Grid.Column="1" Style="{StaticResource PanelBorder}" Margin="10,0,0,0">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="128" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<TextBlock Text="当前位移" Style="{StaticResource FormLabel}" />
|
||
<TextBlock Grid.Column="1"
|
||
x:Name="SpeedTorqueDisplacementText"
|
||
Text="{Binding SpeedTorqueDisplacementText}"
|
||
Style="{StaticResource ResultValue}" />
|
||
|
||
<TextBlock Grid.Row="1" Text="最大位移" Style="{StaticResource FormLabel}" Margin="0,16,0,0" />
|
||
<TextBlock Grid.Row="1"
|
||
Grid.Column="1"
|
||
x:Name="SpeedTorqueMaxDisplacementText"
|
||
Text="{Binding SpeedTorqueMaxDisplacementText}"
|
||
Style="{StaticResource ResultValue}"
|
||
Margin="0,16,0,0" />
|
||
|
||
<TextBlock Grid.Row="2" Text="最终位移" Style="{StaticResource FormLabel}" Margin="0,16,0,0" />
|
||
<TextBlock Grid.Row="2"
|
||
Grid.Column="1"
|
||
x:Name="SpeedTorqueFinalDisplacementText"
|
||
Text="{Binding SpeedTorqueFinalDisplacementText}"
|
||
Style="{StaticResource ResultValue}"
|
||
Margin="0,16,0,0" />
|
||
</Grid>
|
||
</Border>
|
||
</Grid>
|
||
|
||
</Grid>
|
||
</ScrollViewer>
|
||
|
||
<Grid Grid.Row="1" Margin="0,12,0,0">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
<Button Content="前进"
|
||
Tag="SpeedTorqueForward"
|
||
PreviewMouseLeftButtonDown="ManualMotionButton_PreviewMouseLeftButtonDown"
|
||
PreviewMouseLeftButtonUp="ManualMotionButton_PreviewMouseLeftButtonUp"
|
||
PreviewTouchDown="ManualMotionButton_PreviewTouchDown"
|
||
PreviewTouchUp="ManualMotionButton_PreviewTouchUp"
|
||
MouseLeave="ManualMotionButton_MouseLeave"
|
||
LostMouseCapture="ManualMotionButton_LostMouseCapture"
|
||
LostTouchCapture="ManualMotionButton_LostTouchCapture"
|
||
Margin="0,0,8,0" />
|
||
<Button Grid.Column="1"
|
||
Content="后退"
|
||
Tag="SpeedTorqueBackward"
|
||
PreviewMouseLeftButtonDown="ManualMotionButton_PreviewMouseLeftButtonDown"
|
||
PreviewMouseLeftButtonUp="ManualMotionButton_PreviewMouseLeftButtonUp"
|
||
PreviewTouchDown="ManualMotionButton_PreviewTouchDown"
|
||
PreviewTouchUp="ManualMotionButton_PreviewTouchUp"
|
||
MouseLeave="ManualMotionButton_MouseLeave"
|
||
LostMouseCapture="ManualMotionButton_LostMouseCapture"
|
||
LostTouchCapture="ManualMotionButton_LostTouchCapture"
|
||
Margin="8,0,8,0" />
|
||
<Button Grid.Column="2"
|
||
Content="启动"
|
||
Command="{Binding StartSpeedTorqueCommand}"
|
||
Style="{StaticResource StartButtonStyle}"
|
||
Margin="8,0,8,0" />
|
||
<Button Grid.Column="3"
|
||
Content="停止"
|
||
Command="{Binding StopSpeedTorqueCommand}"
|
||
Style="{StaticResource StopButtonStyle}"
|
||
Margin="8,0,8,0" />
|
||
<Button Grid.Column="4"
|
||
Content="{Binding SpeedTorqueResetButtonText}"
|
||
Command="{Binding ResetSpeedTorqueCommand}"
|
||
Margin="8,0,0,0" />
|
||
</Grid>
|
||
</Grid>
|
||
</TabItem>
|
||
|
||
<TabItem Header="空载转速测试">
|
||
<Grid Margin="0,14,0,0">
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="*" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<ScrollViewer Grid.Row="0"
|
||
VerticalScrollBarVisibility="Auto"
|
||
HorizontalScrollBarVisibility="Disabled"
|
||
PanningMode="VerticalOnly">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<Grid MinHeight="260">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<Border Style="{StaticResource PanelBorder}" Margin="0,0,10,0">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="*" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<TextBlock Text="空载转速" Style="{StaticResource MetricTitle}" />
|
||
<TextBlock Grid.Row="1"
|
||
Text="{Binding NoLoadSpeedRecordText}"
|
||
Style="{StaticResource MetricValue}"
|
||
Foreground="#0F766E"
|
||
VerticalAlignment="Center" />
|
||
</Grid>
|
||
</Border>
|
||
|
||
<Border Grid.Column="1" Style="{StaticResource PanelBorder}" Margin="10,0,0,0">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="*" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<TextBlock Text="转速误差率" Style="{StaticResource MetricTitle}" />
|
||
<TextBlock Grid.Row="1"
|
||
Text="{Binding NoLoadSpeedErrorRateText}"
|
||
Style="{StaticResource MetricValue}"
|
||
Foreground="#1D4ED8"
|
||
VerticalAlignment="Center" />
|
||
</Grid>
|
||
</Border>
|
||
</Grid>
|
||
|
||
<Border Grid.Row="1" Style="{StaticResource PanelBorder}" Margin="0,14,0,0">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="210" />
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="100" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<TextBlock Grid.ColumnSpan="3"
|
||
Text="空载转速设置"
|
||
Style="{StaticResource MetricTitle}"
|
||
HorizontalAlignment="Left" />
|
||
<TextBlock Grid.Row="1"
|
||
Text="目标空载转速"
|
||
Style="{StaticResource FormLabel}"
|
||
Margin="0,16,12,0" />
|
||
<TextBox Grid.Row="1"
|
||
Grid.Column="1"
|
||
Text="{Binding NoLoadSpeedSettingInput, UpdateSourceTrigger=PropertyChanged}"
|
||
Margin="0,16,12,0" />
|
||
<TextBlock Grid.Row="1"
|
||
Grid.Column="2"
|
||
Text="r/min"
|
||
Style="{StaticResource MutedText}"
|
||
Margin="0,16,0,0"
|
||
VerticalAlignment="Center" />
|
||
<Border Grid.Row="2"
|
||
Grid.ColumnSpan="3"
|
||
Style="{StaticResource InfoStrip}"
|
||
Margin="0,16,0,0">
|
||
<TextBlock Text="{Binding NoLoadSpeedStatusText}"
|
||
FontSize="18"
|
||
FontWeight="SemiBold"
|
||
HorizontalAlignment="Center"
|
||
Foreground="#334155" />
|
||
</Border>
|
||
</Grid>
|
||
</Border>
|
||
</Grid>
|
||
</ScrollViewer>
|
||
|
||
<Grid Grid.Row="1" Margin="0,14,0,0">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
<Button Content="保存空载转速设置"
|
||
Command="{Binding SaveNoLoadSpeedSettingCommand}"
|
||
Margin="0,0,8,0" />
|
||
<Button Grid.Column="1"
|
||
Content="开始空载转速"
|
||
Command="{Binding RecordNoLoadSpeedCommand}"
|
||
Style="{StaticResource StartButtonStyle}"
|
||
Margin="8,0,0,0" />
|
||
</Grid>
|
||
</Grid>
|
||
</TabItem>
|
||
|
||
<TabItem Header="参数配置">
|
||
<Grid Margin="0,14,0,0">
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="*" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<ScrollViewer Grid.Row="0" VerticalScrollBarVisibility="Auto">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<Border Style="{StaticResource PanelBorder}" Margin="0,0,8,0">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="170" />
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="90" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<TextBlock Grid.ColumnSpan="3" Text="轴向移动量参数(2号轴)" Style="{StaticResource MetricTitle}" HorizontalAlignment="Left" />
|
||
|
||
<TextBlock Grid.Row="1" Text="位移极限" Style="{StaticResource FormLabel}" Margin="0,16,0,0" />
|
||
<TextBox Grid.Row="1" Grid.Column="1" x:Name="AxialDisplacementLimitInput" Text="{Binding AxialDisplacementLimitInput, UpdateSourceTrigger=PropertyChanged}" Margin="0,16,10,0" />
|
||
<TextBlock Grid.Row="1" Grid.Column="2" Text="mm" Style="{StaticResource MutedText}" Margin="0,16,0,0" VerticalAlignment="Center" />
|
||
|
||
<TextBlock Grid.Row="2" Text="手/自动速度" Style="{StaticResource FormLabel}" Margin="0,14,0,0" />
|
||
<TextBox Grid.Row="2" Grid.Column="1" x:Name="AxialSpeedInput" Text="{Binding AxialSpeedInput, UpdateSourceTrigger=PropertyChanged}" Margin="0,14,10,0" />
|
||
<TextBlock Grid.Row="2" Grid.Column="2" Text="mm/min" Style="{StaticResource MutedText}" Margin="0,14,0,0" VerticalAlignment="Center" />
|
||
|
||
<TextBlock Grid.Row="3" Text="手动位移" Style="{StaticResource FormLabel}" Margin="0,14,0,0" />
|
||
<TextBox Grid.Row="3" Grid.Column="1" x:Name="AxialManualDisplacementInput" Text="{Binding AxialManualDisplacementInput, UpdateSourceTrigger=PropertyChanged}" Margin="0,14,10,0" />
|
||
<TextBlock Grid.Row="3" Grid.Column="2" Text="mm" Style="{StaticResource MutedText}" Margin="0,14,0,0" VerticalAlignment="Center" />
|
||
|
||
<TextBlock Grid.Row="4" Text="轴向力下限" Style="{StaticResource FormLabel}" Margin="0,14,0,0" />
|
||
<TextBox Grid.Row="4" Grid.Column="1" x:Name="AxialForceLowerLimitInput" Text="{Binding AxialForceLowerLimitInput, UpdateSourceTrigger=PropertyChanged}" Margin="0,14,10,0" />
|
||
<TextBlock Grid.Row="4" Grid.Column="2" Text="N" Style="{StaticResource MutedText}" Margin="0,14,0,0" VerticalAlignment="Center" />
|
||
|
||
<TextBlock Grid.Row="5" Text="轴向力上限" Style="{StaticResource FormLabel}" Margin="0,14,0,0" />
|
||
<TextBox Grid.Row="5" Grid.Column="1" x:Name="AxialForceUpperLimitInput" Text="{Binding AxialForceUpperLimitInput, UpdateSourceTrigger=PropertyChanged}" Margin="0,14,10,0" />
|
||
<TextBlock Grid.Row="5" Grid.Column="2" Text="N" Style="{StaticResource MutedText}" Margin="0,14,0,0" VerticalAlignment="Center" />
|
||
|
||
<TextBlock Grid.Row="6" Text="轴向力系数" Style="{StaticResource FormLabel}" Margin="0,14,0,0" />
|
||
<TextBox Grid.Row="6" Grid.Column="1" x:Name="AxialForceCoefficientInput" Text="{Binding AxialForceCoefficientInput, UpdateSourceTrigger=PropertyChanged}" Margin="0,14,10,0" />
|
||
<TextBlock Grid.Row="6" Grid.Column="2" Text="系数" Style="{StaticResource MutedText}" Margin="0,14,0,0" VerticalAlignment="Center" />
|
||
|
||
<TextBlock Grid.Row="7" Text="轴向力保护" Style="{StaticResource FormLabel}" Margin="0,14,0,0" />
|
||
<TextBox Grid.Row="7" Grid.Column="1" x:Name="AxialForceProtectionInput" Text="{Binding AxialForceProtectionInput, UpdateSourceTrigger=PropertyChanged}" Margin="0,14,10,0" />
|
||
<TextBlock Grid.Row="7" Grid.Column="2" Text="N" Style="{StaticResource MutedText}" Margin="0,14,0,0" VerticalAlignment="Center" />
|
||
</Grid>
|
||
</Border>
|
||
|
||
<Border Grid.Column="1" Style="{StaticResource PanelBorder}" Margin="8,0,0,0">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="170" />
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="90" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<TextBlock Grid.ColumnSpan="3" Text="转速/扭矩参数(1号轴)" Style="{StaticResource MetricTitle}" HorizontalAlignment="Left" />
|
||
|
||
<TextBlock Grid.Row="1" Text="位移极限" Style="{StaticResource FormLabel}" Margin="0,16,0,0" />
|
||
<TextBox Grid.Row="1" Grid.Column="1" x:Name="SpeedTorqueDisplacementLimitInput" Text="{Binding SpeedTorqueDisplacementLimitInput, UpdateSourceTrigger=PropertyChanged}" Margin="0,16,10,0" />
|
||
<TextBlock Grid.Row="1" Grid.Column="2" Text="mm" Style="{StaticResource MutedText}" Margin="0,16,0,0" VerticalAlignment="Center" />
|
||
|
||
<TextBlock Grid.Row="2" Text="手/自动速度" Style="{StaticResource FormLabel}" Margin="0,14,0,0" />
|
||
<TextBox Grid.Row="2" Grid.Column="1" x:Name="SpeedTorqueSpeedInput" Text="{Binding SpeedTorqueSpeedInput, UpdateSourceTrigger=PropertyChanged}" Margin="0,14,10,0" />
|
||
<TextBlock Grid.Row="2" Grid.Column="2" Text="mm/min" Style="{StaticResource MutedText}" Margin="0,14,0,0" VerticalAlignment="Center" />
|
||
|
||
<TextBlock Grid.Row="3" Text="手动位移" Style="{StaticResource FormLabel}" Margin="0,14,0,0" />
|
||
<TextBox Grid.Row="3" Grid.Column="1" x:Name="SpeedTorqueManualDisplacementInput" Text="{Binding SpeedTorqueManualDisplacementInput, UpdateSourceTrigger=PropertyChanged}" Margin="0,14,10,0" />
|
||
<TextBlock Grid.Row="3" Grid.Column="2" Text="mm" Style="{StaticResource MutedText}" Margin="0,14,0,0" VerticalAlignment="Center" />
|
||
|
||
<TextBlock Grid.Row="4" Text="扭矩系数" Style="{StaticResource FormLabel}" Margin="0,14,0,0" />
|
||
<TextBox Grid.Row="4" Grid.Column="1" x:Name="TorqueCoefficientInput" Text="{Binding TorqueCoefficientInput, UpdateSourceTrigger=PropertyChanged}" Margin="0,14,10,0" />
|
||
<TextBlock Grid.Row="4" Grid.Column="2" Text="系数" Style="{StaticResource MutedText}" Margin="0,14,0,0" VerticalAlignment="Center" />
|
||
|
||
<TextBlock Grid.Row="5" Text="扭矩保护" Style="{StaticResource FormLabel}" Margin="0,14,0,0" />
|
||
<TextBox Grid.Row="5" Grid.Column="1" x:Name="TorqueProtectionInput" Text="{Binding TorqueProtectionInput, UpdateSourceTrigger=PropertyChanged}" Margin="0,14,10,0" />
|
||
<TextBlock Grid.Row="5" Grid.Column="2" Text="Ncm" Style="{StaticResource MutedText}" Margin="0,14,0,0" VerticalAlignment="Center" />
|
||
|
||
<TextBlock Grid.Row="6" Text="转速系数" Style="{StaticResource FormLabel}" Margin="0,14,0,0" />
|
||
<TextBox Grid.Row="6" Grid.Column="1" x:Name="SpeedCoefficientInput" Text="{Binding SpeedCoefficientInput, UpdateSourceTrigger=PropertyChanged}" Margin="0,14,10,0" />
|
||
<TextBlock Grid.Row="6" Grid.Column="2" Text="系数" Style="{StaticResource MutedText}" Margin="0,14,0,0" VerticalAlignment="Center" />
|
||
|
||
<TextBlock Grid.Row="7" Text="低速停止" Style="{StaticResource FormLabel}" Margin="0,14,0,0" />
|
||
<TextBox Grid.Row="7" Grid.Column="1" x:Name="SpeedStopThresholdInput" Text="{Binding SpeedStopThresholdInput, UpdateSourceTrigger=PropertyChanged}" Margin="0,14,10,0" />
|
||
<TextBlock Grid.Row="7" Grid.Column="2" Text="r/min" Style="{StaticResource MutedText}" Margin="0,14,0,0" VerticalAlignment="Center" />
|
||
|
||
<TextBlock Grid.Row="8" Text="压力系数" Style="{StaticResource FormLabel}" Margin="0,14,0,0" />
|
||
<TextBox Grid.Row="8" Grid.Column="1" x:Name="PressureCoefficientInput" Text="{Binding PressureCoefficientInput, UpdateSourceTrigger=PropertyChanged}" Margin="0,14,10,0" />
|
||
<TextBlock Grid.Row="8" Grid.Column="2" Text="系数" Style="{StaticResource MutedText}" Margin="0,14,0,0" VerticalAlignment="Center" />
|
||
</Grid>
|
||
</Border>
|
||
|
||
<Border Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource PanelBorder}" Margin="0,14,0,0">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="140" />
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="90" />
|
||
<ColumnDefinition Width="140" />
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="90" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
|
||
<TextBlock Grid.Row="1" Text="IP地址" Style="{StaticResource FormLabel}" Margin="0,16,0,0" />
|
||
<TextBox Grid.Row="1" Grid.Column="1" x:Name="PlcIpAddressInput" Text="{Binding PlcIpAddressInput, UpdateSourceTrigger=PropertyChanged}" Margin="0,16,10,0" />
|
||
<TextBlock Grid.Row="1" Grid.Column="3" Text="端口" Style="{StaticResource FormLabel}" Margin="0,16,0,0" />
|
||
<TextBox Grid.Row="1" Grid.Column="4" x:Name="PlcPortInput" Text="{Binding PlcPortInput, UpdateSourceTrigger=PropertyChanged}" Margin="0,16,10,0" />
|
||
|
||
<TextBlock Grid.Row="2" Text="站号" Style="{StaticResource FormLabel}" Margin="0,14,0,0" />
|
||
<TextBox Grid.Row="2" Grid.Column="1" x:Name="PlcUnitIdInput" Text="{Binding PlcUnitIdInput, UpdateSourceTrigger=PropertyChanged}" Margin="0,14,10,0" />
|
||
<TextBlock Grid.Row="2" Grid.Column="3" Text="脉冲/超时" Style="{StaticResource FormLabel}" Margin="0,14,0,0" />
|
||
<Grid Grid.Row="2" Grid.Column="4" Grid.ColumnSpan="2" Margin="0,14,0,0">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="10" />
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="54" />
|
||
</Grid.ColumnDefinitions>
|
||
<TextBox x:Name="PlcPulseMillisecondsInput" Text="{Binding PlcPulseMillisecondsInput, UpdateSourceTrigger=PropertyChanged}" />
|
||
<TextBox Grid.Column="2" x:Name="PlcTimeoutMillisecondsInput" Text="{Binding PlcTimeoutMillisecondsInput, UpdateSourceTrigger=PropertyChanged}" />
|
||
<TextBlock Grid.Column="3" Text="ms" Style="{StaticResource MutedText}" Margin="10,0,0,0" VerticalAlignment="Center" />
|
||
</Grid>
|
||
</Grid>
|
||
</Border>
|
||
|
||
</Grid>
|
||
</ScrollViewer>
|
||
|
||
<Border Grid.Row="1" Style="{StaticResource PanelBorder}" Margin="0,14,0,0">
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="160" />
|
||
</Grid.ColumnDefinitions>
|
||
<TextBlock x:Name="ParameterStatusText"
|
||
Text="{Binding ParameterStatusText}"
|
||
Style="{StaticResource MutedText}"
|
||
VerticalAlignment="Center" />
|
||
<Button Grid.Column="1"
|
||
Content="保存参数"
|
||
Command="{Binding SaveParameterConfigCommand}"
|
||
Margin="12,0,0,0" />
|
||
</Grid>
|
||
</Border>
|
||
</Grid>
|
||
</TabItem>
|
||
|
||
<TabItem Header="记录/导出">
|
||
<Grid Margin="0,14,0,0">
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="*" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<Border Style="{StaticResource PanelBorder}">
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="150" />
|
||
<ColumnDefinition Width="150" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<TextBlock x:Name="StatusText"
|
||
Text="{Binding StatusText}"
|
||
FontSize="20"
|
||
FontWeight="SemiBold"
|
||
VerticalAlignment="Center"
|
||
Foreground="#52616F" />
|
||
<Button Grid.Column="1"
|
||
Content="保存记录"
|
||
Command="{Binding SaveRecordCommand}"
|
||
Margin="12,0,6,0" />
|
||
<Button Grid.Column="2"
|
||
Content="导出 Excel"
|
||
Command="{Binding ExportCommand}"
|
||
Margin="6,0,0,0" />
|
||
</Grid>
|
||
</Border>
|
||
|
||
<DataGrid Grid.Row="1"
|
||
x:Name="RecordsGrid"
|
||
ItemsSource="{Binding Records}"
|
||
Margin="0,12,0,0"
|
||
AutoGenerateColumns="False"
|
||
IsReadOnly="True"
|
||
CanUserAddRows="False"
|
||
HeadersVisibility="Column"
|
||
RowHeight="44"
|
||
FontSize="15">
|
||
<DataGrid.Columns>
|
||
<DataGridTextColumn Header="时间" Binding="{Binding CreatedAtText}" Width="180" />
|
||
<DataGridTextColumn Header="结果" Binding="{Binding OverallResult}" Width="90" />
|
||
<DataGridTextColumn Header="Excel文件" Binding="{Binding ExportPathText}" Width="*" />
|
||
</DataGrid.Columns>
|
||
</DataGrid>
|
||
</Grid>
|
||
</TabItem>
|
||
</TabControl>
|
||
</DockPanel>
|
||
|
||
<Border x:Name="HiddenSettingsHotspot"
|
||
Width="56"
|
||
Height="56"
|
||
HorizontalAlignment="Left"
|
||
VerticalAlignment="Bottom"
|
||
Background="Transparent"
|
||
Panel.ZIndex="100"
|
||
PreviewMouseLeftButtonDown="HiddenSettingsHotspot_PreviewMouseLeftButtonDown"
|
||
PreviewMouseLeftButtonUp="HiddenSettingsHotspot_PreviewMouseLeftButtonUp"
|
||
PreviewTouchDown="HiddenSettingsHotspot_PreviewTouchDown"
|
||
PreviewTouchUp="HiddenSettingsHotspot_PreviewTouchUp"
|
||
MouseLeave="HiddenSettingsHotspot_MouseLeave"
|
||
LostMouseCapture="HiddenSettingsHotspot_LostMouseCapture"
|
||
LostTouchCapture="HiddenSettingsHotspot_LostTouchCapture" />
|
||
</Grid>
|
||
</Window>
|