| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258 |
- <UserControl x:Class="TeamAAS_VP.Views.Calibration.CalibrationTeachCenterPoint"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:prism="http://prismlibrary.com/"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
- xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:uControl="clr-namespace:TeamAAS_VP.Controls"
- xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Calibration"
- xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
- xmlns:lex="http://wpflocalizeextension.codeplex.com"
- xmlns:ext="clr-namespace:TeamAAS_VP.Extension"
- xmlns:enums="clr-namespace:TeamAAS_VP.Enums"
- xmlns:valueConvert="clr-namespace:TeamAAS_VP.ValueConverter"
- 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:CalibrationTeachCenterPointViewModel}"
- d:Height="600"
- d:Width="1024"
- d:Background="White"
- FontFamily="{DynamicResource DefaultFont}">
- <UserControl.Resources>
- <valueConvert:RobotIdToVisibiltyConverter x:Key="RobotIdToVisibiltyConverter" />
- <valueConvert:RobotIdToVisibiltyConverter x:Key="RobotIdToVisibiltyConverterInverse"
- Inverse="True" />
- </UserControl.Resources>
- <b:Interaction.Triggers>
- <b:EventTrigger EventName="Loaded">
- <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
- </b:EventTrigger>
- </b:Interaction.Triggers>
- <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="CrosshairsGps"
- Width="30"
- Height="30" />
- <TextBlock Text="{Binding SelectCalibration.Name,Converter={StaticResource StringFormatConverter},ConverterParameter=' [{0}] '}"
- VerticalAlignment="Center" />
- <TextBlock Text="{lex:Loc 示教中心点,Converter={StaticResource StringFormatConverter},ConverterParameter='- {0}'}"
- VerticalAlignment="Center" />
- </StackPanel>
- <materialDesign:DrawerHost Grid.Row="1"
- IsEnabled="{Binding IsAllowEdit}"
- OpenMode="Modal"
- x:Name="DrawerHost">
- <materialDesign:DrawerHost.RightDrawerContent>
- <uControl:RobotManual x:Name="robotManual" />
- </materialDesign:DrawerHost.RightDrawerContent>
- <Grid VerticalAlignment="Center"
- Width="350">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto"
- MinWidth="100" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid.Resources>
- <Style TargetType="TextBlock">
- <Setter Property="HorizontalAlignment"
- Value="Left" />
- <Setter Property="VerticalAlignment"
- Value="Center" />
- </Style>
- </Grid.Resources>
- <TextBlock Text="{lex:Loc 示教中心点,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
- FontWeight="Bold"
- Grid.Row="0"
- Grid.Column="0" />
- <Button Content="{lex:Loc 示教}"
- Grid.Row="0"
- Grid.Column="1"
- MinWidth="150"
- Margin="10,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- materialDesign:ButtonAssist.CornerRadius="10"
- Style="{StaticResource MaterialDesignRaisedButton}"
- Command="{Binding TechCenterCommand}">
- <Button.ToolTip>
- <Image Source="pack://application:,,,/TeamAAS-VP;component/Resources/Images/FeederCenterPoint.png" />
- </Button.ToolTip>
- </Button>
- <TextBlock Text="{lex:Loc 示教避让点,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
- FontWeight="Bold"
- Grid.Row="1"
- Grid.Column="0"
- Visibility="{Binding IsShowTechHome,Converter={StaticResource BooleanToVisibilityConverter}}" />
- <Button Content="{lex:Loc 示教}"
- Grid.Row="1"
- Grid.Column="1"
- MinWidth="150"
- Margin="10,10"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- materialDesign:ButtonAssist.CornerRadius="10"
- Visibility="{Binding IsShowTechHome,Converter={StaticResource BooleanToVisibilityConverter}}"
- Style="{StaticResource MaterialDesignRaisedButton}"
- Command="{Binding TechHomeCommand}">
- </Button>
- <TextBlock Text="{lex:Loc 选择模式,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
- Grid.Row="2"
- Grid.Column="0"
- Visibility="{Binding SelectCalibration.RobotId,Converter={StaticResource RobotIdToVisibiltyConverterInverse}}" />
- <ComboBox x:Name="myComboBox"
- Grid.Row="2"
- Grid.Column="1"
- Margin="5,10"
- SelectedItem="{Binding SelectCalibration.CalibTechP0Mode}"
- ItemsSource="{ext:EnumBindingSource enums:CalibTechP0Mode}"
- Visibility="{Binding SelectCalibration.RobotId,Converter={StaticResource RobotIdToVisibiltyConverterInverse}}" />
- <TextBlock x:Name="txt1"
- Text="{lex:Loc 示教P0,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
- Grid.Row="3"
- Grid.Column="0"
- VerticalAlignment="Center">
- <TextBlock.Style>
- <Style TargetType="TextBlock">
- <Setter Property="Visibility"
- Value="Collapsed" />
- <Style.Triggers>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding ElementName=myComboBox,Path=Visibility}"
- Value="Visible" />
- <Condition Binding="{Binding ElementName=myComboBox,Path=SelectedItem}"
- Value="{x:Static enums:CalibTechP0Mode.TechP0}" />
- </MultiDataTrigger.Conditions>
- <!-- 满足条件时:显示 -->
- <Setter Property="Visibility"
- Value="Visible" />
- </MultiDataTrigger>
- </Style.Triggers>
- </Style>
- </TextBlock.Style>
- </TextBlock>
- <Button Content="{lex:Loc 示教}"
- Grid.Row="3"
- Grid.Column="1"
- MinWidth="150"
- Margin="10,10"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- materialDesign:ButtonAssist.CornerRadius="10"
- Visibility="{Binding ElementName=txt1,Path=Visibility}"
- Style="{StaticResource MaterialDesignRaisedButton}"
- Command="{Binding TechMarkPointCommand}">
- </Button>
- <TextBlock Grid.Row="4"
- Grid.Column="0"
- Text="{lex:Loc 宽,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <mah:NumericUpDown Grid.Row="4"
- Grid.Column="1"
- Maximum="600"
- Minimum="0"
- Interval="1"
- MinHeight="30"
- Margin="5,10"
- StringFormat="{}{0:N3} mm"
- materialDesign:HintAssist.Hint="{lex:Loc 图像X方向}"
- materialDesign:HintAssist.HelperText="{lex:Loc 图像X方向}"
- Value="{Binding SelectCalibration.Width,Mode=TwoWay}" />
- <TextBlock Text="{lex:Loc 高,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
- Grid.Row="5"
- Grid.Column="0" />
- <mah:NumericUpDown Grid.Row="5"
- Grid.Column="1"
- Maximum="600"
- Minimum="0"
- MinHeight="30"
- Interval="1"
- Margin="5"
- StringFormat="{}{0:N3} mm"
- materialDesign:HintAssist.Hint="{lex:Loc 图像Y方向}"
- materialDesign:HintAssist.HelperText="{lex:Loc 图像Y方向}"
- Value="{Binding SelectCalibration.Height,Mode=TwoWay}" />
- <StackPanel Grid.Row="6"
- Grid.ColumnSpan="2"
- Orientation="Horizontal"
- HorizontalAlignment="Center">
- <ToggleButton x:Name="tb_BI"
- Style="{StaticResource MaterialDesignSwitchDarkToggleButton}"
- ToolTip="{lex:Loc 夹爪操作}">
- <b:Interaction.Triggers>
- <b:EventTrigger EventName="Checked">
- <b:InvokeCommandAction Command="{Binding BlowOrInhalControlCommand}"
- CommandParameter="{Binding ElementName=tb_BI,Path=IsChecked}" />
- </b:EventTrigger>
- <b:EventTrigger EventName="Unchecked">
- <b:InvokeCommandAction Command="{Binding BlowOrInhalControlCommand}"
- CommandParameter="{Binding ElementName=tb_BI,Path=IsChecked}" />
- </b:EventTrigger>
- </b:Interaction.Triggers>
- </ToggleButton>
- <ToggleButton materialDesign:ToggleButtonAssist.OnContent="{materialDesign:PackIcon Kind=ArrowRight}"
- Content="{materialDesign:PackIcon Kind=RobotIndustrial}"
- Style="{StaticResource MaterialDesignActionToggleButton}"
- ToolTip="{lex:Loc 机器人步进}"
- Margin="10,5"
- IsChecked="{Binding IsRightDrawerOpen,ElementName=DrawerHost}" />
- </StackPanel>
- </Grid>
- </materialDesign:DrawerHost>
- <StackPanel Grid.Row="2"
- Orientation="Horizontal"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Margin="20">
- <Button Content="{lex:Loc 下一步}"
- IsEnabled="{Binding IsAllowEdit}"
- MinWidth="150"
- Margin="10,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- materialDesign:ButtonAssist.CornerRadius="10"
- Style="{StaticResource MaterialDesignRaisedButton}"
- Command="{Binding NextCommand}" />
- </StackPanel>
- </Grid>
- </UserControl>
|