<UserControl x:Class="XHandler.View.Consumables.OtherSetting"
|
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:XHandler.View.Consumables"
|
xmlns:str="clr-namespace:XHandler.Properties"
|
mc:Ignorable="d"
|
d:DesignHeight="1000" d:DesignWidth="800"
|
Loaded="UserControl_Loaded"
|
>
|
|
<Grid IsEnabled="{Binding is_default_type, Converter={StaticResource intToEnableConvert}}">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="auto"/>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="auto"/>
|
</Grid.RowDefinitions>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="*"/>
|
</Grid.ColumnDefinitions>
|
|
<!--#region 移动设置 -->
|
<TextBlock Grid.Row="0" Text="{x:Static str:Resources.strMoveSetting}" VerticalAlignment="Center"
|
FontSize="16" Margin="20 0 0 0" FontWeight="Bold"/>
|
<Border Grid.Row="1" Background="White" BorderBrush="LightGray" BorderThickness="1" CornerRadius="5" Margin="20 0">
|
<Grid>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
</Grid.RowDefinitions>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width=".25*"/>
|
<ColumnDefinition Width=".25*"/>
|
<ColumnDefinition Width=".25*"/>
|
<ColumnDefinition Width=".25*"/>
|
</Grid.ColumnDefinitions>
|
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" Margin="20 0">
|
<TextBlock Text="{x:Static str:Resources.strCanMove}" VerticalAlignment="Center" FontSize="16" Margin="0 0 20 0"/>
|
<CheckBox x:Name="checkBoxMove" Style="{DynamicResource SwitchCheckBoxStyle}" Checked="checkBoxMove_Checked" Unchecked="checkBoxMove_Unchecked"/>
|
</StackPanel>
|
|
<!--抓手抓板位置-->
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="{x:Static str:Resources.strGripBoardPosition}" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
|
<TextBlock Grid.Row="2" Grid.Column="0" Text="X (mm)" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
|
<TextBlock Grid.Row="2" Grid.Column="1" Text="Y (mm)" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
|
<TextBlock Grid.Row="2" Grid.Column="2" Text="Z (mm)" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
|
|
<TextBox x:Name="txtgripper_x_offset" Grid.Row="3" Grid.Column="0" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
|
BorderThickness="0">
|
<TextBox.Text>
|
<Binding Path="gripper_x_offset" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<local:ConsumablesValidationRule ValidateType="1,4@[2],5@[0-1000]"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
<TextBlock Grid.Row="2" Grid.Column="0" x:Name="xoError" Text="{Binding ElementName=txtgripper_x_offset,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
|
|
|
<TextBox x:Name="txtgripper_y_offset" Grid.Row="3" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
|
BorderThickness="0" >
|
<TextBox.Text>
|
<Binding Path="gripper_y_offset" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<local:ConsumablesValidationRule ValidateType="1,4@[2],5@[0-1000]"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
<TextBlock Grid.Row="2" Grid.Column="1" x:Name="yoError" Text="{Binding ElementName=txtgripper_y_offset,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
|
|
<!--<TextBox Grid.Row="3" Grid.Column="2" x:Name="txtgripper_z_offset" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
|
BorderThickness="0" Text="{Binding gripper_z_offset, Mode=TwoWay}"/>-->
|
<TextBox x:Name="txtgripper_z_offset" Grid.Row="3" Grid.Column="2" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
|
BorderThickness="0" >
|
<TextBox.Text>
|
<Binding Path="gripper_z_offset" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<local:ConsumablesValidationRule ValidateType="1,4@[2],7@[-200~200]"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
<TextBlock Grid.Row="2" Grid.Column="2" x:Name="zoError" Text="{Binding ElementName=txtgripper_z_offset,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
|
|
<TextBlock Grid.Row="4" Grid.Column="0" Text="{x:Static str:Resources.strGripperClose}" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
|
<TextBlock Grid.Row="4" Grid.Column="1" Text="{x:Static str:Resources.strGripperOpen}" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
|
<TextBlock Grid.Row="4" Grid.Column="2" Text="{x:Static str:Resources.strGripperSpeed}" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
|
<TextBlock Grid.Row="4" Grid.Column="3" Text="{x:Static str:Resources.strGripperPower}" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
|
<!--<TextBox Grid.Row="5" Grid.Column="0" x:Name="txtgripper_squeeze" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
|
BorderThickness="0" Text="{Binding gripper_squeeze, Mode=TwoWay}"/>-->
|
<TextBox x:Name="txtgripper_squeeze" Grid.Row="5" Grid.Column="0" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
|
BorderThickness="0" >
|
<TextBox.Text>
|
<Binding Path="gripper_squeeze" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<local:ConsumablesValidationRule ValidateType="1,4@[2],5@[0-1000]"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
<TextBlock Grid.Row="4" Grid.Column="0" x:Name="gseError" Text="{Binding ElementName=txtgripper_squeeze,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
|
|
<!--<TextBox Grid.Row="5" Grid.Column="1" x:Name="txtgripper_spread" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
|
BorderThickness="0" Text="{Binding gripper_spread, Mode=TwoWay}"/>-->
|
<TextBox x:Name="txtgripper_spread" Grid.Row="5" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
|
BorderThickness="0" >
|
<TextBox.Text>
|
<Binding Path="gripper_spread" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<local:ConsumablesValidationRule ValidateType="1,4@[2],5@[0-100]"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
<TextBlock Grid.Row="4" Grid.Column="1" x:Name="gsdError" Text="{Binding ElementName=txtgripper_spread,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
|
|
<!--<TextBox Grid.Row="5" Grid.Column="2" x:Name="txtgripperSpeed" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
|
BorderThickness="0" Text="{Binding gripper_speed, Mode=TwoWay}"/>-->
|
<TextBox x:Name="txtgripperSpeed" Grid.Row="5" Grid.Column="2" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
|
BorderThickness="0" >
|
<TextBox.Text>
|
<Binding Path="gripper_speed" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<local:ConsumablesValidationRule ValidateType="1,4@[2],5@[0-1000]"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
<TextBlock Grid.Row="4" Grid.Column="2" x:Name="gspeedError" Text="{Binding ElementName=txtgripperSpeed,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
|
|
<TextBox x:Name="txtgripperPower" Grid.Row="5" Grid.Column="3" Height="30" Width="200" HorizontalAlignment="Left" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
|
BorderThickness="0" >
|
<TextBox.Text>
|
<Binding Path="gripper_power" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<local:ConsumablesValidationRule ValidateType="1,4@[2],5@[0-1000]"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
<TextBlock Grid.Row="4" Grid.Column="2" x:Name="gpowerError" Text="{Binding ElementName=txtgripperPower,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
|
|
</Grid>
|
</Border>
|
<!--#endregion-->
|
|
<!--#region 叠放设置 -->
|
<TextBlock Grid.Row="2" Text="{x:Static str:Resources.strStackingSetting}" VerticalAlignment="Center"
|
FontSize="16" Margin="20 0 0 0" FontWeight="Bold"/>
|
<Border Grid.Row="3" Background="White" BorderBrush="LightGray" BorderThickness="1" CornerRadius="5" Margin="20 0">
|
<Grid>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="auto"/>
|
</Grid.RowDefinitions>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width=".25*"/>
|
<ColumnDefinition Width=".25*"/>
|
<ColumnDefinition Width=".25*"/>
|
<ColumnDefinition Width=".25*"/>
|
</Grid.ColumnDefinitions>
|
|
<!--叠放位置-->
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="{x:Static str:Resources.strStackingPosition}" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
|
|
<!--#region x\y\z -->
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="X (mm)" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
|
<TextBlock Grid.Row="1" Grid.Column="1" Text="Y (mm)" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
|
<TextBlock Grid.Row="1" Grid.Column="2" Text="Z (mm)" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
|
|
<TextBox x:Name="txtpiled_x" Grid.Row="2" Grid.Column="0" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
|
BorderThickness="0" >
|
<TextBox.Text>
|
<Binding Path="piled_x" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<local:ConsumablesValidationRule ValidateType="1,4@[2],5@[0-1000]"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
|
<TextBlock Grid.Row="1" Grid.Column="0" x:Name="pxError" Text="{Binding ElementName=txtpiled_x,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
|
<TextBox x:Name="txtpiled_y" Grid.Row="2" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
|
BorderThickness="0" >
|
<TextBox.Text>
|
<Binding Path="piled_y" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<local:ConsumablesValidationRule ValidateType="1,4@[2],5@[0-1000]"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
<TextBlock Grid.Row="1" Grid.Column="1" x:Name="pyError" Text="{Binding ElementName=txtpiled_y,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
|
|
<TextBox x:Name="txtpiled_height" Grid.Row="2" Grid.Column="2" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
|
BorderThickness="0" >
|
<TextBox.Text>
|
<Binding Path="piled_height" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<local:ConsumablesValidationRule ValidateType="1,4@[2],5@[0-1000]"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
<TextBlock Grid.Row="1" Grid.Column="2" x:Name="phError" Text="{Binding ElementName=txtpiled_height,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
|
<!--#endregion-->
|
|
<!--#region 叠放速度 (%) -->
|
<TextBlock Grid.Row="3" Grid.Column="0" Text="{x:Static str:Resources.strStackingSpeed}" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
|
<TextBox x:Name="tbpiled_speed" Grid.Row="4" Grid.Column="0" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
|
BorderThickness="0" >
|
<TextBox.Text>
|
<Binding Path="piled_speed" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<local:ConsumablesValidationRule ValidateType="1,4@[2],5@[0-100]"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
<TextBlock Grid.Row="3" Grid.Column="0" x:Name="tbsError" Text="{Binding ElementName=tbpiled_speed,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
|
<!--#endregion-->
|
|
<Grid Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="4" Margin="20 0 0 0">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
</Grid.RowDefinitions>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="200"/>
|
<ColumnDefinition Width="60"/>
|
<ColumnDefinition Width="*"/>
|
</Grid.ColumnDefinitions>
|
|
<!--其他耗材叠放至此耗材上-->
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="{x:Static str:Resources.strOtherStackOnThis}" VerticalAlignment="Center" FontSize="16"/>
|
<CheckBox Grid.Row="0" Grid.Column="1" x:Name="cbxispiled" Style="{DynamicResource SwitchCheckBoxStyle}" HorizontalAlignment="Left"
|
Checked="cbxispiled_Checked" Unchecked="cbxispiled_Checked" />
|
<!--编辑-->
|
<Button Grid.Row="0" Grid.Column="2" x:Name="btnIsPiled" Click="btnIsPiled_Click" Content="{x:Static str:Resources.strEdit}"
|
VerticalAlignment="Center" Style="{DynamicResource LinkButton}" FontSize="16" />
|
|
<!--此耗材叠放至其他耗材上-->
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="{x:Static str:Resources.strThisStackOnOther}" VerticalAlignment="Center" FontSize="16" />
|
<CheckBox Grid.Row="1" Grid.Column="1" x:Name="cbxispilingon" Style="{DynamicResource SwitchCheckBoxStyle}" HorizontalAlignment="Left" Checked="cbxispilingon_Checked" Unchecked="cbxispilingon_Checked"/>
|
<!--编辑-->
|
<Button Grid.Row="1" Grid.Column="2" x:Name="btnIspilingOn" Click="btnIspilingOn_Click" Content="{x:Static str:Resources.strEdit}"
|
VerticalAlignment="Center" Style="{DynamicResource LinkButton}" FontSize="16"/>
|
|
<!--此耗材自叠-->
|
<TextBlock Grid.Row="2" Grid.Column="0" Text="{x:Static str:Resources.strStackThis}" VerticalAlignment="Center" FontSize="16" Margin="0 0 20 0"/>
|
<CheckBox Grid.Row="2" Grid.Column="1" x:Name="cbxispiling" Style="{DynamicResource SwitchCheckBoxStyle}"
|
HorizontalAlignment="Left" Checked="cbxispiling_Checked" Unchecked="cbxispiling_Checked"/>
|
</Grid>
|
|
</Grid>
|
</Border>
|
<!--#endregion-->
|
</Grid>
|
</UserControl>
|