2026-03-30 17:09:29 +09:00

70 lines
4.1 KiB
XML

<UserControl x:Class="WeldingCommon.Views.UCSingleAxisJog"
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:WeldingCommon.Views"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:view="clr-namespace:Aurora.View;assembly=Aurora"
xmlns:usercontrols="clr-namespace:AuroraUIComponent.UserControls;assembly=AuroraUIComponent"
xmlns:System="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" Name="uc"
d:DesignHeight="600" d:DesignWidth="200" Background="Black" Width="200" Height="600">
<UserControl.Resources>
<System:Boolean x:Key="FalseValue">False</System:Boolean>
<System:Boolean x:Key="TrueValue">True</System:Boolean>
<view:BoolConverter x:Key="StatusFillColor" TrueValue="Green" FalseValue="Red"/>
<Style x:Key="StEllipse" TargetType="Ellipse">
<Setter Property="Width" Value="20"/>
<Setter Property="Height" Value="20"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style x:Key="StTextBlock" TargetType="TextBlock">
<Setter Property="Background" Value="#FFE0E0E0"/>
<Setter Property="FontSize" Value="17"/>
<Setter Property="Width" Value="190"/>
<Setter Property="Height" Value="30"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Center"/>
</Style>
<Style x:Key="StButton" TargetType="Button">
<Setter Property="Background" Value="#FFCCCCCC"/>
<Setter Property="FontSize" Value="18"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="BorderThickness" Value="2"/>
</Style>
</UserControl.Resources>
<i:Interaction.Triggers>
<i:PropertyChangedTrigger Binding="{Binding IsVisible, ElementName=uc}">
<i:InvokeCommandAction Command="{Binding CMD_VisibleChanged}" CommandParameter="{Binding IsVisible, ElementName=uc}"/>
</i:PropertyChangedTrigger>
</i:Interaction.Triggers>
<StackPanel Orientation="Vertical" Width="200" Height="600">
<usercontrols:UCKeyComboBox KeyText="Motor Axis" ItemList="{Binding MotorIDList}"
ValueItem="{Binding SelectedMotorID}" KeyTextFgColor="White" KeyTextBgColor="Black"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button FontSize="20" Width="80" Margin="5" Command="{Binding CMD_DecreaseComboMotorID}" >◀</Button>
<Button FontSize="20" Width="80" Margin="5" Command="{Binding CMD_IncreaseComboMotorID}" >▶</Button>
</StackPanel>
<GroupBox BorderBrush="DarkGray" VerticalAlignment="Top">
<GroupBox.Header>
<Label FontSize="12" Foreground="Black">Jog</Label>
</GroupBox.Header>
<StackPanel Orientation="Vertical" Height="auto">
<usercontrols:JogUnitPanel x:Name="cJogUnitPanel"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button FontSize="20" Width="80" Margin="5" Command="{Binding CMD_MinusJog}" CommandParameter="{StaticResource FalseValue}" >-Jog</Button>
<Button FontSize="20" Width="80" Margin="5" Command="{Binding CMD_PlusJog}" CommandParameter="{StaticResource TrueValue}">+Jog</Button>
</StackPanel>
<Button FontSize="20" Width="140" Height="50" Margin="5" Command="{Binding CMD_Stop}" >Stop</Button>
</StackPanel>
</GroupBox>
</StackPanel>
</UserControl>