|
|
@@ -1271,11 +1271,14 @@
|
|
|
|
|
|
<!--运动控制区-->
|
|
|
<Viewbox Grid.Column="1">
|
|
|
- <Grid Grid.Row="1">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="auto" />
|
|
|
- <ColumnDefinition Width="auto" />
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
+ <Grid >
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+
|
|
|
<ToggleButton Grid.ColumnSpan="2"
|
|
|
HorizontalAlignment="Left"
|
|
|
VerticalAlignment="Top"
|
|
|
@@ -1285,54 +1288,191 @@
|
|
|
ToolTip="相机图像"
|
|
|
Margin="5,0"
|
|
|
IsChecked="{Binding IsLeftDrawerOpen,ElementName=DrawerHost}" />
|
|
|
- <Grid Grid.Column="0"
|
|
|
- VerticalAlignment="Center">
|
|
|
+
|
|
|
+ <Grid Grid.Row="0"
|
|
|
+ Margin="10"
|
|
|
+ HorizontalAlignment="Center">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <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" />
|
|
|
- </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.RowDefinitions>
|
|
|
<RowDefinition Height="auto" />
|
|
|
- <RowDefinition Height="*" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
</Grid.RowDefinitions>
|
|
|
- <TextBlock VerticalAlignment="Center"
|
|
|
- Margin="10,0">
|
|
|
+ <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>
|
|
|
+ <StackPanel Grid.ColumnSpan="4"
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.Column="0"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Orientation="Horizontal" Margin="30,0,0,0">
|
|
|
+ <Button Content="{lex:Loc 上使能}"
|
|
|
+ Grid.Row="2"
|
|
|
+ materialDesign:ButtonAssist.CornerRadius="10"
|
|
|
+ Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
|
|
+ Command="{Binding MotorCommand}"
|
|
|
+ CommandParameter="True" />
|
|
|
+ <Button Content="{lex:Loc 下使能}"
|
|
|
+ Grid.Row="3"
|
|
|
+ Margin="10"
|
|
|
+ materialDesign:ButtonAssist.CornerRadius="10"
|
|
|
+ Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
|
|
+ Command="{Binding MotorCommand}"
|
|
|
+ CommandParameter="False" />
|
|
|
+ <Button Content="{lex:Loc 复位错误}"
|
|
|
+ Grid.Row="4"
|
|
|
+ materialDesign:ButtonAssist.CornerRadius="10"
|
|
|
+ Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
|
|
+ Command="{Binding ResetCommand}" />
|
|
|
+ </StackPanel>
|
|
|
+ <Button Grid.Row="2"
|
|
|
+ Grid.Column="0"
|
|
|
+ Command="{Binding JogCommand}"
|
|
|
+ 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="2"
|
|
|
+ Grid.Column="2"
|
|
|
+ Command="{Binding JogCommand}"
|
|
|
+ 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="1"
|
|
|
+ Grid.Column="1"
|
|
|
+ Command="{Binding JogCommand}"
|
|
|
+ CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Y+}">
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <materialDesign:PackIcon Kind="ArrowTopBold"
|
|
|
+ Width="26"
|
|
|
+ Height="26" />
|
|
|
+ <TextBlock Text="+Y"
|
|
|
+ HorizontalAlignment="Center" />
|
|
|
+ </StackPanel>
|
|
|
+ </Button>
|
|
|
+ <Button Grid.Row="3"
|
|
|
+ Grid.Column="1"
|
|
|
+ Command="{Binding JogCommand}"
|
|
|
+ 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="1"
|
|
|
+ Grid.Column="3"
|
|
|
+ Command="{Binding JogCommand}"
|
|
|
+ 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="3"
|
|
|
+ Grid.Column="3"
|
|
|
+ Command="{Binding JogCommand}"
|
|
|
+ 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="4"
|
|
|
+ Grid.Column="3"
|
|
|
+ Command="{Binding JogCommand}"
|
|
|
+ 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 JogCommand}"
|
|
|
+ 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>
|
|
|
+
|
|
|
+ <StackPanel Grid.Row="6"
|
|
|
+ Grid.ColumnSpan="7"
|
|
|
+ Margin="10,10,0,10"
|
|
|
+ Grid.Column="0"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <TextBlock Text="{lex:Loc 步进距离}"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <uControl:myNumericUpDowm x:Name="txtDistance"
|
|
|
+ MinWidth="100"
|
|
|
+ Interval="0.1"
|
|
|
+ Minimum="0"
|
|
|
+ Maximum="100"
|
|
|
+ StringFormat="{}{0:N3} mm"
|
|
|
+ Value="{Binding Distance,Mode=TwoWay}"
|
|
|
+ Margin="10,0" />
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ <TextBlock Grid.Row="7"
|
|
|
+ Grid.ColumnSpan="7"
|
|
|
+ Margin="10,10,0,10"
|
|
|
+ Grid.Column="0"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ HorizontalAlignment="Center">
|
|
|
<TextBlock.Text>
|
|
|
<MultiBinding StringFormat="{}CurPos X: {0:F3} mm Y: {1:F3} mm Z: {2:F3} mm U: {3:F3} mm">
|
|
|
<Binding Path="Robot.CurrentPosition.X" />
|
|
|
@@ -1342,274 +1482,138 @@
|
|
|
</MultiBinding>
|
|
|
</TextBlock.Text>
|
|
|
</TextBlock>
|
|
|
- <Grid Grid.Row="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="ArrowTopBold"
|
|
|
- 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 步进距离}" />
|
|
|
+ </Grid>
|
|
|
|
|
|
- <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>
|
|
|
+ <Grid Grid.Row="1"
|
|
|
+ Grid.ColumnSpan="7">
|
|
|
+ <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="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}}}" />
|
|
|
+ <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="2"
|
|
|
- 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="2"
|
|
|
+ Grid.Column="2"
|
|
|
+ Content="{lex:Loc 执行动作}"
|
|
|
+ Margin="2"
|
|
|
+ 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="2"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- Command="{Binding DataContext.TechPointCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
|
|
|
- <!--<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>
|
|
|
+ <Button Grid.Row="3"
|
|
|
+ Grid.Column="0"
|
|
|
+ Content="{lex:Loc 示教}"
|
|
|
+ Margin="2"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ Command="{Binding DataContext.TechPointCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
|
|
|
</Grid>
|
|
|
+ <ItemsControl Grid.Row="2"
|
|
|
+ ItemsSource="{Binding AdditionalAxisList}">
|
|
|
+ <ItemsControl.ItemTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <Border Padding="6"
|
|
|
+ Margin="0,2"
|
|
|
+ Background="{DynamicResource MaterialDesignPaper}">
|
|
|
+ <DockPanel LastChildFill="False"
|
|
|
+ VerticalAlignment="Center">
|
|
|
+ <StackPanel Orientation="Horizontal"
|
|
|
+ DockPanel.Dock="Left"
|
|
|
+ VerticalAlignment="Center">
|
|
|
+ <TextBlock Text="{Binding Name}"
|
|
|
+ Width="140"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <TextBlock Text="{Binding CurrentPosition, StringFormat='{}{0:F3} mm'}"
|
|
|
+ Width="140"
|
|
|
+ Margin="10,0"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </StackPanel>
|
|
|
+ <StackPanel Orientation="Horizontal"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ DockPanel.Dock="Right">
|
|
|
+ <Button Content="-"
|
|
|
+ Width="60"
|
|
|
+ Height="36"
|
|
|
+ Margin="6,0"
|
|
|
+ Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
|
|
+ Command="{Binding DataContext.AdditionalAxisJogPlusCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
|
+ CommandParameter="{Binding}" />
|
|
|
+ <Button Content="+"
|
|
|
+ Width="60"
|
|
|
+ Height="36"
|
|
|
+ Margin="6,0"
|
|
|
+ Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
|
|
+ Command="{Binding DataContext.AdditionalAxisJogMinusCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
|
+ CommandParameter="{Binding}" />
|
|
|
+ <Button Content="上使能"
|
|
|
+ Width="60"
|
|
|
+ Height="36"
|
|
|
+ Margin="6,0"
|
|
|
+ Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
|
|
+ Command="{Binding DataContext.AdditionalAxisMotorOnCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
|
+ CommandParameter="{Binding}" />
|
|
|
+ <Button Content="下使能"
|
|
|
+ Width="60"
|
|
|
+ Height="36"
|
|
|
+ Margin="6,0"
|
|
|
+ Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
|
|
+ Command="{Binding DataContext.AdditionalAxisMotorOffCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
|
+ CommandParameter="{Binding}" />
|
|
|
+ </StackPanel>
|
|
|
+ </DockPanel>
|
|
|
+ </Border>
|
|
|
+ </DataTemplate>
|
|
|
+ </ItemsControl.ItemTemplate>
|
|
|
+ </ItemsControl>
|
|
|
</Grid>
|
|
|
</Viewbox>
|
|
|
</Grid>
|