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

41 lines
2.8 KiB
XML

<UserControl x:Class="WeldingCommon.Views.UCSingleAxisHome"
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"
mc:Ignorable="d"
xmlns:view="clr-namespace:Aurora.View;assembly=Aurora"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:usercontrols="clr-namespace:AuroraUIComponent.UserControls;assembly=AuroraUIComponent"
d:DesignHeight="600" d:DesignWidth="200" Width="200" Height="600" Background="Black" Name="uc"
d:DataContext="{d:DesignInstance Type=local:UCSingleAxisHomeViewModel}">
<UserControl.Resources>
<view:BoolConverter x:Key="MotorServoEnablebkColor" TrueValue="Green" FalseValue="Red"/>
<view:BoolConverter x:Key="MotorServoEnablefgColor" TrueValue="Black" FalseValue="Black"/>
</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">
<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>
<TextBlock Margin="5" Width="150" Height="30" FontSize="18" TextAlignment="Center" HorizontalAlignment="Stretch" Text="{Binding strMotorServoOnOffStatus}"
Background ="{Binding bMotorServoOnOffStatus, Converter={StaticResource MotorServoEnablebkColor}}"
Foreground ="{Binding bMotorServoOnOffStatus, Converter={StaticResource MotorServoEnablefgColor}}"></TextBlock>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button FontSize="15" Width="80" Height="30" Margin="5" Command="{Binding CMD_Home}" >Home</Button>
<Button FontSize="15" Width="80" Height="30" Margin="5" Command="{Binding CMD_Stop}" >Stop</Button>
</StackPanel>
<ProgressBar Width="150" Height="30" Margin="5" Value="{Binding ProgressStatus}">
</ProgressBar>
</StackPanel>
</UserControl>