You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
12 KiB

<tool:BaseDialog x:Class="Gumming.ControlCOTArmView"
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"
mc:Ignorable="d"
xmlns:local="clr-namespace:Gumming"
xmlns:tool="clr-namespace:GummingCommon;assembly=GummingCommon"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
d:DesignHeight="700" d:DesignWidth="1000"
Height="400" Width="600" WindowStartupLocation="CenterScreen"
Background="{DynamicResource DefaultWindowBackground}"
x:Name="rootControl">
<Window.Resources>
<tool:IsOpenConverter x:Key="IsOpenConverter"/>
<tool:RadioButtonConverter x:Key="RadioConverter"/>
<tool:BooleanToOpacityConverter x:Key="OpacityConverter"/>
<tool:EditorTextConverter x:Key="TextBrushConverter"/>
<tool:EditorBorderConverter x:Key="BorderBrushConverter"/>
<tool:PathTypeToThemeConverter x:Key="PathTypeConverter"/>
<tool:StepStyleConverter x:Key="StepStyleConverter"/>
<tool:TagStyleConverter x:Key="TagStyleConverter"/>
</Window.Resources>
<Grid Background="Transparent">
<Border CornerRadius="3" BorderBrush="Transparent" BorderThickness="1" Background="Transparent">
<Border CornerRadius="1" BorderThickness="1" Background="Transparent" Height="Auto" BorderBrush="{DynamicResource DefaultBorderBrush}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="36"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="10"></RowDefinition>
</Grid.RowDefinitions>
<Border Grid.Row="0" Background="{DynamicResource DialogHeaderBackground}" BorderBrush="{DynamicResource DefaultBorderBrush}" BorderThickness="0,0,0,1">
<Grid>
<TextBlock Grid.Row="0" Margin="5" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding HeaderTitle}"></TextBlock>
<Button Command="{Binding CancelCommand}" Cursor="Hand" Margin="0,6,10,0" VerticalAlignment="Top" HorizontalAlignment="Right" Grid.Column="1" Style="{DynamicResource btnCloseStyle}" Width="26" Height="26" x:Name="btnWinClose" Focusable="False"></Button>
</Grid>
</Border>
<Grid Grid.Row="1" Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="10"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="10"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="10"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="10"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="10"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="10"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="10"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="10"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="10"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="10"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Text="当前位置" HorizontalAlignment="Left" VerticalAlignment="Stretch" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
<TextBox Grid.Row="0" Grid.Column="2" Text="{Binding CurPosition, StringFormat=F1}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" FontSize="14" IsReadOnly="True"></TextBox>
<Button Grid.Row="0" Grid.Column="4" FontSize="15" Style="{Binding Path=SVONStatus,Converter={StaticResource TagStyleConverter}}" Tag="{Binding SVONStatus}" Command="{Binding SVONCommand}" Content="SVON"></Button>
<Button Grid.Row="0" Grid.Column="6" FontSize="15" Style="{Binding Path=UpDownStatus,Converter={StaticResource TagStyleConverter}}" Tag="{Binding UpDownStatus}" Command="{Binding UpDownCommand}" Content="升降"></Button>
<TextBlock Grid.Row="2" Grid.Column="0" Text="点动速度" HorizontalAlignment="Left" VerticalAlignment="Stretch" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
<local:FloatBox Grid.Row="2" Grid.Column="2" Text="{Binding AxisSpeed, UpdateSourceTrigger=LostFocus, StringFormat=F1}" ToolTip="{Binding AxisSpeed}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" FontSize="14" LostFocus="AxisSpeed_LostFocus"></local:FloatBox>
<Button Grid.Row="2" Grid.Column="4" FontSize="15" Style="{Binding Path=ForwardStatus,Converter={StaticResource TagStyleConverter}}" Tag="{Binding ForwardStatus}" Command="{Binding JogForwardCommand}" Content="JOG进" PreviewMouseDown="JogForward_PreviewMouseDown" PreviewMouseUp="JogForward_PreviewMouseUp"></Button>
<Button Grid.Row="2" Grid.Column="6" FontSize="15" Style="{Binding Path=BackStatus,Converter={StaticResource TagStyleConverter}}" Tag="{Binding BackStatus}" Command="{Binding JogBackCommand}" Content="JOG退" PreviewMouseDown="JogBack_PreviewMouseDown" PreviewMouseUp="JogBack_PreviewMouseUp"></Button>
<TextBlock Grid.Row="4" Grid.Column="2" Text="原点偏移" HorizontalAlignment="Left" VerticalAlignment="Stretch" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
<TextBlock Grid.Row="4" Grid.Column="4" Text="速度°/s" HorizontalAlignment="Left" VerticalAlignment="Stretch" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
<TextBlock Grid.Row="6" Grid.Column="0" Text="回原点" HorizontalAlignment="Left" VerticalAlignment="Stretch" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
<local:FloatBox Grid.Row="6" Grid.Column="2" Text="{Binding HomePosition, UpdateSourceTrigger=LostFocus, StringFormat=F1}" ToolTip="{Binding HomePosition}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" FontSize="14" LostFocus="HomePosition_LostFocus"></local:FloatBox>
<local:FloatBox Grid.Row="6" Grid.Column="4" Text="{Binding HomeSpeed, UpdateSourceTrigger=LostFocus, StringFormat=F1}" ToolTip="{Binding HomeSpeed}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" FontSize="14" LostFocus="HomeSpeed_LostFocus"></local:FloatBox>
<Button Grid.Row="6" Grid.Column="6" FontSize="15" Command="{Binding HomeCommand}" Style="{Binding Path=HOMEStatus,Converter={StaticResource TagStyleConverter}}" Tag="{Binding HOMEStatus}" Content="HOME"></Button>
<TextBlock Grid.Row="8" Grid.Column="2" Text="位置" HorizontalAlignment="Left" VerticalAlignment="Stretch" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
<TextBlock Grid.Row="8" Grid.Column="4" Text="速度°/s" HorizontalAlignment="Left" VerticalAlignment="Stretch" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
<TextBlock Grid.Row="10" Grid.Column="0" Text="定位" HorizontalAlignment="Left" VerticalAlignment="Stretch" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
<local:FloatBox Grid.Row="10" Grid.Column="2" Text="{Binding MovePosition, UpdateSourceTrigger=LostFocus, StringFormat=F1}" ToolTip="{Binding MovePosition}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" FontSize="14" LostFocus="MovePosition_LostFocus"></local:FloatBox>
<local:FloatBox Grid.Row="10" Grid.Column="4" Text="{Binding MoveSpeed, UpdateSourceTrigger=LostFocus, StringFormat=F1}" ToolTip="{Binding MoveSpeed}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" FontSize="14" LostFocus="MoveSpeed_LostFocus"></local:FloatBox>
<Button Grid.Row="10" Grid.Column="6" FontSize="15" Style="{Binding Path=MainAxisTopStatus,Converter={StaticResource TagStyleConverter}}" Tag="{Binding MainAxisTopStatus}" Command="{Binding PosMoveCommand}" Content="POS Move"></Button>
<TextBlock Grid.Row="12" Grid.Column="0" Text="安全始位" HorizontalAlignment="Left" VerticalAlignment="Stretch" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
<local:FloatBox Grid.Row="12" Grid.Column="2" Text="{Binding SafeStart, UpdateSourceTrigger=LostFocus, StringFormat=F1}" ToolTip="{Binding SafeStart}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" FontSize="14" LostFocus="SafeStart_LostFocus"></local:FloatBox>
<TextBlock Grid.Row="12" Grid.Column="4" Text="安全止位" HorizontalAlignment="Left" VerticalAlignment="Stretch" FontSize="14" Foreground="{DynamicResource FontBrush1}" ></TextBlock>
<local:FloatBox Grid.Row="12" Grid.Column="6" Text="{Binding SafeEnd, UpdateSourceTrigger=LostFocus, StringFormat=F1}" ToolTip="{Binding SafeEnd}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" FontSize="14" LostFocus="SafeEnd_LostFocus"></local:FloatBox>
<Grid Grid.Row="14" Grid.Column="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40"></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="正向:" VerticalAlignment="Center" FontSize="10" TextTrimming="CharacterEllipsis"></TextBlock>
<Rectangle Grid.Column="1" Fill="{Binding Path=IsSub1Open,Converter={StaticResource IsOpenConverter}}" RadiusX="5" RadiusY="5" Width="10" Height="10"></Rectangle>
</Grid>
<Grid Grid.Row="14" Grid.Column="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40"></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="反向:" VerticalAlignment="Center" FontSize="10" TextTrimming="CharacterEllipsis"></TextBlock>
<Rectangle Grid.Column="1" Fill="{Binding Path=IsSub2Open,Converter={StaticResource IsOpenConverter}}" RadiusX="5" RadiusY="5" Width="10" Height="10"></Rectangle>
</Grid>
<Grid Grid.Row="14" Grid.Column="6">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40"></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="原点:" VerticalAlignment="Center" FontSize="10" TextTrimming="CharacterEllipsis"></TextBlock>
<Rectangle Grid.Column="1" Fill="{Binding Path=IsSub3Open,Converter={StaticResource IsOpenConverter}}" RadiusX="5" RadiusY="5" Width="10" Height="10"></Rectangle>
</Grid>
</Grid>
</Grid>
</Border>
</Border>
</Grid>
</tool:BaseDialog>