2026-06-05 13:44:39 +09:00

190 lines
12 KiB
XML

<UserControl x:Class="AuroraOCT.Views.UCOCTManualMotion"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:AuroraOCT.Views"
xmlns:view="clr-namespace:Aurora.View;assembly=Aurora"
mc:Ignorable="d" Name="uc"
xmlns:behavior="http://schemas.microsoft.com/xaml/behaviors"
xmlns:usercontrols="clr-namespace:AuroraUIComponent.UserControls;assembly=AuroraUIComponent"
d:DataContext="{d:DesignInstance Type=local:UCOCTManualMotionViewModel}"
d:DesignHeight="900" d:DesignWidth="1200">
<behavior:Interaction.Triggers>
<behavior:PropertyChangedTrigger Binding="{Binding IsVisible, ElementName=uc}">
<behavior:InvokeCommandAction Command="{Binding CMD_VisibleChanged}"
CommandParameter="{Binding IsVisible, ElementName=uc}"/>
</behavior:PropertyChangedTrigger>
</behavior:Interaction.Triggers>
<UserControl.Resources>
<ResourceDictionary>
<view:BoolConverter x:Key="convFieldColor" TrueValue="Red" FalseValue="Gray" />
<Style x:Key="styleRbJogUnit" TargetType="RadioButton">
<Setter Property="MinWidth" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=ActualHeight}"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Height" Value="40"/>
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="Margin" Value="2 0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RadioButton}">
<Border Name="border" BorderThickness="1" Background="#1A2242"
BorderBrush="#1A2242">
<ContentPresenter Margin="0,0,0,4" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Opacity" Value="0.8" />
</Trigger>
<Trigger Property="IsChecked"
Value="True">
<Setter TargetName="border"
Property="Background"
Value="#A50034" />
<Setter TargetName="border"
Property="BorderThickness"
Value="1" />
<Setter Property="FontWeight"
Value="Bold" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<GroupBox Grid.Row="0" Grid.Column="0" Margin="5" Header="OCT SoftWare Control" FontSize="18">
<StackPanel Orientation="Horizontal" Height="50" VerticalAlignment="Top">
<Button Margin="5" Width="100" Command="{Binding CMD_Connent}" Content="Connect"/>
<Button Margin="5" Width="100" Command="{Binding CMD_DisConnect}" Content="DisConnect"/>
<Button Margin="5" Width="100" Command="{Binding CMD_StartSW}" Content="Start SW"/>
</StackPanel>
</GroupBox>
<GroupBox Grid.Row="1" Grid.Column="0" Margin="5" Header="Cell Serial Number Control" FontSize="18">
<StackPanel Orientation="Horizontal" Height="50" VerticalAlignment="Top">
<TextBox Margin="5" Width="200" Text="{Binding strCellSerialNumber}"/>
<Button Margin="5" Width="100" Command="{Binding CMD_AddSerialNumber}" Content="Add"/>
<Button Margin="5" Width="100" Command="{Binding CMD_CheckSerialNumber}" Content="Check"/>
<Button Margin="5" Width="100" Command="{Binding CMD_ClearSerialNumber}">
<StackPanel Orientation="Horizontal">
<Image x:Name="ImageClear"></Image>
<TextBlock Text=" Clear"/>
</StackPanel>
</Button>
</StackPanel>
</GroupBox>
<GroupBox Grid.Row="0" Grid.Column="1" Margin="5" Header="OCT System State" FontSize="18">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<RadioButton Grid.Column="0" Grid.Row="0" Command="{Binding CMD_OCTStateChanged}" CommandParameter="Initializing" IsChecked="{Binding bRadioInitializing}" IsEnabled="False"
Style="{StaticResource styleRbJogUnit}" Content="Initializing" Margin="3"/>
<RadioButton Grid.Column="0" Grid.Row="1" Command="{Binding CMD_OCTStateChanged}" CommandParameter="Ready for Command" IsChecked="{Binding bRadioReady}" IsEnabled="False"
Style="{StaticResource styleRbJogUnit}" Content="Ready for Command" Margin="3"/>
<RadioButton Grid.Column="0" Grid.Row="2" Command="{Binding CMD_OCTStateChanged}" CommandParameter="Busy" IsChecked="{Binding bRadioBusy}" IsEnabled="False"
Style="{StaticResource styleRbJogUnit}" Content="Busy" Margin="3"/>
<RadioButton Grid.Column="0" Grid.Row="3" Command="{Binding CMD_OCTStateChanged}" CommandParameter="No Response" IsChecked="{Binding bRadioNoRespone}" IsEnabled="False"
Style="{StaticResource styleRbJogUnit}" Content="No Response" Margin="3"/>
<RadioButton Grid.Column="1" Grid.Row="0" Command="{Binding CMD_OCTStateChanged}" CommandParameter="Acquiring" IsChecked="{Binding bRadioAcquiring}" IsEnabled="False"
Style="{StaticResource styleRbJogUnit}" Content="Acquiring" Margin="3"/>
<RadioButton Grid.Column="1" Grid.Row="1" Command="{Binding CMD_OCTStateChanged}" CommandParameter="Processing" IsChecked="{Binding bRadioProcessing}" IsEnabled="False"
Style="{StaticResource styleRbJogUnit}" Content="Processing" Margin="3"/>
<RadioButton Grid.Column="1" Grid.Row="2" Command="{Binding CMD_OCTStateChanged}" CommandParameter="Waiting for Trigger" IsChecked="{Binding bRadioWaitingTrigger}" IsEnabled="False"
Style="{StaticResource styleRbJogUnit}" Content="Waiting for Trigger" Margin="3"/>
<RadioButton Grid.Column="1" Grid.Row="3" Command="{Binding CMD_OCTStateChanged}" CommandParameter="Not in Remote Mode" IsChecked="{Binding bRadioNotRemoteMode}" IsEnabled="False"
Style="{StaticResource styleRbJogUnit}" Content="Not in Remote Mode" Margin="3"/>
</Grid>
</GroupBox>
<GroupBox Grid.Row="1" Grid.Column="1" Margin="5" Header="Sequence" FontSize="18">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" Height="50" VerticalAlignment="Top">
<TextBox Margin="5" Width="200" Text="{Binding strSequenceFileName}"/>
<Button Margin="5" Width="100" Command="{Binding CMD_SetSequenceFile}" Content="Set"/>
<Button Margin="5" Width="100" Command="{Binding CMD_RunSequence}" Content="Start"/>
<Button Margin="5" Width="100" Command="{Binding CMD_StopSequence}" Content="Stop"/>
<Button Margin="5" Width="100" Command="{Binding CMD_GetLastSequenceResult}" Content="Get Result"/>
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal" Height="50" VerticalAlignment="Top">
<Button Margin="5" Width="100" Command="{Binding CMD_ENTER_REMOTE}" Content="Enter Remote"/>
<Button Margin="5" Width="100" Command="{Binding CMD_SET_REMOTE_SEQ}" Content="Set Sequence Mode"/>
<Button Margin="5" Width="100" Command="{Binding CMD_START_SEQ}" Content="Start Sequence"/>
<Button Margin="5" Width="100" Command="{Binding CMD_GET_REMOTE_MODE}" Content="Get Remote Mode"/>
<Button Margin="5" Width="100" Command="{Binding CMD_GETKHD}" Content="GET KHD"/>
<Button Margin="5" Width="100" Command="{Binding CMD_GETKHD2}" Content="Get KHD 2"/>
<Button Margin="5" Width="100" Command="{Binding CMD_STOP_SEQ}" Content="Stop Sequence"/>
</StackPanel>
<StackPanel Grid.Row="2" Orientation="Horizontal" Height="120" VerticalAlignment="Top" >
<TextBlock Margin="5" Text="{Binding strSequenceResult}" Height="50">
</TextBlock>
</StackPanel>
</Grid>
</GroupBox>
<GroupBox Grid.Row="2" Grid.Column="1" Grid.RowSpan="2" Margin="5" Header="Job Result" FontSize="18">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="6*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" Height="50" VerticalAlignment="Top">
<TextBox Margin="5" Width="200" Text="{Binding strSequenceFileName}"/>
<Button Margin="5" Width="150" Command="{Binding CMD_GetLastJobResult}" Content="Get Job Result"/>
</StackPanel>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="3*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center" Text="Result"/>
<TextBlock Grid.Row="1" Grid.Column="0" HorizontalAlignment="Center" Text="Error Code"/>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Stretch">
<TextBlock Margin="5" Text="{Binding strJobResult}" Background="White" Foreground="Black" Width="550" Height="200" TextWrapping="Wrap">
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="1" VerticalAlignment="Stretch">
<TextBlock Margin="5" Text="{Binding strJobLastError}" Background="White" Width="550" Height="200" TextWrapping="Wrap">
</TextBlock>
</StackPanel>
</Grid>
</Grid>
</GroupBox>
</Grid>
</UserControl>