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

69 lines
4.7 KiB
XML

<UserControl x:Class="AuroraHeightSensor.Keyence.Views.UCHeightSensorControlView"
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:AuroraHeightSensor.Keyence.Views"
xmlns:height="clr-namespace:AuroraHeightSensor"
xmlns:conv="clr-namespace:AuroraUIComponent.UIConverter;assembly=AuroraUIComponent"
d:DataContext="{d:DesignInstance Type=local:UCHeightSensorControlViewModel}"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<ResourceDictionary>
<conv:EnumConverter x:Key="EnumConverter"/>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Border MaxWidth="600" HorizontalAlignment="Left" Margin="0,0,0,20">
<StackPanel Orientation="Vertical">
<TextBlock Text="HeightSensor" Style="{StaticResource TitleText}"/>
<DockPanel>
<TextBlock Text="ID :" Style="{StaticResource NormalText}" Width="70" TextAlignment="Right"/>
<TextBlock Text="{Binding Id}" Style="{StaticResource NormalText}" TextAlignment="Left"/>
</DockPanel>
<DockPanel>
<TextBlock Text="Receive :" Style="{StaticResource NormalText}" Width="70" TextAlignment="Right"/>
<TextBlock Text="{Binding Receive}" Style="{StaticResource NormalText}" TextAlignment="Right"/>
</DockPanel>
<DockPanel>
<TextBlock Text="CH2 Value :" Style="{StaticResource NormalText}" Width="70" TextAlignment="Right"/>
<TextBlock Text="{Binding CH0Value}" Style="{StaticResource NormalText}" TextAlignment="Right"/>
<TextBlock Text="mm" Style="{StaticResource NormalText}" TextAlignment="Left"/>
</DockPanel>
<DockPanel>
<TextBlock Text="CH1 Value :" Style="{StaticResource NormalText}" Width="70" TextAlignment="Right"/>
<TextBlock Text="{Binding CH1Value}" Style="{StaticResource NormalText}" TextAlignment="Right"/>
<TextBlock Text="mm" Style="{StaticResource NormalText}" TextAlignment="Left"/>
</DockPanel>
<DockPanel>
<TextBlock Text="CH2 Value :" Style="{StaticResource NormalText}" Width="70" TextAlignment="Right"/>
<TextBlock Text="{Binding CH2Value}" Style="{StaticResource NormalText}" TextAlignment="Right"/>
<TextBlock Text="mm" Style="{StaticResource NormalText}" TextAlignment="Left"/>
</DockPanel>
<DockPanel>
<TextBlock Text="CH2 Value :" Style="{StaticResource NormalText}" Width="70" TextAlignment="Right"/>
<TextBlock Text="{Binding CH3Value}" Style="{StaticResource NormalText}" TextAlignment="Right"/>
<TextBlock Text="mm" Style="{StaticResource NormalText}" TextAlignment="Left"/>
</DockPanel>
<DockPanel>
<Button Content="Read" Command="{Binding CMD_Read}"/>
</DockPanel>
<StackPanel Orientation="Horizontal">
<RadioButton Content="CH_00" IsChecked="{Binding IsCh00, Converter={StaticResource EnumConverter}, ConverterParameter={x:Static height:eChannel.CH0}, Mode=TwoWay}"/>
<RadioButton Content="CH_01" IsChecked="{Binding IsCh01, Converter={StaticResource EnumConverter}, ConverterParameter={x:Static height:eChannel.CH1}, Mode=TwoWay}"/>
<RadioButton Content="CH_02" IsChecked="{Binding IsCh02, Converter={StaticResource EnumConverter}, ConverterParameter={x:Static height:eChannel.CH2}, Mode=TwoWay}"/>
<RadioButton Content="CH_03" IsChecked="{Binding IsCh03, Converter={StaticResource EnumConverter}, ConverterParameter={x:Static height:eChannel.CH3}, Mode=TwoWay}"/>
</StackPanel>
<Button Content="Zero Shift" Command="{Binding CMD_ZeroShift}"/>
<Button Content="Zero Shift Reset" Command="{Binding CMD_ZeroShiftReset}"/>
<Button Content="Start AutoTransmit" Command="{Binding CMD_AutoTransmit}" CommandParameter="True"/>
<Button Content="Stop AutoTransmit" Command="{Binding CMD_AutoTransmit}" CommandParameter="False"/>
<Button Content="Reset Value" Command="{Binding CMD_Reset}"/>
</StackPanel>
</Border>
</Grid>
</UserControl>