|
|
@@ -0,0 +1,1024 @@
|
|
|
+<UserControl x:Class="TeamAAS_VP.Views.Product.PlcPointParams"
|
|
|
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
+ xmlns:prism="http://prismlibrary.com/"
|
|
|
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
|
+ xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
+ xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
|
+ xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
|
|
|
+ xmlns:enums="clr-namespace:TeamAAS_VP.Enums"
|
|
|
+ xmlns:uControl="clr-namespace:TeamAAS_VP.Controls"
|
|
|
+ xmlns:convert="clr-namespace:TeamAAS_VP.ValueConverter"
|
|
|
+ xmlns:local="clr-namespace:TeamAAS_VP.Views.Product"
|
|
|
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
+ xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Product"
|
|
|
+ xmlns:ext="clr-namespace:TeamAAS_VP.Extension"
|
|
|
+ xmlns:lex="http://wpflocalizeextension.codeplex.com"
|
|
|
+ xmlns:localRobot="clr-namespace:TeamAAS_VP.Models.Robot"
|
|
|
+ lex:LocalizeDictionary.DesignCulture="zh-CN"
|
|
|
+ lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
|
|
|
+ lex:ResxLocalizationProvider.DefaultDictionary="Lang"
|
|
|
+ prism:ViewModelLocator.AutoWireViewModel="True"
|
|
|
+ mc:Ignorable="d"
|
|
|
+ d:DataContext="{d:DesignInstance Type=vm:PlcPointParamsViewModel}"
|
|
|
+ d:Height="600"
|
|
|
+ d:Width="1024"
|
|
|
+ d:Background="White"
|
|
|
+ FontFamily="{DynamicResource DefaultFont}">
|
|
|
+ <b:Interaction.Triggers>
|
|
|
+ <b:EventTrigger EventName="Loaded">
|
|
|
+ <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
|
|
|
+ </b:EventTrigger>
|
|
|
+ </b:Interaction.Triggers>
|
|
|
+
|
|
|
+ <UserControl.Resources>
|
|
|
+ <ObjectDataProvider x:Key="eRobotHand"
|
|
|
+ MethodName="GetValues"
|
|
|
+ ObjectType="{x:Type sys:Enum}">
|
|
|
+ <ObjectDataProvider.MethodParameters>
|
|
|
+ <x:Type TypeName="enums:RobotHand" />
|
|
|
+ </ObjectDataProvider.MethodParameters>
|
|
|
+ </ObjectDataProvider>
|
|
|
+ <ObjectDataProvider x:Key="eMotionCommand"
|
|
|
+ MethodName="GetValues"
|
|
|
+ ObjectType="{x:Type sys:Enum}">
|
|
|
+ <ObjectDataProvider.MethodParameters>
|
|
|
+ <x:Type TypeName="enums:MotionCommand" />
|
|
|
+ </ObjectDataProvider.MethodParameters>
|
|
|
+ </ObjectDataProvider>
|
|
|
+ <convert:JogConverter x:Key="JogConverter" />
|
|
|
+ <convert:MultiParameterConverter x:Key="MultiParameterConverter" />
|
|
|
+ <convert:RobotConverter x:Key="RobotConverter" />
|
|
|
+ </UserControl.Resources>
|
|
|
+
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="*" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Button Grid.Row="0"
|
|
|
+ Content="{materialDesign:PackIcon Kind=ArrowLeftCircle}"
|
|
|
+ Width="50"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Top"
|
|
|
+ ToolTip="{lex:Loc 返回}"
|
|
|
+ Style="{StaticResource MaterialDesignIconButton}"
|
|
|
+ Command="{Binding BackCommand}" />
|
|
|
+ <StackPanel Grid.Row="0"
|
|
|
+ Orientation="Horizontal"
|
|
|
+ Margin="50,0"
|
|
|
+ VerticalAlignment="Center">
|
|
|
+ <materialDesign:PackIcon Kind="CubeOutline"
|
|
|
+ Width="30"
|
|
|
+ Height="30" />
|
|
|
+ <TextBlock Text="{Binding SelectProduct.Name}"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <TextBlock Text="{lex:Loc 机器人点位,Converter={StaticResource StringFormatConverter},ConverterParameter=' - {0}'}"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </StackPanel>
|
|
|
+ <Border BorderThickness="1,1,1,1"
|
|
|
+ VerticalAlignment="Bottom"
|
|
|
+ Height="1">
|
|
|
+ <Border.BorderBrush>
|
|
|
+ <VisualBrush>
|
|
|
+ <VisualBrush.Visual>
|
|
|
+ <Rectangle StrokeDashArray="4 4"
|
|
|
+ Stroke="LightGray"
|
|
|
+ StrokeThickness="1"
|
|
|
+ Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
|
|
|
+ Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}" />
|
|
|
+ </VisualBrush.Visual>
|
|
|
+ </VisualBrush>
|
|
|
+ </Border.BorderBrush>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <materialDesign:DrawerHost Grid.Row="1"
|
|
|
+ OpenMode="Modal"
|
|
|
+ x:Name="DrawerHost"
|
|
|
+ IsEnabled="{Binding IsAllowEdit}">
|
|
|
+ <!--<materialDesign:DrawerHost.RightDrawerContent>
|
|
|
+ <local:TestProductPage Visibility="{Binding IsHaveRobot,Converter={StaticResource BooleanToVisibilityConverter}}" />
|
|
|
+ </materialDesign:DrawerHost.RightDrawerContent>-->
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Expander Grid.Column="0"
|
|
|
+ ExpandDirection="Right"
|
|
|
+ Background="Transparent">
|
|
|
+ <Expander.Header>
|
|
|
+ <TextBlock RenderTransformOrigin=".5,.5"
|
|
|
+ Text="Navigation Description">
|
|
|
+ <TextBlock.LayoutTransform>
|
|
|
+ <RotateTransform Angle="90" />
|
|
|
+ </TextBlock.LayoutTransform>
|
|
|
+ </TextBlock>
|
|
|
+ </Expander.Header>
|
|
|
+ <ScrollViewer>
|
|
|
+ <StackPanel Margin="8,24,16,24"
|
|
|
+ Orientation="Vertical">
|
|
|
+ <Image Source="pack://application:,,,/TeamAAS-VP;component/Resources/Images/9机器人点位.png"
|
|
|
+ Stretch="Uniform"
|
|
|
+ Width="350"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Top" />
|
|
|
+ <TextBlock Text="{lex:Loc 机器人点位示教}" />
|
|
|
+ <TextBlock Foreground="Gray"
|
|
|
+ TextWrapping="Wrap"
|
|
|
+ Text="{lex:Loc 机器人点位示教描述}" />
|
|
|
+ </StackPanel>
|
|
|
+ </ScrollViewer>
|
|
|
+ </Expander>
|
|
|
+
|
|
|
+ <Grid Grid.Column="1">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <DockPanel Grid.Column="0">
|
|
|
+ <ListBox Height="80"
|
|
|
+ DockPanel.Dock="Top"
|
|
|
+ SelectedIndex="{Binding SelectedIndex}"
|
|
|
+ Style="{StaticResource MaterialDesign3.NavigationBarPrimaryListBox}">
|
|
|
+ <b:Interaction.Triggers>
|
|
|
+ <b:EventTrigger EventName="SelectionChanged">
|
|
|
+ <b:InvokeCommandAction Command="{Binding SelectionChangedCommand}" />
|
|
|
+ </b:EventTrigger>
|
|
|
+ </b:Interaction.Triggers>
|
|
|
+ <ListBoxItem>
|
|
|
+ <ListBoxItem.Style>
|
|
|
+ <Style TargetType="ListBoxItem"
|
|
|
+ BasedOn="{StaticResource MaterialDesign3.NavigationBarPrimaryListBoxItem}">
|
|
|
+ <Setter Property="materialDesign:NavigationBarAssist.SelectedIcon"
|
|
|
+ Value="Circle" />
|
|
|
+ <Setter Property="materialDesign:NavigationBarAssist.UnselectedIcon"
|
|
|
+ Value="CircleOutline" />
|
|
|
+ </Style>
|
|
|
+ </ListBoxItem.Style>
|
|
|
+ <TextBlock Text="取料拍照点位" />
|
|
|
+ </ListBoxItem>
|
|
|
+ <ListBoxItem>
|
|
|
+ <ListBoxItem.Style>
|
|
|
+ <Style TargetType="ListBoxItem"
|
|
|
+ BasedOn="{StaticResource MaterialDesign3.NavigationBarPrimaryListBoxItem}">
|
|
|
+ <Setter Property="materialDesign:NavigationBarAssist.SelectedIcon"
|
|
|
+ Value="Circle" />
|
|
|
+ <Setter Property="materialDesign:NavigationBarAssist.UnselectedIcon"
|
|
|
+ Value="CircleOutline" />
|
|
|
+ </Style>
|
|
|
+ </ListBoxItem.Style>
|
|
|
+ <TextBlock Text="取料点位" />
|
|
|
+ </ListBoxItem>
|
|
|
+ <ListBoxItem>
|
|
|
+ <ListBoxItem.Style>
|
|
|
+ <Style TargetType="ListBoxItem"
|
|
|
+ BasedOn="{StaticResource MaterialDesign3.NavigationBarPrimaryListBoxItem}">
|
|
|
+ <Setter Property="materialDesign:NavigationBarAssist.SelectedIcon"
|
|
|
+ Value="Circle" />
|
|
|
+ <Setter Property="materialDesign:NavigationBarAssist.UnselectedIcon"
|
|
|
+ Value="CircleOutline" />
|
|
|
+ </Style>
|
|
|
+ </ListBoxItem.Style>
|
|
|
+ <TextBlock Text="下相机二次定位点位" />
|
|
|
+ </ListBoxItem>
|
|
|
+ <ListBoxItem>
|
|
|
+ <ListBoxItem.Style>
|
|
|
+ <Style TargetType="ListBoxItem"
|
|
|
+ BasedOn="{StaticResource MaterialDesign3.NavigationBarPrimaryListBoxItem}">
|
|
|
+ <Setter Property="materialDesign:NavigationBarAssist.SelectedIcon"
|
|
|
+ Value="Circle" />
|
|
|
+ <Setter Property="materialDesign:NavigationBarAssist.UnselectedIcon"
|
|
|
+ Value="CircleOutline" />
|
|
|
+ </Style>
|
|
|
+ </ListBoxItem.Style>
|
|
|
+ <TextBlock Text="锁附拍照点位" />
|
|
|
+ </ListBoxItem>
|
|
|
+ <ListBoxItem>
|
|
|
+ <ListBoxItem.Style>
|
|
|
+ <Style TargetType="ListBoxItem"
|
|
|
+ BasedOn="{StaticResource MaterialDesign3.NavigationBarPrimaryListBoxItem}">
|
|
|
+ <Setter Property="materialDesign:NavigationBarAssist.SelectedIcon"
|
|
|
+ Value="Circle" />
|
|
|
+ <Setter Property="materialDesign:NavigationBarAssist.UnselectedIcon"
|
|
|
+ Value="CircleOutline" />
|
|
|
+ </Style>
|
|
|
+ </ListBoxItem.Style>
|
|
|
+ <TextBlock Text="锁附点位" />
|
|
|
+ </ListBoxItem>
|
|
|
+ <ListBoxItem>
|
|
|
+ <ListBoxItem.Style>
|
|
|
+ <Style TargetType="ListBoxItem"
|
|
|
+ BasedOn="{StaticResource MaterialDesign3.NavigationBarPrimaryListBoxItem}">
|
|
|
+ <Setter Property="materialDesign:NavigationBarAssist.SelectedIcon"
|
|
|
+ Value="Circle" />
|
|
|
+ <Setter Property="materialDesign:NavigationBarAssist.UnselectedIcon"
|
|
|
+ Value="CircleOutline" />
|
|
|
+ </Style>
|
|
|
+ </ListBoxItem.Style>
|
|
|
+ <TextBlock Text="复检点位" />
|
|
|
+ </ListBoxItem>
|
|
|
+ </ListBox>
|
|
|
+
|
|
|
+ <StackPanel DockPanel.Dock="Bottom"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <Button Content="{lex:Loc 添加点}"
|
|
|
+ Margin="5,2"
|
|
|
+ MinWidth="80"
|
|
|
+ Command="{Binding AddPointCommand}" />
|
|
|
+ <Button Content="{lex:Loc 删除点}"
|
|
|
+ Margin="5,2"
|
|
|
+ MinWidth="80"
|
|
|
+ Command="{Binding DeletePointCommand}" />
|
|
|
+
|
|
|
+ </StackPanel>
|
|
|
+ <DataGrid x:Name="dgPoints"
|
|
|
+ AutoGenerateColumns="False"
|
|
|
+ CanUserAddRows="False"
|
|
|
+ CanUserDeleteRows="False"
|
|
|
+ ColumnWidth="*"
|
|
|
+ SelectionUnit="FullRow"
|
|
|
+ SelectionMode="Single"
|
|
|
+ SelectedItem="{Binding SelectedPointInDataGrid,Mode=TwoWay}"
|
|
|
+ ItemsSource="{Binding Points}"
|
|
|
+ HeadersVisibility="Column"
|
|
|
+ HorizontalScrollBarVisibility="Auto"
|
|
|
+ ScrollViewer.CanContentScroll="True"
|
|
|
+ ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
|
|
+ GridLinesVisibility="All"
|
|
|
+ VerticalGridLinesBrush="#D0D0D0">
|
|
|
+ <DataGrid.Resources>
|
|
|
+ <Style TargetType="DataGridCell">
|
|
|
+ <Style.Resources>
|
|
|
+ <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}"
|
|
|
+ Color="#0078D7" />
|
|
|
+ </Style.Resources>
|
|
|
+ <Setter Property="MinHeight"
|
|
|
+ Value="25" />
|
|
|
+ <Setter Property="VerticalContentAlignment"
|
|
|
+ Value="Center" />
|
|
|
+ <Setter Property="HorizontalContentAlignment"
|
|
|
+ Value="Center" />
|
|
|
+ <Setter Property="VerticalAlignment"
|
|
|
+ Value="Center" />
|
|
|
+ <Setter Property="TextBlock.TextAlignment"
|
|
|
+ Value="Center" />
|
|
|
+ <Setter Property="Padding"
|
|
|
+ Value="0" />
|
|
|
+ <Style.Triggers>
|
|
|
+ <Trigger Property="IsSelected"
|
|
|
+ Value="True">
|
|
|
+ <Setter Property="Foreground"
|
|
|
+ Value="White" />
|
|
|
+ </Trigger>
|
|
|
+ </Style.Triggers>
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <!-- 为 TextBlock 添加默认居中样式 -->
|
|
|
+ <Style TargetType="TextBlock">
|
|
|
+ <Setter Property="TextAlignment"
|
|
|
+ Value="Center" />
|
|
|
+ <Setter Property="HorizontalAlignment"
|
|
|
+ Value="Center" />
|
|
|
+ <Setter Property="VerticalAlignment"
|
|
|
+ Value="Center" />
|
|
|
+ </Style>
|
|
|
+ </DataGrid.Resources>
|
|
|
+ <DataGrid.Columns>
|
|
|
+ <DataGridTextColumn Header="{lex:Loc 编号}"
|
|
|
+ IsReadOnly="True"
|
|
|
+ MinWidth="60"
|
|
|
+ Width="Auto"
|
|
|
+ Binding="{Binding Number, Mode=TwoWay, StringFormat={}{0:F0}}">
|
|
|
+ </DataGridTextColumn>
|
|
|
+ <DataGridTextColumn Header="{lex:Loc 标签}"
|
|
|
+ MinWidth="100"
|
|
|
+ Width="Auto"
|
|
|
+ Binding="{Binding Label, Mode=TwoWay}" />
|
|
|
+ <!--X 坐标-->
|
|
|
+ <DataGridTemplateColumn Header="X位置"
|
|
|
+ MinWidth="60"
|
|
|
+ Width="Auto">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding X_Position, StringFormat={}{0:F3}}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <mah:NumericUpDown Value="{Binding X_Position, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
+ Minimum="-9999.000"
|
|
|
+ Maximum="9999.000"
|
|
|
+ Interval="0.1"
|
|
|
+ StringFormat="F3"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Margin="0"
|
|
|
+ Padding="2" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ <!--X 速度-->
|
|
|
+ <DataGridTemplateColumn Header="X速度"
|
|
|
+ MinWidth="60"
|
|
|
+ Width="Auto">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding X_Velocity, StringFormat={}{0:F0}}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <mah:NumericUpDown Value="{Binding X_Velocity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
+ Minimum="0"
|
|
|
+ Maximum="9999.000"
|
|
|
+ Interval="1"
|
|
|
+ StringFormat="F3"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Margin="0"
|
|
|
+ Padding="2" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ <!--Y 坐标-->
|
|
|
+ <DataGridTemplateColumn Header="Y位置"
|
|
|
+ MinWidth="60"
|
|
|
+ Width="Auto">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding Y_Position, StringFormat={}{0:F3}}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <mah:NumericUpDown Value="{Binding Y_Position, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
+ Minimum="-9999.000"
|
|
|
+ Maximum="9999.000"
|
|
|
+ Interval="0.1"
|
|
|
+ StringFormat="F3"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Margin="0"
|
|
|
+ Padding="2" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ <!--Y 速度-->
|
|
|
+ <DataGridTemplateColumn Header="Y速度"
|
|
|
+ MinWidth="60"
|
|
|
+ Width="Auto">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding Y_Velocity, StringFormat={}{0:F0}}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <mah:NumericUpDown Value="{Binding Y_Velocity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
+ Minimum="0"
|
|
|
+ Maximum="9999.000"
|
|
|
+ Interval="1"
|
|
|
+ StringFormat="F3"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Margin="0"
|
|
|
+ Padding="2" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ <!--Z 起点坐标-->
|
|
|
+ <DataGridTemplateColumn Header="Z起点位置"
|
|
|
+ MinWidth="60"
|
|
|
+ Width="Auto">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding Z_Position_Start, StringFormat={}{0:F3}}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <mah:NumericUpDown Value="{Binding Z_Position_Start, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
+ Minimum="-9999.000"
|
|
|
+ Maximum="9999.000"
|
|
|
+ Interval="0.1"
|
|
|
+ StringFormat="F3"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Margin="0"
|
|
|
+ Padding="2" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ <!--Z 起点速度-->
|
|
|
+ <DataGridTemplateColumn Header="Z起点速度"
|
|
|
+ MinWidth="60"
|
|
|
+ Width="Auto">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding Z_Velocity_Start, StringFormat={}{0:F0}}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <mah:NumericUpDown Value="{Binding Z_Velocity_Start, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
+ Minimum="0"
|
|
|
+ Maximum="9999.000"
|
|
|
+ Interval="1"
|
|
|
+ StringFormat="F3"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Margin="0"
|
|
|
+ Padding="2" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ <!--Z 终点坐标-->
|
|
|
+ <DataGridTemplateColumn Header="Z终点位置"
|
|
|
+ MinWidth="60"
|
|
|
+ Width="Auto">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding Z_Position_Stop, StringFormat={}{0:F3}}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <mah:NumericUpDown Value="{Binding Z_Position_Stop, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
+ Minimum="-9999.000"
|
|
|
+ Maximum="9999.000"
|
|
|
+ Interval="0.1"
|
|
|
+ StringFormat="F3"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Margin="0"
|
|
|
+ Padding="2" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ <!--Z 终点速度-->
|
|
|
+ <DataGridTemplateColumn Header="Z终点速度"
|
|
|
+ MinWidth="60"
|
|
|
+ Width="Auto">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding Z_Velocity_Stop, StringFormat={}{0:F0}}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <mah:NumericUpDown Value="{Binding Z_Velocity_Stop, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
+ Minimum="0"
|
|
|
+ Maximum="9999.000"
|
|
|
+ Interval="1"
|
|
|
+ StringFormat="F3"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Margin="0"
|
|
|
+ Padding="2" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ <!--U 坐标-->
|
|
|
+ <DataGridTemplateColumn Header="U位置"
|
|
|
+ MinWidth="60"
|
|
|
+ Width="Auto">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding U_Position, StringFormat={}{0:F3}}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <mah:NumericUpDown Value="{Binding U_Position, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
+ Minimum="-9999.000"
|
|
|
+ Maximum="9999.000"
|
|
|
+ Interval="0.1"
|
|
|
+ StringFormat="F3"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Margin="0"
|
|
|
+ Padding="2" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ <!--U 速度-->
|
|
|
+ <DataGridTemplateColumn Header="U速度"
|
|
|
+ MinWidth="60"
|
|
|
+ Width="Auto">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding U_Velocity, StringFormat={}{0:F0}}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <mah:NumericUpDown Value="{Binding U_Velocity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
+ Minimum="0"
|
|
|
+ Maximum="9999.000"
|
|
|
+ Interval="1"
|
|
|
+ StringFormat="F3"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Margin="0"
|
|
|
+ Padding="2" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ <!--R 坐标-->
|
|
|
+ <DataGridTemplateColumn Header="R位置"
|
|
|
+ MinWidth="60"
|
|
|
+ Width="Auto">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding R_Position, StringFormat={}{0:F3}}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <mah:NumericUpDown Value="{Binding R_Position, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
+ Minimum="-9999.000"
|
|
|
+ Maximum="9999.000"
|
|
|
+ Interval="0.1"
|
|
|
+ StringFormat="F3"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Margin="0"
|
|
|
+ Padding="2" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ <!--R 速度-->
|
|
|
+ <DataGridTemplateColumn Header="R速度"
|
|
|
+ MinWidth="60"
|
|
|
+ Width="Auto">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding R_Velocity, StringFormat={}{0:F0}}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <mah:NumericUpDown Value="{Binding R_Velocity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
+ Minimum="0"
|
|
|
+ Maximum="9999.000"
|
|
|
+ Interval="1"
|
|
|
+ StringFormat="F3"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Margin="0"
|
|
|
+ Padding="2" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ <!--扭矩-->
|
|
|
+ <DataGridTemplateColumn Header="扭矩"
|
|
|
+ MinWidth="60"
|
|
|
+ Width="Auto">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding Torque, StringFormat={}{0:F3}}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <mah:NumericUpDown Value="{Binding Torque, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
+ Minimum="-9999.000"
|
|
|
+ Maximum="9999.000"
|
|
|
+ Interval="0.1"
|
|
|
+ StringFormat="F3"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Margin="0"
|
|
|
+ Padding="2" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ <!--供料器-->
|
|
|
+ <DataGridTemplateColumn Header="供料器"
|
|
|
+ MinWidth="60"
|
|
|
+ Width="Auto">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding Feeder, StringFormat={}{0:F0}}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <mah:NumericUpDown Value="{Binding Feeder, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
+ Minimum="0"
|
|
|
+ Maximum="9999.000"
|
|
|
+ Interval="1"
|
|
|
+ StringFormat="F0"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Margin="0"
|
|
|
+ Padding="2" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ <!--电批程序号-->
|
|
|
+ <DataGridTemplateColumn Header="电批程序号"
|
|
|
+ MinWidth="60"
|
|
|
+ Width="Auto">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding ScrewProNum, StringFormat={}{0:F0}}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <mah:NumericUpDown Value="{Binding ScrewProNum, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
+ Minimum="0"
|
|
|
+ Maximum="9999.000"
|
|
|
+ Interval="1"
|
|
|
+ StringFormat="F0"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Margin="0"
|
|
|
+ Padding="2" />
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellEditingTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+
|
|
|
+ <DataGridTextColumn Header="{lex:Loc 描述}"
|
|
|
+ MinWidth="100"
|
|
|
+ Width="200"
|
|
|
+ Binding="{Binding Description, Mode=TwoWay}" />
|
|
|
+ </DataGrid.Columns>
|
|
|
+ </DataGrid>
|
|
|
+ </DockPanel>
|
|
|
+ <GridSplitter Grid.Column="0"
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.RowSpan="2"
|
|
|
+ Width="2"
|
|
|
+ Background="DeepSkyBlue"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalAlignment="Right" />
|
|
|
+ <Viewbox Grid.Column="1">
|
|
|
+ <Grid Grid.Row="1">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Grid Grid.Column="0"
|
|
|
+ VerticalAlignment="Center">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Button Content="{lex:Loc 上使能}"
|
|
|
+ Grid.Row="0"
|
|
|
+ materialDesign:ButtonAssist.CornerRadius="10"
|
|
|
+ Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
|
|
+ Command="{Binding DataContext.MotorCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
|
+ CommandParameter="True" />
|
|
|
+ <Button Content="{lex:Loc 下使能}"
|
|
|
+ Grid.Row="1"
|
|
|
+ Margin="0,10,0,10"
|
|
|
+ materialDesign:ButtonAssist.CornerRadius="10"
|
|
|
+ Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
|
|
+ Command="{Binding DataContext.MotorCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
|
+ CommandParameter="False" />
|
|
|
+ <Button Content="{lex:Loc 复位错误}"
|
|
|
+ Grid.Row="2"
|
|
|
+ materialDesign:ButtonAssist.CornerRadius="10"
|
|
|
+ Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
|
|
+ Command="{Binding DataContext.ResetCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
|
|
|
+ <Button Content="{lex:Loc 释放刹车}"
|
|
|
+ Grid.Row="3"
|
|
|
+ Margin="0,10,0,10"
|
|
|
+ materialDesign:ButtonAssist.CornerRadius="10"
|
|
|
+ Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
|
|
+ Command="{Binding DataContext.sFreeCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
|
|
|
+ <Button Content="{lex:Loc 锁定刹车}"
|
|
|
+ Grid.Row="4"
|
|
|
+ materialDesign:ButtonAssist.CornerRadius="10"
|
|
|
+ Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
|
|
+ Command="{Binding DataContext.SLockCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
|
|
|
+ </Grid>
|
|
|
+ <Grid Grid.Column="1">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid.Resources>
|
|
|
+ <Style TargetType="Button"
|
|
|
+ BasedOn="{StaticResource MaterialDesignRaisedDarkButton}">
|
|
|
+ <Setter Property="Width"
|
|
|
+ Value="60" />
|
|
|
+ <Setter Property="Height"
|
|
|
+ Value="60" />
|
|
|
+ <Setter Property="FontSize"
|
|
|
+ Value="13" />
|
|
|
+ <Setter Property="Padding"
|
|
|
+ Value="0" />
|
|
|
+ <Setter Property="HorizontalAlignment"
|
|
|
+ Value="Center" />
|
|
|
+ <Setter Property="VerticalAlignment"
|
|
|
+ Value="Center" />
|
|
|
+ <Setter Property="Margin"
|
|
|
+ Value="2" />
|
|
|
+ <Setter Property="materialDesign:ButtonAssist.CornerRadius"
|
|
|
+ Value="10" />
|
|
|
+ </Style>
|
|
|
+ </Grid.Resources>
|
|
|
+
|
|
|
+ <Button x:Name="btn_x"
|
|
|
+ Grid.Row="1"
|
|
|
+ Grid.Column="0"
|
|
|
+ Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
|
+ CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=X-}">
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <materialDesign:PackIcon Kind="ArrowLeftBold"
|
|
|
+ Width="26"
|
|
|
+ Height="26" />
|
|
|
+ <TextBlock Text="-X"
|
|
|
+ HorizontalAlignment="Center" />
|
|
|
+ </StackPanel>
|
|
|
+ </Button>
|
|
|
+ <Button Grid.Row="1"
|
|
|
+ Grid.Column="2"
|
|
|
+ Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
|
+ CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=X+}">
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <materialDesign:PackIcon Kind="ArrowRightBold"
|
|
|
+ Width="26"
|
|
|
+ Height="26" />
|
|
|
+ <TextBlock Text="+X"
|
|
|
+ HorizontalAlignment="Center" />
|
|
|
+ </StackPanel>
|
|
|
+ </Button>
|
|
|
+ <Button Grid.Row="0"
|
|
|
+ Grid.Column="1"
|
|
|
+ Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
|
+ CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Y+}">
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <materialDesign:PackIcon Kind="ArrowBottomBold"
|
|
|
+ Width="26"
|
|
|
+ Height="26" />
|
|
|
+ <TextBlock Text="+Y"
|
|
|
+ HorizontalAlignment="Center" />
|
|
|
+ </StackPanel>
|
|
|
+ </Button>
|
|
|
+ <Button Grid.Row="2"
|
|
|
+ Grid.Column="1"
|
|
|
+ Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
|
+ CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Y-}">
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <materialDesign:PackIcon Kind="ArrowBottomBold"
|
|
|
+ Width="26"
|
|
|
+ Height="26" />
|
|
|
+ <TextBlock Text="-Y"
|
|
|
+ HorizontalAlignment="Center" />
|
|
|
+ </StackPanel>
|
|
|
+ </Button>
|
|
|
+ <Button Grid.Row="0"
|
|
|
+ Grid.Column="3"
|
|
|
+ Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
|
+ CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Z+}">
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <materialDesign:PackIcon Kind="ArrowTopBold"
|
|
|
+ Width="26"
|
|
|
+ Height="26" />
|
|
|
+ <TextBlock Text="+Z"
|
|
|
+ HorizontalAlignment="Center" />
|
|
|
+ </StackPanel>
|
|
|
+ </Button>
|
|
|
+ <Button Grid.Row="2"
|
|
|
+ Grid.Column="3"
|
|
|
+ Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
|
+ CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Z-}">
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <materialDesign:PackIcon Kind="ArrowBottomBold"
|
|
|
+ Width="26"
|
|
|
+ Height="26" />
|
|
|
+ <TextBlock Text="-Z"
|
|
|
+ HorizontalAlignment="Center" />
|
|
|
+ </StackPanel>
|
|
|
+ </Button>
|
|
|
+ <Button Grid.Row="3"
|
|
|
+ Grid.Column="0"
|
|
|
+ Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
|
+ CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=U+}">
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <materialDesign:PackIcon Kind="AxisZRotateCounterclockwise"
|
|
|
+ Width="26"
|
|
|
+ Height="26" />
|
|
|
+ <TextBlock Text="+U"
|
|
|
+ HorizontalAlignment="Center" />
|
|
|
+ </StackPanel>
|
|
|
+ </Button>
|
|
|
+ <Button Grid.Row="4"
|
|
|
+ Grid.Column="0"
|
|
|
+ Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
|
+ CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=U-}">
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <materialDesign:PackIcon Kind="AxisZRotateClockwise"
|
|
|
+ Width="26"
|
|
|
+ Height="26" />
|
|
|
+ <TextBlock Text="-U"
|
|
|
+ HorizontalAlignment="Center" />
|
|
|
+ </StackPanel>
|
|
|
+ </Button>
|
|
|
+ <Button Grid.Row="3"
|
|
|
+ Grid.Column="1"
|
|
|
+ Grid.ColumnSpan="2"
|
|
|
+ Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
|
+ CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=R+}">
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <materialDesign:PackIcon Kind="AxisZRotateCounterclockwise"
|
|
|
+ Width="26"
|
|
|
+ Height="26" />
|
|
|
+ <TextBlock Text="+R"
|
|
|
+ HorizontalAlignment="Center" />
|
|
|
+ </StackPanel>
|
|
|
+ </Button>
|
|
|
+ <Button Grid.Row="4"
|
|
|
+ Grid.Column="1"
|
|
|
+ Grid.ColumnSpan="2"
|
|
|
+ Command="{Binding DataContext.JogCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
|
+ CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=R-}">
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <materialDesign:PackIcon Kind="AxisZRotateClockwise"
|
|
|
+ Width="26"
|
|
|
+ Height="26" />
|
|
|
+ <TextBlock Text="-R"
|
|
|
+ HorizontalAlignment="Center" />
|
|
|
+ </StackPanel>
|
|
|
+ </Button>
|
|
|
+
|
|
|
+ <Grid Grid.Row="5"
|
|
|
+ Grid.ColumnSpan="7"
|
|
|
+ Margin="10">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <TextBlock Grid.Row="0"
|
|
|
+ Grid.Column="0"
|
|
|
+ Text="{lex:Loc 步进距离,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
+ Margin="10"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ HorizontalAlignment="Right" />
|
|
|
+ <uControl:myNumericUpDowm x:Name="txtDistance"
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.Column="1"
|
|
|
+ MinWidth="100"
|
|
|
+ Value="{Binding DataContext.Distance,RelativeSource={RelativeSource AncestorType={x:Type UserControl}},Mode=TwoWay}"
|
|
|
+ Interval="0.1"
|
|
|
+ Minimum="0"
|
|
|
+ Maximum="100"
|
|
|
+ StringFormat="{}{0:N3} mm"
|
|
|
+ Margin="10"
|
|
|
+ materialDesign:HintAssist.Hint="{lex:Loc 步进距离}" />
|
|
|
+
|
|
|
+ <TextBlock Grid.Row="1"
|
|
|
+ Grid.Column="0"
|
|
|
+ Text="{lex:Loc 点编号,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
+ Margin="10"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <ComboBox x:Name="cmbSelectPoint"
|
|
|
+ Grid.Row="2"
|
|
|
+ Grid.Column="0"
|
|
|
+ MinWidth="80"
|
|
|
+ materialDesign:HintAssist.Hint="{lex:Loc 选择点}"
|
|
|
+ Margin="10,5"
|
|
|
+ ItemsSource="{Binding Points}"
|
|
|
+ SelectedItem="{Binding SelectedPointInComboBox,Mode=TwoWay}">
|
|
|
+ <ComboBox.ItemTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <StackPanel HorizontalAlignment="Left"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <TextBlock Text="{Binding Number,StringFormat={}{0}:}" />
|
|
|
+ <TextBlock Text="{Binding Label}" />
|
|
|
+ </StackPanel>
|
|
|
+ </DataTemplate>
|
|
|
+ </ComboBox.ItemTemplate>
|
|
|
+ </ComboBox>
|
|
|
+
|
|
|
+ <TextBlock Grid.Row="1"
|
|
|
+ Grid.Column="1"
|
|
|
+ Text="{lex:Loc 动作指令,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
+ Margin="10"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <ComboBox x:Name="cmbSelectMotioncmd"
|
|
|
+ Grid.Row="2"
|
|
|
+ Grid.Column="1"
|
|
|
+ MinWidth="80"
|
|
|
+ Margin="10,5"
|
|
|
+ materialDesign:HintAssist.Hint="{lex:Loc 动作指令}"
|
|
|
+ ItemsSource="{ext:EnumBindingSource EnumType=enums:MotionCommand}"
|
|
|
+ SelectedItem="{Binding DataContext.SelectMotionCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
|
|
|
+
|
|
|
+ <Button Grid.Row="2"
|
|
|
+ Grid.Column="2"
|
|
|
+ Content="{lex:Loc 执行动作}"
|
|
|
+ Margin="10,5"
|
|
|
+ Command="{Binding DataContext.ExecuteMotion,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}">
|
|
|
+ <Button.CommandParameter>
|
|
|
+ <MultiBinding Converter="{StaticResource MultiParameterConverter}">
|
|
|
+ <Binding ElementName="cmbSelectPoint"
|
|
|
+ Path="SelectedItem" />
|
|
|
+ <Binding ElementName="cmbSelectMotioncmd"
|
|
|
+ Path="SelectedItem" />
|
|
|
+ </MultiBinding>
|
|
|
+ </Button.CommandParameter>
|
|
|
+ </Button>
|
|
|
+
|
|
|
+ <Button Grid.Row="3"
|
|
|
+ Grid.Column="0"
|
|
|
+ Content="{lex:Loc 示教}"
|
|
|
+ Margin="10"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ Command="{Binding DataContext.TechPointCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
|
+ CommandParameter="{Binding ElementName=cmbSelectPoint,Path=SelectedItem}" />
|
|
|
+ <!--<ToggleButton Grid.Row="3"
|
|
|
+ Grid.Column="2"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Visibility="{Binding IsHaveRobot,Converter={StaticResource BooleanToVisibilityConverter}}"
|
|
|
+ materialDesign:ToggleButtonAssist.OnContent="{materialDesign:PackIcon Kind=ArrowRight}"
|
|
|
+ Content="{materialDesign:PackIcon Kind=ProgressWrench}"
|
|
|
+ Style="{StaticResource MaterialDesignActionToggleButton}"
|
|
|
+ ToolTip="{lex:Loc 手动验证流程}"
|
|
|
+ Margin="5,0"
|
|
|
+ IsChecked="{Binding IsRightDrawerOpen,ElementName=DrawerHost}" />-->
|
|
|
+ </Grid>
|
|
|
+ </Grid>
|
|
|
+ </Grid>
|
|
|
+ </Viewbox>
|
|
|
+ </Grid>
|
|
|
+ </Grid>
|
|
|
+ </materialDesign:DrawerHost>
|
|
|
+
|
|
|
+ <StackPanel Grid.Row="2"
|
|
|
+ Orientation="Horizontal"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Margin="20">
|
|
|
+ <Button Content="{lex:Loc 下一步}"
|
|
|
+ IsEnabled="{Binding IsAllowEdit}"
|
|
|
+ MinWidth="100"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ materialDesign:ButtonAssist.CornerRadius="10"
|
|
|
+ Style="{StaticResource MaterialDesignRaisedButton}"
|
|
|
+ Command="{Binding NextCommand}" />
|
|
|
+ </StackPanel>
|
|
|
+ </Grid>
|
|
|
+</UserControl>
|