CalibrationSelectTool.xaml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <UserControl x:Class="TeamAAS_VP.Views.Calibration.CalibrationSelectTool"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:prism="http://prismlibrary.com/"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  8. xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  9. xmlns:uControl="clr-namespace:TeamAAS_VP.Controls"
  10. xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Calibration"
  11. xmlns:lex="http://wpflocalizeextension.codeplex.com"
  12. lex:LocalizeDictionary.DesignCulture="zh-CN"
  13. lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
  14. lex:ResxLocalizationProvider.DefaultDictionary="Lang"
  15. prism:ViewModelLocator.AutoWireViewModel="True"
  16. mc:Ignorable="d"
  17. d:DataContext="{d:DesignInstance Type=vm:CalibrationSelectToolViewModel}"
  18. d:Height="600"
  19. d:Width="1024"
  20. d:Background="White"
  21. FontFamily="{DynamicResource DefaultFont}">
  22. <b:Interaction.Triggers>
  23. <b:EventTrigger EventName="Loaded">
  24. <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
  25. </b:EventTrigger>
  26. </b:Interaction.Triggers>
  27. <Grid>
  28. <Grid.RowDefinitions>
  29. <RowDefinition Height="auto" />
  30. <RowDefinition Height="*" />
  31. <RowDefinition Height="auto" />
  32. </Grid.RowDefinitions>
  33. <Button Grid.Row="0"
  34. Content="{materialDesign:PackIcon Kind=ArrowLeftCircle}"
  35. Width="50"
  36. HorizontalAlignment="Left"
  37. VerticalAlignment="Top"
  38. ToolTip="{lex:Loc 返回}"
  39. Style="{StaticResource MaterialDesignIconButton}"
  40. Command="{Binding BackCommand}" />
  41. <StackPanel Grid.Row="0"
  42. Orientation="Horizontal"
  43. Margin="50,0"
  44. VerticalAlignment="Center">
  45. <materialDesign:PackIcon Kind="CrosshairsGps"
  46. Width="30"
  47. Height="30" />
  48. <TextBlock Text="{Binding SelectCalibration.Name,Converter={StaticResource StringFormatConverter},ConverterParameter=' [{0}] '}"
  49. VerticalAlignment="Center" />
  50. <TextBlock Text="{lex:Loc 选择工具坐标,Converter={StaticResource StringFormatConverter},ConverterParameter='- {0}'}"
  51. VerticalAlignment="Center" />
  52. </StackPanel>
  53. <Grid Grid.Row="1"
  54. IsEnabled="{Binding IsAllowEdit}"
  55. VerticalAlignment="Center"
  56. Width="350">
  57. <Grid.RowDefinitions>
  58. <RowDefinition Height="auto"
  59. MinHeight="35" />
  60. <RowDefinition Height="auto"
  61. MinHeight="35" />
  62. </Grid.RowDefinitions>
  63. <Grid.ColumnDefinitions>
  64. <ColumnDefinition Width="100" />
  65. <ColumnDefinition Width="*" />
  66. </Grid.ColumnDefinitions>
  67. <Grid.Resources>
  68. <Style TargetType="TextBlock">
  69. <Setter Property="HorizontalAlignment"
  70. Value="Left" />
  71. <Setter Property="VerticalAlignment"
  72. Value="Center" />
  73. </Style>
  74. </Grid.Resources>
  75. <TextBlock Text="{lex:Loc 工具坐标,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
  76. FontWeight="Bold"
  77. Grid.Row="0"
  78. Grid.Column="0" />
  79. <Button Content="{lex:Loc 校准}"
  80. Grid.Row="0"
  81. Grid.Column="1"
  82. MinWidth="150"
  83. Margin="10,0"
  84. HorizontalAlignment="Center"
  85. VerticalAlignment="Center"
  86. materialDesign:ButtonAssist.CornerRadius="10"
  87. Style="{StaticResource MaterialDesignRaisedButton}"
  88. Command="{Binding CalibToolCommand}">
  89. <Button.ToolTip>
  90. <Image Source="pack://application:,,,/TeamAAS-VP;component/Resources/Images/defToolTeachScaraFixed.jpg" />
  91. </Button.ToolTip>
  92. </Button>
  93. <Grid Grid.Row="1"
  94. Grid.Column="0"
  95. Grid.ColumnSpan="2"
  96. HorizontalAlignment="Center"
  97. Margin="0,20">
  98. <Grid.RowDefinitions>
  99. <RowDefinition Height="auto" />
  100. <RowDefinition Height="auto" />
  101. </Grid.RowDefinitions>
  102. <Grid.ColumnDefinitions>
  103. <ColumnDefinition Width="50*" />
  104. <ColumnDefinition Width="50*" />
  105. </Grid.ColumnDefinitions>
  106. <TextBlock Text="X(mm):"
  107. Grid.Row="0"
  108. Grid.Column="0"
  109. HorizontalAlignment="Center" />
  110. <TextBox Grid.Row="1"
  111. Grid.Column="0"
  112. MinWidth="100"
  113. Margin="10"
  114. materialDesign:HintAssist.Hint="{lex:Loc 工具坐标X}"
  115. HorizontalContentAlignment="Center"
  116. Text="{Binding SelectCalibration.Tool.X}" />
  117. <TextBlock Text="Y(mm):"
  118. Grid.Row="0"
  119. Grid.Column="1"
  120. HorizontalAlignment="Center" />
  121. <TextBox Grid.Row="1"
  122. Grid.Column="1"
  123. MinWidth="100"
  124. Margin="10"
  125. materialDesign:HintAssist.Hint="{lex:Loc 工具坐标Y}"
  126. HorizontalContentAlignment="Center"
  127. Text="{Binding SelectCalibration.Tool.Y}" />
  128. </Grid>
  129. </Grid>
  130. <StackPanel Grid.Row="2"
  131. Orientation="Horizontal"
  132. HorizontalAlignment="Center"
  133. VerticalAlignment="Center"
  134. Margin="20">
  135. <Button Content="{lex:Loc 下一步}"
  136. IsEnabled="{Binding IsAllowEdit}"
  137. MinWidth="150"
  138. Margin="10,0"
  139. HorizontalAlignment="Center"
  140. VerticalAlignment="Center"
  141. materialDesign:ButtonAssist.CornerRadius="10"
  142. Style="{StaticResource MaterialDesignRaisedButton}"
  143. Command="{Binding NextCommand}" />
  144. </StackPanel>
  145. </Grid>
  146. </UserControl>