将Feature/XP.Common和Feature/XP.Hardware分支合并至Develop/XP.forHardwareAndCommon,完善XPapp注册和相关硬件类库通用类库功能。

This commit is contained in:
QI Mingxuan
2026-04-16 17:31:13 +08:00
parent 6ec4c3ddaa
commit 2bd6e566c3
581 changed files with 74600 additions and 222 deletions
@@ -0,0 +1,118 @@
<UserControl x:Class="XP.Hardware.MotionControl.Views.MotionControlView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:loc="clr-namespace:XP.Common.Localization.Extensions;assembly=XP.Common"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:prism="http://prismlibrary.com/"
prism:ViewModelLocator.AutoWireViewModel="True"
mc:Ignorable="d"
HorizontalAlignment="Stretch" Background="White">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel Margin="8">
<GroupBox Margin="0,0,0,6">
<GroupBox.Header><TextBlock Text="{loc:Localization MC_DoorStatus_Title}" FontWeight="Bold" FontSize="12"/></GroupBox.Header>
<DockPanel Margin="5" LastChildFill="False">
<TextBlock Text="{loc:Localization MC_DoorStatus}" FontSize="12" Foreground="#616161" VerticalAlignment="Center" Margin="0,0,5,0" DockPanel.Dock="Left"/>
<TextBlock Text="{Binding DoorStatus}" FontSize="12" FontWeight="Bold" VerticalAlignment="Center" Margin="5,0,5,0" DockPanel.Dock="Left"/>
<TextBlock Text="{Binding InterlockStatusText}" FontSize="12" VerticalAlignment="Center" DockPanel.Dock="Left" FontWeight="Bold" Margin="5,0,5,0">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="#FFE53935"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsInterlocked}" Value="True">
<Setter Property="Foreground" Value="#FF43A047"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<telerik:RadButton Content="{loc:Localization MC_CloseDoor}" Command="{Binding CloseDoorCommand}" Width="60" Height="22" FontSize="12" Margin="3,0,0,0" DockPanel.Dock="Right" telerik:StyleManager.Theme="Crystal"/>
<telerik:RadButton Content="{loc:Localization MC_OpenDoor}" Command="{Binding OpenDoorCommand}" IsEnabled="{Binding IsNotInterlocked}" Width="60" Height="22" FontSize="12" DockPanel.Dock="Right" telerik:StyleManager.Theme="Crystal"/>
</DockPanel>
</GroupBox>
<GroupBox Margin="0,0,0,6">
<GroupBox.Header><TextBlock Text="{loc:Localization MC_Geometry_Title}" FontWeight="Bold" FontSize="12"/></GroupBox.Header>
<StackPanel Margin="5">
<Grid Margin="0,0,0,4">
<Grid.ColumnDefinitions><ColumnDefinition Width="Auto" MinWidth="35"/><ColumnDefinition Width="*"/><ColumnDefinition Width="Auto" MinWidth="35"/><ColumnDefinition Width="*"/><ColumnDefinition Width="Auto" MinWidth="18"/><ColumnDefinition Width="*"/></Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{loc:Localization MC_FOD}" FontSize="12" Foreground="#616161" VerticalAlignment="Center"/>
<TextBlock Grid.Column="1" Text="{Binding FOD, StringFormat=F2}" FontSize="12" FontWeight="SemiBold" VerticalAlignment="Center" Margin="4,0"/>
<TextBlock Grid.Column="2" Text="{loc:Localization MC_FDD}" FontSize="12" Foreground="#616161" VerticalAlignment="Center"/>
<TextBlock Grid.Column="3" Text="{Binding FDD, StringFormat=F2}" FontSize="12" FontWeight="SemiBold" VerticalAlignment="Center" Margin="4,0"/>
<TextBlock Grid.Column="4" Text="{loc:Localization MC_Magnification}" FontSize="12" Foreground="#616161" VerticalAlignment="Center"/>
<TextBlock Grid.Column="5" Text="{Binding Magnification, StringFormat=F3}" FontSize="12" FontWeight="SemiBold" VerticalAlignment="Center" Margin="4,0"/>
</Grid>
</StackPanel>
</GroupBox>
<GroupBox Margin="0,0,0,6">
<GroupBox.Header><TextBlock Text="{loc:Localization MC_Axes_Title}" FontWeight="Bold" FontSize="12"/></GroupBox.Header>
<StackPanel Margin="5">
<Grid>
<Grid.ColumnDefinitions><ColumnDefinition Width="Auto" MinWidth="70"/><ColumnDefinition Width="*"/><ColumnDefinition Width="*"/></Grid.ColumnDefinitions>
<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>
<TextBlock Grid.Row="0" Grid.Column="0" Text="{loc:Localization MC_Axis}" FontWeight="Bold" FontSize="12" Margin="0,0,0,2"/>
<TextBlock Grid.Row="0" Grid.Column="1" Text="{loc:Localization MC_Actual}" FontWeight="Bold" FontSize="12" HorizontalAlignment="Center" Margin="4,0,0,2"/>
<TextBlock Grid.Row="0" Grid.Column="2" Text="{loc:Localization MC_Target}" FontWeight="Bold" FontSize="12" HorizontalAlignment="Center" Margin="4,0,0,2"/>
<TextBlock Grid.Row="1" Grid.Column="0" Text="{loc:Localization MC_SourceZ}" FontSize="12" VerticalAlignment="Center" Margin="0,2"/>
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding SourceZActual, StringFormat=F2}" FontSize="12" FontWeight="SemiBold" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2"/>
<telerik:RadNumericUpDown Grid.Row="1" Grid.Column="2" Value="{Binding SourceZTarget, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ValueFormat="Numeric" NumberDecimalDigits="2" SmallChange="0.1" LargeChange="1" Margin="4,2" telerik:StyleManager.Theme="Crystal"/>
<TextBlock Grid.Row="2" Grid.Column="0" Text="{loc:Localization MC_DetectorZ}" FontSize="12" VerticalAlignment="Center" Margin="0,2"/>
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding DetectorZActual, StringFormat=F2}" FontSize="12" FontWeight="SemiBold" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2"/>
<telerik:RadNumericUpDown Grid.Row="2" Grid.Column="2" Value="{Binding DetectorZTarget, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ValueFormat="Numeric" NumberDecimalDigits="2" SmallChange="0.1" LargeChange="1" Margin="4,2" telerik:StyleManager.Theme="Crystal"/>
<TextBlock Grid.Row="3" Grid.Column="0" Text="{loc:Localization MC_StageX}" FontSize="12" VerticalAlignment="Center" Margin="0,2"/>
<TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding StageXActual, StringFormat=F2}" FontSize="12" FontWeight="SemiBold" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2"/>
<telerik:RadNumericUpDown Grid.Row="3" Grid.Column="2" Value="{Binding StageXTarget, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ValueFormat="Numeric" NumberDecimalDigits="2" SmallChange="0.1" LargeChange="1" Margin="4,2" telerik:StyleManager.Theme="Crystal"/>
<TextBlock Grid.Row="4" Grid.Column="0" Text="{loc:Localization MC_StageY}" FontSize="12" VerticalAlignment="Center" Margin="0,2"/>
<TextBlock Grid.Row="4" Grid.Column="1" Text="{Binding StageYActual, StringFormat=F2}" FontSize="12" FontWeight="SemiBold" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2"/>
<telerik:RadNumericUpDown Grid.Row="4" Grid.Column="2" Value="{Binding StageYTarget, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ValueFormat="Numeric" NumberDecimalDigits="2" SmallChange="0.1" LargeChange="1" Margin="4,2" telerik:StyleManager.Theme="Crystal"/>
<TextBlock Grid.Row="5" Grid.Column="0" Text="{loc:Localization MC_DetSwing}" FontSize="12" VerticalAlignment="Center" Margin="0,2"/>
<TextBlock Grid.Row="5" Grid.Column="1" Text="{Binding DetSwingActual, StringFormat=F2}" FontSize="12" FontWeight="SemiBold" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2"/>
<telerik:RadNumericUpDown Grid.Row="5" Grid.Column="2" Value="{Binding DetSwingTarget, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ValueFormat="Numeric" NumberDecimalDigits="2" SmallChange="0.1" LargeChange="1" Margin="4,2" telerik:StyleManager.Theme="Crystal"/>
<TextBlock Grid.Row="6" Grid.Column="0" Text="{loc:Localization MC_StageRot}" FontSize="12" VerticalAlignment="Center" Margin="0,2" Visibility="{Binding StageRotationVisibility}"/>
<TextBlock Grid.Row="6" Grid.Column="1" Text="{Binding StageRotActual, StringFormat=F2}" FontSize="12" FontWeight="SemiBold" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2" Visibility="{Binding StageRotationVisibility}"/>
<telerik:RadNumericUpDown Grid.Row="6" Grid.Column="2" Value="{Binding StageRotTarget, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ValueFormat="Numeric" NumberDecimalDigits="2" SmallChange="0.1" LargeChange="1" Margin="4,2" Visibility="{Binding StageRotationVisibility}" telerik:StyleManager.Theme="Crystal"/>
<TextBlock Grid.Row="7" Grid.Column="0" Text="{loc:Localization MC_FixtureRot}" FontSize="12" VerticalAlignment="Center" Margin="0,2" Visibility="{Binding FixtureRotationVisibility}"/>
<TextBlock Grid.Row="7" Grid.Column="1" Text="{Binding FixtureRotActual, StringFormat=F2}" FontSize="12" FontWeight="SemiBold" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,2" Visibility="{Binding FixtureRotationVisibility}"/>
<telerik:RadNumericUpDown Grid.Row="7" Grid.Column="2" Value="{Binding FixtureRotTarget, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ValueFormat="Numeric" NumberDecimalDigits="2" SmallChange="0.1" LargeChange="1" Margin="4,2" Visibility="{Binding FixtureRotationVisibility}" telerik:StyleManager.Theme="Crystal"/>
</Grid>
<UniformGrid Columns="4" Margin="0,6,0,0">
<telerik:RadButton Content="{loc:Localization MC_Move}" Command="{Binding MoveCommand}" Height="28" Margin="3" telerik:StyleManager.Theme="Crystal" FontSize="12">
<telerik:RadButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="White"/>
<GradientStop Color="#FF62B8E0" Offset="1"/>
</LinearGradientBrush>
</telerik:RadButton.Background>
</telerik:RadButton>
<telerik:RadButton Content="{loc:Localization MC_Stop}" Command="{Binding StopCommand}" Height="28" Margin="3" telerik:StyleManager.Theme="Crystal" FontSize="12">
<telerik:RadButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="White"/>
<GradientStop Color="#FFFFA1A1" Offset="1"/>
</LinearGradientBrush>
</telerik:RadButton.Background>
</telerik:RadButton>
<telerik:RadButton Content="{loc:Localization MC_Home}" Command="{Binding HomeCommand}" Height="28" Margin="3" telerik:StyleManager.Theme="Crystal" FontSize="12">
<telerik:RadButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="White"/>
<GradientStop Color="#FF77E062" Offset="1"/>
</LinearGradientBrush>
</telerik:RadButton.Background>
</telerik:RadButton>
<telerik:RadButton Content="{loc:Localization MC_CopyActualToTarget}" Command="{Binding CopyActualToTargetCommand}" Height="28" Margin="3" telerik:StyleManager.Theme="Crystal" FontSize="12">
<telerik:RadButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="White"/>
<GradientStop Color="#FFFFD54F" Offset="1"/>
</LinearGradientBrush>
</telerik:RadButton.Background>
</telerik:RadButton>
</UniformGrid>
</StackPanel>
</GroupBox>
</StackPanel>
</ScrollViewer>
</UserControl>
@@ -0,0 +1,17 @@
namespace XP.Hardware.MotionControl.Views
{
/// <summary>
/// 运动控制操作面板视图 | Motion Control Operation Panel View
/// 宽度 350px 的 UserControl,包含安全门状态区、直线轴区、旋转轴区、
/// 几何信息区、主操作按钮区和可折叠调试区
/// Width 350px UserControl containing safety door status, linear axes, rotary axes,
/// geometry info, main operation buttons and collapsible debug area
/// </summary>
public partial class MotionControlView : System.Windows.Controls.UserControl
{
public MotionControlView()
{
InitializeComponent();
}
}
}
@@ -0,0 +1,211 @@
<Window x:Class="XP.Hardware.MotionControl.Views.MotionDebugWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:loc="clr-namespace:XP.Common.Localization.Extensions;assembly=XP.Common"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:prism="http://prismlibrary.com/"
prism:ViewModelLocator.AutoWireViewModel="True"
mc:Ignorable="d"
Title="{loc:Localization MC_DebugWindow_Title}" SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner" ResizeMode="NoResize" Background="White">
<StackPanel Margin="10">
<!-- 速度滑块 | Speed Slider -->
<GroupBox Margin="0,0,0,8">
<GroupBox.Header>
<TextBlock Text="{loc:Localization MC_JogSpeed_Title}" FontWeight="Bold" FontSize="12"/>
</GroupBox.Header>
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<telerik:RadSlider Grid.Column="0" Minimum="1" Maximum="150"
Value="{Binding SpeedPercent, Mode=TwoWay}"
SmallChange="1" LargeChange="10"
TickFrequency="10" TickPlacement="BottomRight"
IsSnapToTickEnabled="False"
telerik:StyleManager.Theme="Crystal"
VerticalAlignment="Center" Margin="0,0,8,0"/>
<TextBlock Grid.Column="1" FontSize="12" FontWeight="SemiBold" VerticalAlignment="Center">
<Run Text="{Binding SpeedPercent, StringFormat=F0}"/><Run Text="% ("/><Run Text="{Binding ActualSpeed, StringFormat=F1, Mode=OneWay}"/><Run Text=")"/>
</TextBlock>
</Grid>
</GroupBox>
<!-- Jog 按钮区 | Jog Buttons Area -->
<GroupBox>
<GroupBox.Header>
<TextBlock Text="{loc:Localization MC_Debug_Title}" FontWeight="Bold" FontSize="12"/>
</GroupBox.Header>
<StackPanel Margin="5">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="18"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Row 0: SourceZ | DetectorZ -->
<TextBlock Grid.Row="0" Grid.Column="0" Text="{loc:Localization MC_SourceZ}" FontSize="12" VerticalAlignment="Center" Margin="0,2,5,2"/>
<telerik:RadButton Grid.Row="0" Grid.Column="1" Content="+" Width="28" Height="28" FontSize="13" FontWeight="Bold" Padding="0" Margin="0,2,2,2" telerik:StyleManager.Theme="Crystal">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown"><i:InvokeCommandAction Command="{Binding JogPlusCommand}" CommandParameter="SourceZ"/></i:EventTrigger>
<i:EventTrigger EventName="PreviewMouseLeftButtonUp"><i:InvokeCommandAction Command="{Binding JogStopCommand}" CommandParameter="SourceZ"/></i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadButton>
<telerik:RadButton Grid.Row="0" Grid.Column="2" Content="&#x2212;" Width="28" Height="28" FontSize="13" FontWeight="Bold" Padding="0" Margin="0,2,2,2" telerik:StyleManager.Theme="Crystal">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown"><i:InvokeCommandAction Command="{Binding JogMinusCommand}" CommandParameter="SourceZ"/></i:EventTrigger>
<i:EventTrigger EventName="PreviewMouseLeftButtonUp"><i:InvokeCommandAction Command="{Binding JogStopCommand}" CommandParameter="SourceZ"/></i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadButton>
<telerik:RadButton Grid.Row="0" Grid.Column="3" Content="R" Width="28" Height="28" FontSize="11" FontWeight="Bold" Padding="0" Margin="0,2" ToolTip="Home" Command="{Binding HomeAxisCommand}" CommandParameter="SourceZ" telerik:StyleManager.Theme="Crystal"/>
<TextBlock Grid.Row="0" Grid.Column="5" Text="{loc:Localization MC_DetectorZ}" FontSize="12" VerticalAlignment="Center" Margin="0,2,5,2"/>
<telerik:RadButton Grid.Row="0" Grid.Column="6" Content="+" Width="28" Height="28" FontSize="13" FontWeight="Bold" Padding="0" Margin="0,2,2,2" telerik:StyleManager.Theme="Crystal">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown"><i:InvokeCommandAction Command="{Binding JogPlusCommand}" CommandParameter="DetectorZ"/></i:EventTrigger>
<i:EventTrigger EventName="PreviewMouseLeftButtonUp"><i:InvokeCommandAction Command="{Binding JogStopCommand}" CommandParameter="DetectorZ"/></i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadButton>
<telerik:RadButton Grid.Row="0" Grid.Column="7" Content="&#x2212;" Width="28" Height="28" FontSize="13" FontWeight="Bold" Padding="0" Margin="0,2,2,2" telerik:StyleManager.Theme="Crystal">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown"><i:InvokeCommandAction Command="{Binding JogMinusCommand}" CommandParameter="DetectorZ"/></i:EventTrigger>
<i:EventTrigger EventName="PreviewMouseLeftButtonUp"><i:InvokeCommandAction Command="{Binding JogStopCommand}" CommandParameter="DetectorZ"/></i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadButton>
<telerik:RadButton Grid.Row="0" Grid.Column="8" Content="R" Width="28" Height="28" FontSize="11" FontWeight="Bold" Padding="0" Margin="0,2" ToolTip="Home" Command="{Binding HomeAxisCommand}" CommandParameter="DetectorZ" telerik:StyleManager.Theme="Crystal"/>
<!-- Row 1: StageX | StageY -->
<TextBlock Grid.Row="1" Grid.Column="0" Text="{loc:Localization MC_StageX}" FontSize="12" VerticalAlignment="Center" Margin="0,2,5,2"/>
<telerik:RadButton Grid.Row="1" Grid.Column="1" Content="+" Width="28" Height="28" FontSize="13" FontWeight="Bold" Padding="0" Margin="0,2,2,2" telerik:StyleManager.Theme="Crystal">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown"><i:InvokeCommandAction Command="{Binding JogPlusCommand}" CommandParameter="StageX"/></i:EventTrigger>
<i:EventTrigger EventName="PreviewMouseLeftButtonUp"><i:InvokeCommandAction Command="{Binding JogStopCommand}" CommandParameter="StageX"/></i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadButton>
<telerik:RadButton Grid.Row="1" Grid.Column="2" Content="&#x2212;" Width="28" Height="28" FontSize="13" FontWeight="Bold" Padding="0" Margin="0,2,2,2" telerik:StyleManager.Theme="Crystal">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown"><i:InvokeCommandAction Command="{Binding JogMinusCommand}" CommandParameter="StageX"/></i:EventTrigger>
<i:EventTrigger EventName="PreviewMouseLeftButtonUp"><i:InvokeCommandAction Command="{Binding JogStopCommand}" CommandParameter="StageX"/></i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadButton>
<telerik:RadButton Grid.Row="1" Grid.Column="3" Content="R" Width="28" Height="28" FontSize="11" FontWeight="Bold" Padding="0" Margin="0,2" ToolTip="Home" Command="{Binding HomeAxisCommand}" CommandParameter="StageX" telerik:StyleManager.Theme="Crystal"/>
<TextBlock Grid.Row="1" Grid.Column="5" Text="{loc:Localization MC_StageY}" FontSize="12" VerticalAlignment="Center" Margin="0,2,5,2"/>
<telerik:RadButton Grid.Row="1" Grid.Column="6" Content="+" Width="28" Height="28" FontSize="13" FontWeight="Bold" Padding="0" Margin="0,2,2,2" telerik:StyleManager.Theme="Crystal">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown"><i:InvokeCommandAction Command="{Binding JogPlusCommand}" CommandParameter="StageY"/></i:EventTrigger>
<i:EventTrigger EventName="PreviewMouseLeftButtonUp"><i:InvokeCommandAction Command="{Binding JogStopCommand}" CommandParameter="StageY"/></i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadButton>
<telerik:RadButton Grid.Row="1" Grid.Column="7" Content="&#x2212;" Width="28" Height="28" FontSize="13" FontWeight="Bold" Padding="0" Margin="0,2,2,2" telerik:StyleManager.Theme="Crystal">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown"><i:InvokeCommandAction Command="{Binding JogMinusCommand}" CommandParameter="StageY"/></i:EventTrigger>
<i:EventTrigger EventName="PreviewMouseLeftButtonUp"><i:InvokeCommandAction Command="{Binding JogStopCommand}" CommandParameter="StageY"/></i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadButton>
<telerik:RadButton Grid.Row="1" Grid.Column="8" Content="R" Width="28" Height="28" FontSize="11" FontWeight="Bold" Padding="0" Margin="0,2" ToolTip="Home" Command="{Binding HomeAxisCommand}" CommandParameter="StageY" telerik:StyleManager.Theme="Crystal"/>
<!-- Row 2: DetSwing | StageRot -->
<TextBlock Grid.Row="2" Grid.Column="0" Text="{loc:Localization MC_DetSwing}" FontSize="12" VerticalAlignment="Center" Margin="0,2,5,2"/>
<telerik:RadButton Grid.Row="2" Grid.Column="1" Content="+" Width="28" Height="28" FontSize="13" FontWeight="Bold" Padding="0" Margin="0,2,2,2" telerik:StyleManager.Theme="Crystal">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown"><i:InvokeCommandAction Command="{Binding JogPlusCommand}" CommandParameter="DetectorSwing"/></i:EventTrigger>
<i:EventTrigger EventName="PreviewMouseLeftButtonUp"><i:InvokeCommandAction Command="{Binding JogStopCommand}" CommandParameter="DetectorSwing"/></i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadButton>
<telerik:RadButton Grid.Row="2" Grid.Column="2" Content="&#x2212;" Width="28" Height="28" FontSize="13" FontWeight="Bold" Padding="0" Margin="0,2,2,2" telerik:StyleManager.Theme="Crystal">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown"><i:InvokeCommandAction Command="{Binding JogMinusCommand}" CommandParameter="DetectorSwing"/></i:EventTrigger>
<i:EventTrigger EventName="PreviewMouseLeftButtonUp"><i:InvokeCommandAction Command="{Binding JogStopCommand}" CommandParameter="DetectorSwing"/></i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadButton>
<telerik:RadButton Grid.Row="2" Grid.Column="3" Content="R" Width="28" Height="28" FontSize="11" FontWeight="Bold" Padding="0" Margin="0,2" ToolTip="Home" Command="{Binding HomeAxisCommand}" CommandParameter="DetectorSwing" telerik:StyleManager.Theme="Crystal"/>
<TextBlock Grid.Row="2" Grid.Column="5" Text="{loc:Localization MC_StageRot}" FontSize="12" VerticalAlignment="Center" Margin="0,2,5,2" Visibility="{Binding StageRotationVisibility}"/>
<telerik:RadButton Grid.Row="2" Grid.Column="6" Content="+" Width="28" Height="28" FontSize="13" FontWeight="Bold" Padding="0" Margin="0,2,2,2" Visibility="{Binding StageRotationVisibility}" telerik:StyleManager.Theme="Crystal">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown"><i:InvokeCommandAction Command="{Binding JogPlusCommand}" CommandParameter="StageRotation"/></i:EventTrigger>
<i:EventTrigger EventName="PreviewMouseLeftButtonUp"><i:InvokeCommandAction Command="{Binding JogStopCommand}" CommandParameter="StageRotation"/></i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadButton>
<telerik:RadButton Grid.Row="2" Grid.Column="7" Content="&#x2212;" Width="28" Height="28" FontSize="13" FontWeight="Bold" Padding="0" Margin="0,2,2,2" Visibility="{Binding StageRotationVisibility}" telerik:StyleManager.Theme="Crystal">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown"><i:InvokeCommandAction Command="{Binding JogMinusCommand}" CommandParameter="StageRotation"/></i:EventTrigger>
<i:EventTrigger EventName="PreviewMouseLeftButtonUp"><i:InvokeCommandAction Command="{Binding JogStopCommand}" CommandParameter="StageRotation"/></i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadButton>
<telerik:RadButton Grid.Row="2" Grid.Column="8" Content="R" Width="28" Height="28" FontSize="11" FontWeight="Bold" Padding="0" Margin="0,2" ToolTip="Home" Visibility="{Binding StageRotationVisibility}" Command="{Binding HomeAxisCommand}" CommandParameter="StageRotation" telerik:StyleManager.Theme="Crystal"/>
<!-- Row 3: FixtureRot | (empty) -->
<TextBlock Grid.Row="3" Grid.Column="0" Text="{loc:Localization MC_FixtureRot}" FontSize="12" VerticalAlignment="Center" Margin="0,2,5,2" Visibility="{Binding FixtureRotationVisibility}"/>
<telerik:RadButton Grid.Row="3" Grid.Column="1" Content="+" Width="28" Height="28" FontSize="13" FontWeight="Bold" Padding="0" Margin="0,2,2,2" Visibility="{Binding FixtureRotationVisibility}" telerik:StyleManager.Theme="Crystal">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown"><i:InvokeCommandAction Command="{Binding JogPlusCommand}" CommandParameter="FixtureRotation"/></i:EventTrigger>
<i:EventTrigger EventName="PreviewMouseLeftButtonUp"><i:InvokeCommandAction Command="{Binding JogStopCommand}" CommandParameter="FixtureRotation"/></i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadButton>
<telerik:RadButton Grid.Row="3" Grid.Column="2" Content="&#x2212;" Width="28" Height="28" FontSize="13" FontWeight="Bold" Padding="0" Margin="0,2,2,2" Visibility="{Binding FixtureRotationVisibility}" telerik:StyleManager.Theme="Crystal">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown"><i:InvokeCommandAction Command="{Binding JogMinusCommand}" CommandParameter="FixtureRotation"/></i:EventTrigger>
<i:EventTrigger EventName="PreviewMouseLeftButtonUp"><i:InvokeCommandAction Command="{Binding JogStopCommand}" CommandParameter="FixtureRotation"/></i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadButton>
<telerik:RadButton Grid.Row="3" Grid.Column="3" Content="R" Width="28" Height="28" FontSize="11" FontWeight="Bold" Padding="0" Margin="0,2" ToolTip="Home" Visibility="{Binding FixtureRotationVisibility}" Command="{Binding HomeAxisCommand}" CommandParameter="FixtureRotation" telerik:StyleManager.Theme="Crystal"/>
</Grid>
<!-- 轴复位 | Axis Reset -->
<telerik:RadButton Content="{loc:Localization MC_AxisReset}" Command="{Binding AxisResetCommand}" Height="28" Margin="0,6,0,0" telerik:StyleManager.Theme="Crystal" FontSize="12" FontWeight="Bold">
<telerik:RadButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="White"/>
<GradientStop Color="#FFFFAB91" Offset="1"/>
</LinearGradientBrush>
</telerik:RadButton.Background>
</telerik:RadButton>
</StackPanel>
</GroupBox>
<!-- 门控制区(调试模式,不检查联锁)| Door Control (debug mode, no interlock check) -->
<GroupBox Margin="0,8,0,0">
<GroupBox.Header>
<TextBlock Text="{loc:Localization MC_DoorStatus_Title}" FontWeight="Bold" FontSize="12"/>
</GroupBox.Header>
<UniformGrid Columns="3" Margin="5">
<telerik:RadButton Content="{loc:Localization MC_OpenDoor}" Command="{Binding OpenDoorCommand}" Height="26" Margin="2" telerik:StyleManager.Theme="Crystal"/>
<telerik:RadButton Content="{loc:Localization MC_CloseDoor}" Command="{Binding CloseDoorCommand}" Height="26" Margin="2" telerik:StyleManager.Theme="Crystal"/>
<telerik:RadButton Content="{loc:Localization MC_StopDoor}" Command="{Binding StopDoorCommand}" Height="26" Margin="2" telerik:StyleManager.Theme="Crystal"/>
</UniformGrid>
</GroupBox>
<!-- 几何反算区 | Geometry Inverse Calculation -->
<GroupBox Margin="0,8,0,0">
<GroupBox.Header>
<TextBlock Text="{loc:Localization MC_Geometry_Title}" FontWeight="Bold" FontSize="12"/>
</GroupBox.Header>
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{loc:Localization MC_TargetFOD}" FontSize="12" Foreground="#616161" VerticalAlignment="Center"/>
<telerik:RadNumericUpDown Grid.Column="1" Value="{Binding TargetFOD, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ValueFormat="Numeric" NumberDecimalDigits="2" SmallChange="0.1" LargeChange="1" Margin="4,2" telerik:StyleManager.Theme="Crystal"/>
<TextBlock Grid.Column="2" Text="{loc:Localization MC_TargetFDD}" FontSize="12" Foreground="#616161" VerticalAlignment="Center" Margin="4,0,0,0"/>
<telerik:RadNumericUpDown Grid.Column="3" Value="{Binding TargetFDD, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ValueFormat="Numeric" NumberDecimalDigits="2" SmallChange="0.1" LargeChange="1" Margin="4,2" telerik:StyleManager.Theme="Crystal"/>
<telerik:RadButton Grid.Column="4" Content="{loc:Localization MC_CalculateGeometry}" Command="{Binding ApplyGeometryCommand}" Margin="4,2,0,2" Height="24" Padding="8,2" telerik:StyleManager.Theme="Crystal" FontSize="12"/>
</Grid>
</GroupBox>
</StackPanel>
</Window>
@@ -0,0 +1,17 @@
using System.Windows;
namespace XP.Hardware.MotionControl.Views
{
/// <summary>
/// 运动控制调试窗口(Jog 点动)| Motion Control Debug Window (Jog)
/// </summary>
public partial class MotionDebugWindow : Window
{
public MotionDebugWindow()
{
InitializeComponent();
if (Application.Current?.MainWindow != null)
Icon = Application.Current.MainWindow.Icon;
}
}
}