2026-01-26 18:56:53 +09:00

189 lines
11 KiB
XML

<UserControl x:Class="AuroraCellTracker.Views.UCCellTrackerDevice"
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" d:DataContext="{d:DesignInstance Type=local:UCCellTrackerDeviceViewModel}"
xmlns:local="clr-namespace:AuroraCellTracker.Views"
xmlns:usercontrols="clr-namespace:AuroraUIComponent.UserControls;assembly=AuroraUIComponent"
xmlns:behavior="http://schemas.microsoft.com/xaml/behaviors"
mc:Ignorable="d" Name="uc"
d:DesignHeight="200" d:DesignWidth="500">
<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>
<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.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<GroupBox Grid.Row="0" Header="Receive Data">
<StackPanel Orientation="Horizontal">
<TextBox Foreground="White" TextAlignment="Center" VerticalAlignment="Center" FontSize="15" Width="300" IsReadOnly="True" Text="{Binding tbReceiveData}"></TextBox>
<Button Command="{Binding CMD_ReceiveData}" Margin="5">Receive</Button>
</StackPanel>
</GroupBox>
<GroupBox Grid.Row="1" Grid.RowSpan="2" Header="Send Data">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<TextBox Foreground="White" TextAlignment="Center" VerticalAlignment="Center" FontSize="15" Width="300" Text="{Binding tbSendToPLC}"></TextBox>
<Button Command="{Binding CMD_SendToPLC}" Margin="5">Send To PLC</Button>
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal">
<TextBox Foreground="White" TextAlignment="Center" VerticalAlignment="Center" FontSize="15" Width="300" Text="{Binding tbSendToUpper}"></TextBox>
<Button Command="{Binding CMD_SendToUpper}" Margin="5">Send To Upper</Button>
<Button Command="{Binding CMD_PopUpIPConfig}" Margin="5">IPConfig UI</Button>
<!--<Button Command="{Binding CMD_Init}" Margin="5">DLL Init</Button>-->
</StackPanel>
</Grid>
</GroupBox>
<GroupBox Grid.Row="3" Header="Status">
<TextBox Foreground="White" TextAlignment="Center" VerticalAlignment="Center" FontSize="15" IsReadOnly="True" Text="{Binding tbStatus}"></TextBox>
</GroupBox>
</Grid>
<!--
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="1.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<GroupBox Grid.Column="0" Grid.Row="0" Header="Select Mode">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<RadioButton Command="{Binding CMD_CellTrackerMode}" CommandParameter="QueueBuffer"
Style="{StaticResource styleRbJogUnit}" Content="QueueBuffer" Margin="3"/>
<RadioButton Grid.Row="1" Command="{Binding CMD_CellTrackerMode}" CommandParameter="CallBack"
Style="{StaticResource styleRbJogUnit}" Content="CallBack" Margin="3" IsChecked="True"/>
</Grid>
</GroupBox>
<GroupBox Grid.Column="1" Grid.Row="0" Header="Set Init.">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Button Grid.Row="0" Grid.Column="0" Command="{Binding CMD_SetDllDir}" Margin="5">Set Dll Dir</Button>
<Button Grid.Row="0" Grid.Column="1" Command="{Binding CMD_SetIPConfig}" Margin="5">Set IP Config</Button>
<Button Grid.Row="1" Grid.Column="0" Command="{Binding CMD_Initilize}" Margin="5">Initialize</Button>
<Button Grid.Row="1" Grid.Column="1" Command="{Binding CMD_Close}" Margin="5">Close</Button>
</Grid>
</GroupBox>
<Grid Grid.Column="2" Grid.Row="0" Grid.RowSpan="2">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<GroupBox Grid.Row="0" Header="Receive Data">
<StackPanel Orientation="Horizontal">
<TextBox Foreground="White" TextAlignment="Center" VerticalAlignment="Center" FontSize="15" Width="300" IsReadOnly="True" Text="{Binding tbReceiveData}"></TextBox>
<Button Command="{Binding CMD_ReceiveData}" Margin="5">Receive</Button>
</StackPanel>
</GroupBox>
<GroupBox Grid.Row="1" Grid.RowSpan="2" Header="Send Data">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<TextBox Foreground="White" TextAlignment="Center" VerticalAlignment="Center" FontSize="15" Width="300" Text="{Binding tbSendToPLC}"></TextBox>
<Button Command="{Binding CMD_SendToPLC}" Margin="5">Send To PLC</Button>
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal">
<TextBox Foreground="White" TextAlignment="Center" VerticalAlignment="Center" FontSize="15" Width="300" Text="{Binding tbSendToUpper}"></TextBox>
<Button Command="{Binding CMD_SendToUpper}" Margin="5">Send To Upper</Button>
</StackPanel>
</Grid>
</GroupBox>
<GroupBox Grid.Row="3" Header="Status">
<TextBox Foreground="White" TextAlignment="Center" VerticalAlignment="Center" FontSize="15" IsReadOnly="True" Text="{Binding tbStatus}"></TextBox>
</GroupBox>
</Grid>
<GroupBox Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Header="ID setting">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<usercontrols:UCKeyValue Grid.Column="0" Grid.Row="0"
KeyText="Cell Id StatNo : " Value="{Binding tbCellIdStartNo}" ShowKeypad="False" IsReadOnly="False" KeyHorizontalAlignment="Center"/>
<usercontrols:UCKeyValue Grid.Column="1" Grid.Row="0"
KeyText="Cell Id Length : " Value="{Binding tbCellIdLength}" ShowKeypad="False" IsReadOnly="False" KeyHorizontalAlignment="Center"/>
<usercontrols:UCKeyValue Grid.Column="0" Grid.Row="1"
KeyText="Lot Id StatNo : " Value="{Binding tbLotIdStartNo}" ShowKeypad="False" IsReadOnly="False" KeyHorizontalAlignment="Center"/>
<usercontrols:UCKeyValue Grid.Column="1" Grid.Row="1"
KeyText="Lot Id Length : " Value="{Binding tbLotIdLength}" ShowKeypad="False" IsReadOnly="False" KeyHorizontalAlignment="Center"/>
<Button Grid.Column="1" Grid.Row="2" Command="{Binding CMD_SetIdSettings}" Margin="5">Set ID Settings</Button>
</Grid>
</GroupBox>
</Grid>
-->
</UserControl>