PlcPointParams.xaml 116 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597
  1. <UserControl x:Class="TeamAAS_VP.Views.Product.PlcPointParams"
  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:wf="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
  6. xmlns:vp="clr-namespace:Cognex.VisionPro;assembly=Cognex.VisionPro.Controls"
  7. xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  8. xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  9. xmlns:sys="clr-namespace:System;assembly=mscorlib"
  10. xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
  11. xmlns:enums="clr-namespace:TeamAAS_VP.Enums"
  12. xmlns:uControl="clr-namespace:TeamAAS_VP.Controls"
  13. xmlns:convert="clr-namespace:TeamAAS_VP.ValueConverter"
  14. xmlns:local="clr-namespace:TeamAAS_VP.Views.Product"
  15. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  16. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  17. xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Product"
  18. xmlns:ext="clr-namespace:TeamAAS_VP.Extension"
  19. xmlns:lex="http://wpflocalizeextension.codeplex.com"
  20. xmlns:localRobot="clr-namespace:TeamAAS_VP.Models.Robot"
  21. lex:LocalizeDictionary.DesignCulture="zh-CN"
  22. lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
  23. lex:ResxLocalizationProvider.DefaultDictionary="Lang"
  24. prism:ViewModelLocator.AutoWireViewModel="True"
  25. mc:Ignorable="d"
  26. d:DataContext="{d:DesignInstance Type=vm:PlcPointParamsViewModel}"
  27. d:Height="600"
  28. d:Width="1024"
  29. d:Background="White"
  30. FontFamily="{DynamicResource DefaultFont}">
  31. <b:Interaction.Triggers>
  32. <b:EventTrigger EventName="Loaded">
  33. <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
  34. </b:EventTrigger>
  35. </b:Interaction.Triggers>
  36. <UserControl.Resources>
  37. <ObjectDataProvider x:Key="eRobotHand"
  38. MethodName="GetValues"
  39. ObjectType="{x:Type sys:Enum}">
  40. <ObjectDataProvider.MethodParameters>
  41. <x:Type TypeName="enums:RobotHand" />
  42. </ObjectDataProvider.MethodParameters>
  43. </ObjectDataProvider>
  44. <ObjectDataProvider x:Key="eMotionCommand"
  45. MethodName="GetValues"
  46. ObjectType="{x:Type sys:Enum}">
  47. <ObjectDataProvider.MethodParameters>
  48. <x:Type TypeName="enums:MotionCommand" />
  49. </ObjectDataProvider.MethodParameters>
  50. </ObjectDataProvider>
  51. <convert:JogConverter x:Key="JogConverter" />
  52. <convert:MultiParameterConverter x:Key="MultiParameterConverter" />
  53. <convert:RobotConverter x:Key="RobotConverter" />
  54. </UserControl.Resources>
  55. <Grid>
  56. <Grid.RowDefinitions>
  57. <RowDefinition Height="auto" />
  58. <RowDefinition Height="*" />
  59. <RowDefinition Height="auto" />
  60. </Grid.RowDefinitions>
  61. <Button Grid.Row="0"
  62. Content="{materialDesign:PackIcon Kind=ArrowLeftCircle}"
  63. Width="50"
  64. HorizontalAlignment="Left"
  65. VerticalAlignment="Top"
  66. ToolTip="{lex:Loc 返回}"
  67. Style="{StaticResource MaterialDesignIconButton}"
  68. Command="{Binding BackCommand}" />
  69. <StackPanel Grid.Row="0"
  70. Orientation="Horizontal"
  71. Margin="50,0"
  72. VerticalAlignment="Center">
  73. <materialDesign:PackIcon Kind="CubeOutline"
  74. Width="30"
  75. Height="30" />
  76. <TextBlock Text="{Binding SelectProduct.Name}"
  77. VerticalAlignment="Center" />
  78. <TextBlock Text="{lex:Loc 机器人点位,Converter={StaticResource StringFormatConverter},ConverterParameter=' - {0}'}"
  79. VerticalAlignment="Center" />
  80. </StackPanel>
  81. <Border BorderThickness="1,1,1,1"
  82. VerticalAlignment="Bottom"
  83. Height="1">
  84. <Border.BorderBrush>
  85. <VisualBrush>
  86. <VisualBrush.Visual>
  87. <Rectangle StrokeDashArray="4 4"
  88. Stroke="LightGray"
  89. StrokeThickness="1"
  90. Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
  91. Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}" />
  92. </VisualBrush.Visual>
  93. </VisualBrush>
  94. </Border.BorderBrush>
  95. </Border>
  96. <materialDesign:DrawerHost Grid.Row="1"
  97. OpenMode="Standard"
  98. x:Name="DrawerHost"
  99. IsLeftDrawerOpen="{Binding IsLeftDrawerOpen,Mode=TwoWay}"
  100. d:IsLeftDrawerOpen="false"
  101. IsEnabled="{Binding IsAllowEdit}">
  102. <materialDesign:DrawerHost.LeftDrawerContent>
  103. <Grid Width="600">
  104. <Grid.RowDefinitions>
  105. <RowDefinition Height="*" />
  106. <RowDefinition Height=" auto" />
  107. </Grid.RowDefinitions>
  108. <wf:WindowsFormsHost Grid.Row="0"
  109. Margin="0,40">
  110. <vp:CogRecordDisplay x:Name="display" />
  111. </wf:WindowsFormsHost>
  112. <StackPanel Grid.Row="1"
  113. HorizontalAlignment="Left"
  114. VerticalAlignment="Bottom"
  115. Orientation="Horizontal">
  116. <TextBlock Text="{lex:Loc 相机,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
  117. FontWeight="Bold"
  118. VerticalAlignment="Center" />
  119. <ComboBox Margin="5,0,10,0"
  120. IsEnabled="{Binding IsGrap,Converter={StaticResource InvertBooleanConverter}}"
  121. ItemsSource="{Binding CameraList}"
  122. SelectedItem="{Binding SelectedCamera}"
  123. materialDesign:HintAssist.Hint="{lex:Loc 选择相机}">
  124. <ComboBox.ItemTemplate>
  125. <DataTemplate>
  126. <StackPanel Orientation="Horizontal">
  127. <materialDesign:PackIcon Kind="Camera" />
  128. <TextBlock Text="{Binding CameraName}"
  129. Margin="6,0" />
  130. </StackPanel>
  131. </DataTemplate>
  132. </ComboBox.ItemTemplate>
  133. </ComboBox>
  134. <Button Grid.Column="0"
  135. Content="{lex:Loc 开始采集}"
  136. MinWidth="100"
  137. materialDesign:ButtonAssist.CornerRadius="10"
  138. Style="{StaticResource MaterialDesignRaisedButton}"
  139. Command="{Binding StartGrabbingCommand}" />
  140. <Button Grid.Column="0"
  141. Content="{lex:Loc 停止采集}"
  142. IsEnabled="{Binding IsAllowEdit}"
  143. MinWidth="100"
  144. Margin="10,0"
  145. materialDesign:ButtonAssist.CornerRadius="10"
  146. Style="{StaticResource MaterialDesignRaisedButton}"
  147. Command="{Binding StopGrabbingCommand}" />
  148. <TextBlock Text="{Binding Message}"
  149. VerticalAlignment="Center"
  150. Foreground="Gray" />
  151. </StackPanel>
  152. </Grid>
  153. </materialDesign:DrawerHost.LeftDrawerContent>
  154. <Grid>
  155. <Grid.ColumnDefinitions>
  156. <ColumnDefinition Width="auto" />
  157. <ColumnDefinition Width="*" />
  158. </Grid.ColumnDefinitions>
  159. <Expander Grid.Column="0"
  160. ExpandDirection="Right"
  161. Background="Transparent">
  162. <Expander.Header>
  163. <TextBlock RenderTransformOrigin=".5,.5"
  164. Text="Navigation Description">
  165. <TextBlock.LayoutTransform>
  166. <RotateTransform Angle="90" />
  167. </TextBlock.LayoutTransform>
  168. </TextBlock>
  169. </Expander.Header>
  170. <ScrollViewer>
  171. <StackPanel Margin="8,24,16,24"
  172. Orientation="Vertical">
  173. <Image Source="pack://application:,,,/TeamAAS-VP;component/Resources/Images/9机器人点位.png"
  174. Stretch="Uniform"
  175. Width="350"
  176. HorizontalAlignment="Center"
  177. VerticalAlignment="Top" />
  178. <TextBlock Text="{lex:Loc 机器人点位示教}" />
  179. <TextBlock Foreground="Gray"
  180. TextWrapping="Wrap"
  181. Text="{lex:Loc 机器人点位示教描述}" />
  182. </StackPanel>
  183. </ScrollViewer>
  184. </Expander>
  185. <Grid Grid.Column="1">
  186. <Grid.ColumnDefinitions>
  187. <ColumnDefinition Width="*" />
  188. <ColumnDefinition Width="auto" />
  189. </Grid.ColumnDefinitions>
  190. <DockPanel Grid.Column="0">
  191. <!--选项列表-->
  192. <ListBox Height="80"
  193. DockPanel.Dock="Top"
  194. d:SelectedIndex="0"
  195. SelectedIndex="{Binding SelectedIndex}"
  196. Style="{StaticResource MaterialDesign3.NavigationBarPrimaryListBox}">
  197. <b:Interaction.Triggers>
  198. <b:EventTrigger EventName="SelectionChanged">
  199. <b:InvokeCommandAction Command="{Binding SelectionChangedCommand}" />
  200. </b:EventTrigger>
  201. </b:Interaction.Triggers>
  202. <!--取料拍照点位-->
  203. <ListBoxItem>
  204. <ListBoxItem.Style>
  205. <Style TargetType="ListBoxItem"
  206. BasedOn="{StaticResource MaterialDesign3.NavigationBarPrimaryListBoxItem}">
  207. <Setter Property="materialDesign:NavigationBarAssist.SelectedIcon"
  208. Value="Circle" />
  209. <Setter Property="materialDesign:NavigationBarAssist.UnselectedIcon"
  210. Value="CircleOutline" />
  211. </Style>
  212. </ListBoxItem.Style>
  213. <TextBlock Text="取料拍照点位" />
  214. </ListBoxItem>
  215. <!--取料点位-->
  216. <ListBoxItem>
  217. <ListBoxItem.Style>
  218. <Style TargetType="ListBoxItem"
  219. BasedOn="{StaticResource MaterialDesign3.NavigationBarPrimaryListBoxItem}">
  220. <Setter Property="materialDesign:NavigationBarAssist.SelectedIcon"
  221. Value="Circle" />
  222. <Setter Property="materialDesign:NavigationBarAssist.UnselectedIcon"
  223. Value="CircleOutline" />
  224. </Style>
  225. </ListBoxItem.Style>
  226. <TextBlock Text="取料点位" />
  227. </ListBoxItem>
  228. <!--下相机二次定位点位-->
  229. <ListBoxItem>
  230. <ListBoxItem.Style>
  231. <Style TargetType="ListBoxItem"
  232. BasedOn="{StaticResource MaterialDesign3.NavigationBarPrimaryListBoxItem}">
  233. <Setter Property="materialDesign:NavigationBarAssist.SelectedIcon"
  234. Value="Circle" />
  235. <Setter Property="materialDesign:NavigationBarAssist.UnselectedIcon"
  236. Value="CircleOutline" />
  237. </Style>
  238. </ListBoxItem.Style>
  239. <TextBlock Text="下相机二次定位点位" />
  240. </ListBoxItem>
  241. <!--锁附拍照点位-->
  242. <ListBoxItem>
  243. <ListBoxItem.Style>
  244. <Style TargetType="ListBoxItem"
  245. BasedOn="{StaticResource MaterialDesign3.NavigationBarPrimaryListBoxItem}">
  246. <Setter Property="materialDesign:NavigationBarAssist.SelectedIcon"
  247. Value="Circle" />
  248. <Setter Property="materialDesign:NavigationBarAssist.UnselectedIcon"
  249. Value="CircleOutline" />
  250. </Style>
  251. </ListBoxItem.Style>
  252. <TextBlock Text="产品拍照点位" />
  253. </ListBoxItem>
  254. <!--锁附点位-->
  255. <ListBoxItem>
  256. <ListBoxItem.Style>
  257. <Style TargetType="ListBoxItem"
  258. BasedOn="{StaticResource MaterialDesign3.NavigationBarPrimaryListBoxItem}">
  259. <Setter Property="materialDesign:NavigationBarAssist.SelectedIcon"
  260. Value="Circle" />
  261. <Setter Property="materialDesign:NavigationBarAssist.UnselectedIcon"
  262. Value="CircleOutline" />
  263. </Style>
  264. </ListBoxItem.Style>
  265. <TextBlock Text="产品贴附点位" />
  266. </ListBoxItem>
  267. <!--复检点位-->
  268. <ListBoxItem>
  269. <ListBoxItem.Style>
  270. <Style TargetType="ListBoxItem"
  271. BasedOn="{StaticResource MaterialDesign3.NavigationBarPrimaryListBoxItem}">
  272. <Setter Property="materialDesign:NavigationBarAssist.SelectedIcon"
  273. Value="Circle" />
  274. <Setter Property="materialDesign:NavigationBarAssist.UnselectedIcon"
  275. Value="CircleOutline" />
  276. </Style>
  277. </ListBoxItem.Style>
  278. <TextBlock Text="复检点位" />
  279. </ListBoxItem>
  280. </ListBox>
  281. <!--点位列表操作按钮面板-->
  282. <StackPanel DockPanel.Dock="Bottom"
  283. Orientation="Horizontal">
  284. <Button Content="添加点"
  285. Margin="5,2"
  286. MinWidth="80"
  287. materialDesign:ButtonAssist.CornerRadius="5"
  288. Command="{Binding AddPointCommand}" />
  289. <Button Content="删除点"
  290. Margin="5,2"
  291. MinWidth="80"
  292. materialDesign:ButtonAssist.CornerRadius="5"
  293. Command="{Binding DeletePointCommand}" />
  294. <Button Content="上移"
  295. Margin="5,2"
  296. MinWidth="80"
  297. materialDesign:ButtonAssist.CornerRadius="5"
  298. Command="{Binding MovePointUpCommand}" />
  299. <Button Content="下移"
  300. Margin="5,2"
  301. MinWidth="80"
  302. materialDesign:ButtonAssist.CornerRadius="5"
  303. Command="{Binding MovePointDownCommand}" />
  304. <!--<Button Content="CAD导入点位"
  305. Margin="5,2"
  306. MinWidth="80"
  307. d:Visibility="Visible"
  308. materialDesign:ButtonAssist.CornerRadius="5"
  309. Command="{Binding ImportCadPointCommand}">
  310. <Button.Style>
  311. <Style TargetType="Button"
  312. BasedOn="{StaticResource MaterialDesignRaisedDarkButton}">
  313. <Setter Property="Visibility"
  314. Value="Collapsed" />
  315. <Style.Triggers>
  316. -->
  317. <!-- 当 SelectedIndex == 0 时显示此面板 -->
  318. <!--
  319. <DataTrigger Binding="{Binding SelectedIndex}"
  320. Value="4">
  321. <Setter Property="Visibility"
  322. Value="Visible" />
  323. </DataTrigger>
  324. </Style.Triggers>
  325. </Style>
  326. </Button.Style>
  327. </Button>-->
  328. </StackPanel>
  329. <Border BorderBrush="LightGray"
  330. BorderThickness="1"
  331. Height="1"
  332. DockPanel.Dock="Bottom" />
  333. <DockPanel>
  334. <!--不同点位类型的操作面板-->
  335. <StackPanel DockPanel.Dock="Bottom"
  336. Orientation="Vertical">
  337. <!--取料点位面板-->
  338. <StackPanel x:Name="AutoCorrectPickPointPanel"
  339. Orientation="Vertical"
  340. d:Visibility="Visible">
  341. <StackPanel.Style>
  342. <Style TargetType="StackPanel">
  343. <Setter Property="Visibility"
  344. Value="Collapsed" />
  345. <Style.Triggers>
  346. <!--当 SelectedIndex == 1 时显示此面板-->
  347. <DataTrigger Binding="{Binding SelectedIndex}"
  348. Value="1">
  349. <Setter Property="Visibility"
  350. Value="Visible" />
  351. </DataTrigger>
  352. </Style.Triggers>
  353. </Style>
  354. </StackPanel.Style>
  355. <ScrollViewer HorizontalScrollBarVisibility="Auto"
  356. VerticalScrollBarVisibility="Disabled">
  357. <StackPanel Orientation="Vertical"
  358. HorizontalAlignment="Left">
  359. <ScrollViewer>
  360. <StackPanel Orientation="Horizontal">
  361. <GroupBox Header="托盘1">
  362. <Grid>
  363. <Grid.RowDefinitions>
  364. <RowDefinition Height="auto" />
  365. <RowDefinition Height="auto" />
  366. <RowDefinition Height="auto" />
  367. <RowDefinition Height="auto" />
  368. <RowDefinition Height="auto" />
  369. </Grid.RowDefinitions>
  370. <Grid.ColumnDefinitions>
  371. <ColumnDefinition Width="auto" />
  372. <ColumnDefinition Width="auto" />
  373. <ColumnDefinition Width="auto" />
  374. <ColumnDefinition Width="auto" />
  375. <ColumnDefinition Width="auto" />
  376. <ColumnDefinition Width="auto" />
  377. <ColumnDefinition Width="auto" />
  378. <ColumnDefinition Width="auto" />
  379. </Grid.ColumnDefinitions>
  380. <Grid.Resources>
  381. <Style TargetType="TextBlock">
  382. <Setter Property="HorizontalAlignment"
  383. Value="Center" />
  384. <Setter Property="VerticalAlignment"
  385. Value="Center" />
  386. </Style>
  387. <Style TargetType="TextBox">
  388. <Setter Property="HorizontalAlignment"
  389. Value="Center" />
  390. <Setter Property="VerticalAlignment"
  391. Value="Center" />
  392. <Setter Property="MinWidth"
  393. Value="50" />
  394. </Style>
  395. </Grid.Resources>
  396. <TextBlock Text="X"
  397. Grid.Column="1" />
  398. <TextBlock Text="Y"
  399. Grid.Column="2" />
  400. <TextBlock Text="Z"
  401. Grid.Column="3" />
  402. <TextBlock Text="U"
  403. Grid.Column="4" />
  404. <TextBlock Text="附加轴"
  405. Grid.Column="5" />
  406. <TextBlock Text="点1:"
  407. Grid.Row="1"
  408. Grid.Column="0" />
  409. <TextBlock Text="点2:"
  410. Grid.Row="2"
  411. Grid.Column="0" />
  412. <TextBlock Text="点3:"
  413. Grid.Row="3"
  414. Grid.Column="0" />
  415. <TextBox Text="{Binding Pallet1.P0.X_Position}"
  416. Grid.Row="1"
  417. Grid.Column="1" />
  418. <TextBox Text="{Binding Pallet1.P0.Y_Position}"
  419. Grid.Row="1"
  420. Grid.Column="2" />
  421. <TextBox Text="{Binding Pallet1.P0.Z_Position_Start}"
  422. Grid.Row="1"
  423. Grid.Column="3" />
  424. <TextBox Text="{Binding Pallet1.P0.U_Position}"
  425. Grid.Row="1"
  426. Grid.Column="4" />
  427. <TextBox Text="{Binding Pallet1.P0.Z_Position_Stop}"
  428. Grid.Row="1"
  429. Grid.Column="5" />
  430. <Button Content="示教"
  431. Grid.Row="1"
  432. Grid.Column="6"
  433. Margin="5,0"
  434. Command="{Binding PickTechCommand}"
  435. CommandParameter="1-1" />
  436. <Button Content="移动"
  437. Grid.Row="1"
  438. Grid.Column="7"
  439. Command="{Binding PickMoveCommand}"
  440. CommandParameter="1-1" />
  441. <TextBox Text="{Binding Pallet1.P1.X_Position}"
  442. Grid.Row="2"
  443. Grid.Column="1" />
  444. <TextBox Text="{Binding Pallet1.P1.Y_Position}"
  445. Grid.Row="2"
  446. Grid.Column="2" />
  447. <TextBox Text="{Binding Pallet1.P1.Z_Position_Start}"
  448. Grid.Row="2"
  449. Grid.Column="3" />
  450. <TextBox Text="{Binding Pallet1.P1.U_Position}"
  451. Grid.Row="2"
  452. Grid.Column="4" />
  453. <TextBox Text="{Binding Pallet1.P1.Z_Position_Stop}"
  454. Grid.Row="2"
  455. Grid.Column="5" />
  456. <Button Content="示教"
  457. Grid.Row="2"
  458. Grid.Column="6"
  459. Margin="5,0"
  460. Command="{Binding PickTechCommand}"
  461. CommandParameter="1-2" />
  462. <Button Content="移动"
  463. Grid.Row="2"
  464. Grid.Column="7"
  465. Command="{Binding PickMoveCommand}"
  466. CommandParameter="1-2" />
  467. <TextBox Text="{Binding Pallet1.P2.X_Position}"
  468. Grid.Row="3"
  469. Grid.Column="1" />
  470. <TextBox Text="{Binding Pallet1.P2.Y_Position}"
  471. Grid.Row="3"
  472. Grid.Column="2" />
  473. <TextBox Text="{Binding Pallet1.P2.Z_Position_Start}"
  474. Grid.Row="3"
  475. Grid.Column="3" />
  476. <TextBox Text="{Binding Pallet1.P2.U_Position}"
  477. Grid.Row="3"
  478. Grid.Column="4" />
  479. <TextBox Text="{Binding Pallet1.P2.Z_Position_Stop}"
  480. Grid.Row="3"
  481. Grid.Column="5" />
  482. <Button Content="示教"
  483. Grid.Row="3"
  484. Grid.Column="6"
  485. Margin="5,0"
  486. Command="{Binding PickTechCommand}"
  487. CommandParameter="1-3" />
  488. <Button Content="移动"
  489. Grid.Row="3"
  490. Grid.Column="7"
  491. Command="{Binding PickMoveCommand}"
  492. CommandParameter="1-3" />
  493. <TextBlock Text="行数:"
  494. Grid.Row="4"
  495. Grid.Column="0" />
  496. <TextBox Text="{Binding Pallet1.Row}"
  497. Grid.Row="4"
  498. Grid.Column="1" />
  499. <TextBlock Text="列数:"
  500. Grid.Row="4"
  501. Grid.Column="2" />
  502. <TextBox Text="{Binding Pallet1.Column}"
  503. Grid.Row="4"
  504. Grid.Column="3" />
  505. <Button Content="计算取料点"
  506. Grid.Row="4"
  507. Grid.ColumnSpan="4"
  508. Margin="5,0"
  509. HorizontalAlignment="Left"
  510. Grid.Column="4"
  511. Command="{Binding CalPickPosCommand}"
  512. CommandParameter="1"/>
  513. </Grid>
  514. </GroupBox>
  515. <GroupBox Header="托盘2" Margin="2,0">
  516. <Grid>
  517. <Grid.RowDefinitions>
  518. <RowDefinition Height="auto" />
  519. <RowDefinition Height="auto" />
  520. <RowDefinition Height="auto" />
  521. <RowDefinition Height="auto" />
  522. <RowDefinition Height="auto" />
  523. </Grid.RowDefinitions>
  524. <Grid.ColumnDefinitions>
  525. <ColumnDefinition Width="auto" />
  526. <ColumnDefinition Width="auto" />
  527. <ColumnDefinition Width="auto" />
  528. <ColumnDefinition Width="auto" />
  529. <ColumnDefinition Width="auto" />
  530. <ColumnDefinition Width="auto" />
  531. <ColumnDefinition Width="auto" />
  532. <ColumnDefinition Width="auto" />
  533. </Grid.ColumnDefinitions>
  534. <Grid.Resources>
  535. <Style TargetType="TextBlock">
  536. <Setter Property="HorizontalAlignment"
  537. Value="Center" />
  538. <Setter Property="VerticalAlignment"
  539. Value="Center" />
  540. </Style>
  541. <Style TargetType="TextBox">
  542. <Setter Property="HorizontalAlignment"
  543. Value="Center" />
  544. <Setter Property="VerticalAlignment"
  545. Value="Center" />
  546. <Setter Property="MinWidth"
  547. Value="50" />
  548. </Style>
  549. </Grid.Resources>
  550. <TextBlock Text="X"
  551. Grid.Column="1" />
  552. <TextBlock Text="Y"
  553. Grid.Column="2" />
  554. <TextBlock Text="Z"
  555. Grid.Column="3" />
  556. <TextBlock Text="U"
  557. Grid.Column="4" />
  558. <TextBlock Text="附加轴"
  559. Grid.Column="5" />
  560. <TextBlock Text="点1:"
  561. Grid.Row="1"
  562. Grid.Column="0" />
  563. <TextBlock Text="点2:"
  564. Grid.Row="2"
  565. Grid.Column="0" />
  566. <TextBlock Text="点3:"
  567. Grid.Row="3"
  568. Grid.Column="0" />
  569. <TextBox Text="{Binding Pallet2.P0.X_Position}"
  570. Grid.Row="1"
  571. Grid.Column="1" />
  572. <TextBox Text="{Binding Pallet2.P0.Y_Position}"
  573. Grid.Row="1"
  574. Grid.Column="2" />
  575. <TextBox Text="{Binding Pallet2.P0.Z_Position_Start}"
  576. Grid.Row="1"
  577. Grid.Column="3" />
  578. <TextBox Text="{Binding Pallet2.P0.U_Position}"
  579. Grid.Row="1"
  580. Grid.Column="4" />
  581. <TextBox Text="{Binding Pallet2.P0.Z_Position_Stop}"
  582. Grid.Row="1"
  583. Grid.Column="5" />
  584. <Button Content="示教"
  585. Grid.Row="1"
  586. Grid.Column="6"
  587. Margin="5,0"
  588. Command="{Binding PickTechCommand}"
  589. CommandParameter="2-1" />
  590. <Button Content="移动"
  591. Grid.Row="1"
  592. Grid.Column="7"
  593. Command="{Binding PickMoveCommand}"
  594. CommandParameter="2-1" />
  595. <TextBox Text="{Binding Pallet2.P1.X_Position}"
  596. Grid.Row="2"
  597. Grid.Column="1" />
  598. <TextBox Text="{Binding Pallet2.P1.Y_Position}"
  599. Grid.Row="2"
  600. Grid.Column="2" />
  601. <TextBox Text="{Binding Pallet2.P1.Z_Position_Start}"
  602. Grid.Row="2"
  603. Grid.Column="3" />
  604. <TextBox Text="{Binding Pallet2.P1.U_Position}"
  605. Grid.Row="2"
  606. Grid.Column="4" />
  607. <TextBox Text="{Binding Pallet2.P1.Z_Position_Stop}"
  608. Grid.Row="2"
  609. Grid.Column="5" />
  610. <Button Content="示教"
  611. Grid.Row="2"
  612. Grid.Column="6"
  613. Margin="5,0"
  614. Command="{Binding PickTechCommand}"
  615. CommandParameter="2-2" />
  616. <Button Content="移动"
  617. Grid.Row="2"
  618. Grid.Column="7"
  619. Command="{Binding PickMoveCommand}"
  620. CommandParameter="2-2" />
  621. <TextBox Text="{Binding Pallet2.P2.X_Position}"
  622. Grid.Row="3"
  623. Grid.Column="1" />
  624. <TextBox Text="{Binding Pallet2.P2.Y_Position}"
  625. Grid.Row="3"
  626. Grid.Column="2" />
  627. <TextBox Text="{Binding Pallet2.P2.Z_Position_Start}"
  628. Grid.Row="3"
  629. Grid.Column="3" />
  630. <TextBox Text="{Binding Pallet2.P2.U_Position}"
  631. Grid.Row="3"
  632. Grid.Column="4" />
  633. <TextBox Text="{Binding Pallet2.P2.Z_Position_Stop}"
  634. Grid.Row="3"
  635. Grid.Column="5" />
  636. <Button Content="示教"
  637. Grid.Row="3"
  638. Grid.Column="6"
  639. Margin="5,0"
  640. Command="{Binding PickTechCommand}"
  641. CommandParameter="2-3" />
  642. <Button Content="移动"
  643. Grid.Row="3"
  644. Grid.Column="7"
  645. Command="{Binding PickMoveCommand}"
  646. CommandParameter="2-3" />
  647. <TextBlock Text="行数:"
  648. Grid.Row="4"
  649. Grid.Column="0" />
  650. <TextBox Text="{Binding Pallet2.Row}"
  651. Grid.Row="4"
  652. Grid.Column="1" />
  653. <TextBlock Text="列数:"
  654. Grid.Row="4"
  655. Grid.Column="2" />
  656. <TextBox Text="{Binding Pallet2.Column}"
  657. Grid.Row="4"
  658. Grid.Column="3" />
  659. <Button Content="计算取料点"
  660. Grid.Row="4"
  661. Grid.ColumnSpan="4"
  662. Margin="5,0"
  663. HorizontalAlignment="Left"
  664. Grid.Column="4"
  665. Command="{Binding CalPickPosCommand}"
  666. CommandParameter="2"/>
  667. </Grid>
  668. </GroupBox>
  669. </StackPanel>
  670. </ScrollViewer>
  671. <StackPanel Orientation="Horizontal">
  672. <TextBlock Text="吸真空编号:"
  673. VerticalAlignment="Center" />
  674. <mah:NumericUpDown MinWidth="100"
  675. HorizontalContentAlignment="Center"
  676. VerticalContentAlignment="Center"
  677. Minimum="0"
  678. Maximum="100"
  679. Value="{Binding Inhal,Mode=OneWay}"
  680. Margin="5,0,0,0" />
  681. <Button Content="执行取料"
  682. Margin="10,0,0,0"
  683. materialDesign:ButtonAssist.CornerRadius="5"
  684. Command="{Binding GoPickCommand}" />
  685. </StackPanel>
  686. </StackPanel>
  687. </ScrollViewer>
  688. </StackPanel>
  689. <!--下相机二次定位-->
  690. <StackPanel x:Name="DownCameraRepositionPanel"
  691. Orientation="Vertical"
  692. d:Visibility="Visible">
  693. <StackPanel.Style>
  694. <Style TargetType="StackPanel">
  695. <Setter Property="Visibility"
  696. Value="Collapsed" />
  697. <Style.Triggers>
  698. <!--当 SelectedIndex == 2 时显示此面板-->
  699. <DataTrigger Binding="{Binding SelectedIndex}"
  700. Value="2">
  701. <Setter Property="Visibility"
  702. Value="Visible" />
  703. </DataTrigger>
  704. </Style.Triggers>
  705. </Style>
  706. </StackPanel.Style>
  707. <ScrollViewer HorizontalScrollBarVisibility="Auto"
  708. VerticalScrollBarVisibility="Disabled">
  709. <StackPanel Orientation="Horizontal"
  710. HorizontalAlignment="Left">
  711. <Button Content="执行二次定位"
  712. Margin="10,0,0,0"
  713. materialDesign:ButtonAssist.CornerRadius="5"
  714. Command="{Binding GoRepositionCommand}" />
  715. </StackPanel>
  716. </ScrollViewer>
  717. </StackPanel>
  718. <!--产品拍照-->
  719. <StackPanel Orientation="Vertical"
  720. d:Visibility="Visible">
  721. <StackPanel.Style>
  722. <Style TargetType="StackPanel">
  723. <Setter Property="Visibility"
  724. Value="Collapsed" />
  725. <Style.Triggers>
  726. <!--当 SelectedIndex == 3 时显示此面板-->
  727. <DataTrigger Binding="{Binding SelectedIndex}"
  728. Value="3">
  729. <Setter Property="Visibility"
  730. Value="Visible" />
  731. </DataTrigger>
  732. </Style.Triggers>
  733. </Style>
  734. </StackPanel.Style>
  735. <ScrollViewer HorizontalScrollBarVisibility="Auto"
  736. VerticalScrollBarVisibility="Disabled">
  737. <StackPanel Orientation="Horizontal"
  738. HorizontalAlignment="Left">
  739. <Button Content="执行产品拍照"
  740. Margin="10,0,0,0"
  741. materialDesign:ButtonAssist.CornerRadius="5"
  742. Command="{Binding TakeProductPhotoCommand}" />
  743. </StackPanel>
  744. </ScrollViewer>
  745. </StackPanel>
  746. </StackPanel>
  747. <!--点位表-->
  748. <DataGrid x:Name="dgPoints"
  749. AutoGenerateColumns="False"
  750. CanUserAddRows="False"
  751. CanUserDeleteRows="False"
  752. ColumnWidth="*"
  753. SelectionUnit="FullRow"
  754. SelectionMode="Single"
  755. SelectedItem="{Binding SelectedPointInDataGrid,Mode=TwoWay}"
  756. ItemsSource="{Binding Points}"
  757. HeadersVisibility="Column"
  758. HorizontalScrollBarVisibility="Auto"
  759. ScrollViewer.CanContentScroll="True"
  760. ScrollViewer.HorizontalScrollBarVisibility="Auto"
  761. GridLinesVisibility="All"
  762. VerticalGridLinesBrush="#D0D0D0">
  763. <DataGrid.Resources>
  764. <Style TargetType="DataGridCell">
  765. <Style.Resources>
  766. <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}"
  767. Color="#0078D7" />
  768. </Style.Resources>
  769. <Setter Property="MinHeight"
  770. Value="25" />
  771. <Setter Property="VerticalContentAlignment"
  772. Value="Center" />
  773. <Setter Property="HorizontalContentAlignment"
  774. Value="Center" />
  775. <Setter Property="VerticalAlignment"
  776. Value="Center" />
  777. <Setter Property="TextBlock.TextAlignment"
  778. Value="Center" />
  779. <Setter Property="Padding"
  780. Value="0" />
  781. <Style.Triggers>
  782. <Trigger Property="IsSelected"
  783. Value="True">
  784. <Setter Property="Foreground"
  785. Value="White" />
  786. </Trigger>
  787. </Style.Triggers>
  788. </Style>
  789. <!-- 为 TextBlock 添加默认居中样式 -->
  790. <Style TargetType="TextBlock">
  791. <Setter Property="TextAlignment"
  792. Value="Center" />
  793. <Setter Property="HorizontalAlignment"
  794. Value="Center" />
  795. <Setter Property="VerticalAlignment"
  796. Value="Center" />
  797. </Style>
  798. </DataGrid.Resources>
  799. <DataGrid.Columns>
  800. <DataGridTextColumn Header="{lex:Loc 编号}"
  801. IsReadOnly="True"
  802. MinWidth="60"
  803. Width="Auto"
  804. Binding="{Binding Number, Mode=TwoWay, StringFormat={}{0:F0}}">
  805. </DataGridTextColumn>
  806. <DataGridTextColumn Header="{lex:Loc 标签}"
  807. MinWidth="100"
  808. Width="Auto"
  809. Binding="{Binding Label, Mode=TwoWay}" />
  810. <!--X 坐标-->
  811. <DataGridTemplateColumn Header="X位置"
  812. MinWidth="60"
  813. Width="Auto">
  814. <DataGridTemplateColumn.CellTemplate>
  815. <DataTemplate>
  816. <TextBlock Text="{Binding X_Position, StringFormat={}{0:F3}}"
  817. HorizontalAlignment="Center"
  818. VerticalAlignment="Center" />
  819. </DataTemplate>
  820. </DataGridTemplateColumn.CellTemplate>
  821. <DataGridTemplateColumn.CellEditingTemplate>
  822. <DataTemplate>
  823. <mah:NumericUpDown Value="{Binding X_Position, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  824. Minimum="-9999.000"
  825. Maximum="9999.000"
  826. Interval="0.1"
  827. StringFormat="F3"
  828. HorizontalAlignment="Stretch"
  829. VerticalAlignment="Center"
  830. Margin="0"
  831. Padding="2" />
  832. </DataTemplate>
  833. </DataGridTemplateColumn.CellEditingTemplate>
  834. </DataGridTemplateColumn>
  835. <!--X 速度-->
  836. <DataGridTemplateColumn Header="X速度"
  837. MinWidth="60"
  838. Width="Auto">
  839. <DataGridTemplateColumn.CellTemplate>
  840. <DataTemplate>
  841. <TextBlock Text="{Binding X_Velocity, StringFormat={}{0:F0}}"
  842. HorizontalAlignment="Center"
  843. VerticalAlignment="Center" />
  844. </DataTemplate>
  845. </DataGridTemplateColumn.CellTemplate>
  846. <DataGridTemplateColumn.CellEditingTemplate>
  847. <DataTemplate>
  848. <mah:NumericUpDown Value="{Binding X_Velocity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  849. Minimum="0"
  850. Maximum="9999.000"
  851. Interval="1"
  852. StringFormat="F3"
  853. HorizontalAlignment="Stretch"
  854. VerticalAlignment="Center"
  855. Margin="0"
  856. Padding="2" />
  857. </DataTemplate>
  858. </DataGridTemplateColumn.CellEditingTemplate>
  859. </DataGridTemplateColumn>
  860. <!--Y 坐标-->
  861. <DataGridTemplateColumn Header="Y位置"
  862. MinWidth="60"
  863. Width="Auto">
  864. <DataGridTemplateColumn.CellTemplate>
  865. <DataTemplate>
  866. <TextBlock Text="{Binding Y_Position, StringFormat={}{0:F3}}"
  867. HorizontalAlignment="Center"
  868. VerticalAlignment="Center" />
  869. </DataTemplate>
  870. </DataGridTemplateColumn.CellTemplate>
  871. <DataGridTemplateColumn.CellEditingTemplate>
  872. <DataTemplate>
  873. <mah:NumericUpDown Value="{Binding Y_Position, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  874. Minimum="-9999.000"
  875. Maximum="9999.000"
  876. Interval="0.1"
  877. StringFormat="F3"
  878. HorizontalAlignment="Stretch"
  879. VerticalAlignment="Center"
  880. Margin="0"
  881. Padding="2" />
  882. </DataTemplate>
  883. </DataGridTemplateColumn.CellEditingTemplate>
  884. </DataGridTemplateColumn>
  885. <!--Y 速度-->
  886. <DataGridTemplateColumn Header="Y速度"
  887. MinWidth="60"
  888. Width="Auto">
  889. <DataGridTemplateColumn.CellTemplate>
  890. <DataTemplate>
  891. <TextBlock Text="{Binding Y_Velocity, StringFormat={}{0:F0}}"
  892. HorizontalAlignment="Center"
  893. VerticalAlignment="Center" />
  894. </DataTemplate>
  895. </DataGridTemplateColumn.CellTemplate>
  896. <DataGridTemplateColumn.CellEditingTemplate>
  897. <DataTemplate>
  898. <mah:NumericUpDown Value="{Binding Y_Velocity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  899. Minimum="0"
  900. Maximum="9999.000"
  901. Interval="1"
  902. StringFormat="F3"
  903. HorizontalAlignment="Stretch"
  904. VerticalAlignment="Center"
  905. Margin="0"
  906. Padding="2" />
  907. </DataTemplate>
  908. </DataGridTemplateColumn.CellEditingTemplate>
  909. </DataGridTemplateColumn>
  910. <!--Z 起点坐标-->
  911. <DataGridTemplateColumn Header="Z起点位置"
  912. MinWidth="60"
  913. Width="Auto">
  914. <DataGridTemplateColumn.CellTemplate>
  915. <DataTemplate>
  916. <TextBlock Text="{Binding Z_Position_Start, StringFormat={}{0:F3}}"
  917. HorizontalAlignment="Center"
  918. VerticalAlignment="Center" />
  919. </DataTemplate>
  920. </DataGridTemplateColumn.CellTemplate>
  921. <DataGridTemplateColumn.CellEditingTemplate>
  922. <DataTemplate>
  923. <mah:NumericUpDown Value="{Binding Z_Position_Start, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  924. Minimum="-9999.000"
  925. Maximum="9999.000"
  926. Interval="0.1"
  927. StringFormat="F3"
  928. HorizontalAlignment="Stretch"
  929. VerticalAlignment="Center"
  930. Margin="0"
  931. Padding="2" />
  932. </DataTemplate>
  933. </DataGridTemplateColumn.CellEditingTemplate>
  934. </DataGridTemplateColumn>
  935. <!--Z 起点速度-->
  936. <DataGridTemplateColumn Header="Z起点速度"
  937. MinWidth="60"
  938. Width="Auto">
  939. <DataGridTemplateColumn.CellTemplate>
  940. <DataTemplate>
  941. <TextBlock Text="{Binding Z_Velocity_Start, StringFormat={}{0:F0}}"
  942. HorizontalAlignment="Center"
  943. VerticalAlignment="Center" />
  944. </DataTemplate>
  945. </DataGridTemplateColumn.CellTemplate>
  946. <DataGridTemplateColumn.CellEditingTemplate>
  947. <DataTemplate>
  948. <mah:NumericUpDown Value="{Binding Z_Velocity_Start, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  949. Minimum="0"
  950. Maximum="9999.000"
  951. Interval="1"
  952. StringFormat="F3"
  953. HorizontalAlignment="Stretch"
  954. VerticalAlignment="Center"
  955. Margin="0"
  956. Padding="2" />
  957. </DataTemplate>
  958. </DataGridTemplateColumn.CellEditingTemplate>
  959. </DataGridTemplateColumn>
  960. <!--Z 终点坐标-->
  961. <DataGridTemplateColumn Header="Z终点位置"
  962. MinWidth="60"
  963. Width="Auto">
  964. <DataGridTemplateColumn.CellTemplate>
  965. <DataTemplate>
  966. <TextBlock Text="{Binding Z_Position_Stop, StringFormat={}{0:F3}}"
  967. HorizontalAlignment="Center"
  968. VerticalAlignment="Center" />
  969. </DataTemplate>
  970. </DataGridTemplateColumn.CellTemplate>
  971. <DataGridTemplateColumn.CellEditingTemplate>
  972. <DataTemplate>
  973. <mah:NumericUpDown Value="{Binding Z_Position_Stop, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  974. Minimum="-9999.000"
  975. Maximum="9999.000"
  976. Interval="0.1"
  977. StringFormat="F3"
  978. HorizontalAlignment="Stretch"
  979. VerticalAlignment="Center"
  980. Margin="0"
  981. Padding="2" />
  982. </DataTemplate>
  983. </DataGridTemplateColumn.CellEditingTemplate>
  984. </DataGridTemplateColumn>
  985. <!--Z 终点速度-->
  986. <DataGridTemplateColumn Header="Z终点速度"
  987. MinWidth="60"
  988. Width="Auto">
  989. <DataGridTemplateColumn.CellTemplate>
  990. <DataTemplate>
  991. <TextBlock Text="{Binding Z_Velocity_Stop, StringFormat={}{0:F0}}"
  992. HorizontalAlignment="Center"
  993. VerticalAlignment="Center" />
  994. </DataTemplate>
  995. </DataGridTemplateColumn.CellTemplate>
  996. <DataGridTemplateColumn.CellEditingTemplate>
  997. <DataTemplate>
  998. <mah:NumericUpDown Value="{Binding Z_Velocity_Stop, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  999. Minimum="0"
  1000. Maximum="9999.000"
  1001. Interval="1"
  1002. StringFormat="F3"
  1003. HorizontalAlignment="Stretch"
  1004. VerticalAlignment="Center"
  1005. Margin="0"
  1006. Padding="2" />
  1007. </DataTemplate>
  1008. </DataGridTemplateColumn.CellEditingTemplate>
  1009. </DataGridTemplateColumn>
  1010. <!--U 坐标-->
  1011. <DataGridTemplateColumn Header="U位置"
  1012. MinWidth="60"
  1013. Width="Auto">
  1014. <DataGridTemplateColumn.CellTemplate>
  1015. <DataTemplate>
  1016. <TextBlock Text="{Binding U_Position, StringFormat={}{0:F3}}"
  1017. HorizontalAlignment="Center"
  1018. VerticalAlignment="Center" />
  1019. </DataTemplate>
  1020. </DataGridTemplateColumn.CellTemplate>
  1021. <DataGridTemplateColumn.CellEditingTemplate>
  1022. <DataTemplate>
  1023. <mah:NumericUpDown Value="{Binding U_Position, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  1024. Minimum="-9999.000"
  1025. Maximum="9999.000"
  1026. Interval="0.1"
  1027. StringFormat="F3"
  1028. HorizontalAlignment="Stretch"
  1029. VerticalAlignment="Center"
  1030. Margin="0"
  1031. Padding="2" />
  1032. </DataTemplate>
  1033. </DataGridTemplateColumn.CellEditingTemplate>
  1034. </DataGridTemplateColumn>
  1035. <!--U 速度-->
  1036. <DataGridTemplateColumn Header="U速度"
  1037. MinWidth="60"
  1038. Width="Auto">
  1039. <DataGridTemplateColumn.CellTemplate>
  1040. <DataTemplate>
  1041. <TextBlock Text="{Binding U_Velocity, StringFormat={}{0:F0}}"
  1042. HorizontalAlignment="Center"
  1043. VerticalAlignment="Center" />
  1044. </DataTemplate>
  1045. </DataGridTemplateColumn.CellTemplate>
  1046. <DataGridTemplateColumn.CellEditingTemplate>
  1047. <DataTemplate>
  1048. <mah:NumericUpDown Value="{Binding U_Velocity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  1049. Minimum="0"
  1050. Maximum="9999.000"
  1051. Interval="1"
  1052. StringFormat="F3"
  1053. HorizontalAlignment="Stretch"
  1054. VerticalAlignment="Center"
  1055. Margin="0"
  1056. Padding="2" />
  1057. </DataTemplate>
  1058. </DataGridTemplateColumn.CellEditingTemplate>
  1059. </DataGridTemplateColumn>
  1060. <!--R 坐标-->
  1061. <DataGridTemplateColumn Header="R位置"
  1062. MinWidth="60"
  1063. Width="Auto">
  1064. <DataGridTemplateColumn.CellTemplate>
  1065. <DataTemplate>
  1066. <TextBlock Text="{Binding R_Position, StringFormat={}{0:F3}}"
  1067. HorizontalAlignment="Center"
  1068. VerticalAlignment="Center" />
  1069. </DataTemplate>
  1070. </DataGridTemplateColumn.CellTemplate>
  1071. <DataGridTemplateColumn.CellEditingTemplate>
  1072. <DataTemplate>
  1073. <mah:NumericUpDown Value="{Binding R_Position, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  1074. Minimum="-9999.000"
  1075. Maximum="9999.000"
  1076. Interval="0.1"
  1077. StringFormat="F3"
  1078. HorizontalAlignment="Stretch"
  1079. VerticalAlignment="Center"
  1080. Margin="0"
  1081. Padding="2" />
  1082. </DataTemplate>
  1083. </DataGridTemplateColumn.CellEditingTemplate>
  1084. </DataGridTemplateColumn>
  1085. <!--R 速度-->
  1086. <DataGridTemplateColumn Header="R速度"
  1087. MinWidth="60"
  1088. Width="Auto">
  1089. <DataGridTemplateColumn.CellTemplate>
  1090. <DataTemplate>
  1091. <TextBlock Text="{Binding R_Velocity, StringFormat={}{0:F0}}"
  1092. HorizontalAlignment="Center"
  1093. VerticalAlignment="Center" />
  1094. </DataTemplate>
  1095. </DataGridTemplateColumn.CellTemplate>
  1096. <DataGridTemplateColumn.CellEditingTemplate>
  1097. <DataTemplate>
  1098. <mah:NumericUpDown Value="{Binding R_Velocity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  1099. Minimum="0"
  1100. Maximum="9999.000"
  1101. Interval="1"
  1102. StringFormat="F3"
  1103. HorizontalAlignment="Stretch"
  1104. VerticalAlignment="Center"
  1105. Margin="0"
  1106. Padding="2" />
  1107. </DataTemplate>
  1108. </DataGridTemplateColumn.CellEditingTemplate>
  1109. </DataGridTemplateColumn>
  1110. <!--扭矩-->
  1111. <DataGridTemplateColumn Header="扭矩"
  1112. MinWidth="60"
  1113. Width="Auto">
  1114. <DataGridTemplateColumn.CellTemplate>
  1115. <DataTemplate>
  1116. <TextBlock Text="{Binding Torque, StringFormat={}{0:F3}}"
  1117. HorizontalAlignment="Center"
  1118. VerticalAlignment="Center" />
  1119. </DataTemplate>
  1120. </DataGridTemplateColumn.CellTemplate>
  1121. <DataGridTemplateColumn.CellEditingTemplate>
  1122. <DataTemplate>
  1123. <mah:NumericUpDown Value="{Binding Torque, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  1124. Minimum="-9999.000"
  1125. Maximum="9999.000"
  1126. Interval="0.1"
  1127. StringFormat="F3"
  1128. HorizontalAlignment="Stretch"
  1129. VerticalAlignment="Center"
  1130. Margin="0"
  1131. Padding="2" />
  1132. </DataTemplate>
  1133. </DataGridTemplateColumn.CellEditingTemplate>
  1134. </DataGridTemplateColumn>
  1135. <!--供料器-->
  1136. <!--<DataGridTemplateColumn Header="供料器"
  1137. MinWidth="60"
  1138. Width="Auto">
  1139. <DataGridTemplateColumn.CellTemplate>
  1140. <DataTemplate>
  1141. <TextBlock Text="{Binding Feeder, StringFormat={}{0:F0}}"
  1142. HorizontalAlignment="Center"
  1143. VerticalAlignment="Center" />
  1144. </DataTemplate>
  1145. </DataGridTemplateColumn.CellTemplate>
  1146. <DataGridTemplateColumn.CellEditingTemplate>
  1147. <DataTemplate>
  1148. <mah:NumericUpDown Value="{Binding Feeder, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  1149. Minimum="0"
  1150. Maximum="9999.000"
  1151. Interval="1"
  1152. StringFormat="F0"
  1153. HorizontalAlignment="Stretch"
  1154. VerticalAlignment="Center"
  1155. Margin="0"
  1156. Padding="2" />
  1157. </DataTemplate>
  1158. </DataGridTemplateColumn.CellEditingTemplate>
  1159. </DataGridTemplateColumn>-->
  1160. <!--电批程序号-->
  1161. <!--<DataGridTemplateColumn Header="电批程序号"
  1162. MinWidth="60"
  1163. Width="Auto">
  1164. <DataGridTemplateColumn.CellTemplate>
  1165. <DataTemplate>
  1166. <TextBlock Text="{Binding ScrewProNum, StringFormat={}{0:F0}}"
  1167. HorizontalAlignment="Center"
  1168. VerticalAlignment="Center" />
  1169. </DataTemplate>
  1170. </DataGridTemplateColumn.CellTemplate>
  1171. <DataGridTemplateColumn.CellEditingTemplate>
  1172. <DataTemplate>
  1173. <mah:NumericUpDown Value="{Binding ScrewProNum, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  1174. Minimum="0"
  1175. Maximum="9999.000"
  1176. Interval="1"
  1177. StringFormat="F0"
  1178. HorizontalAlignment="Stretch"
  1179. VerticalAlignment="Center"
  1180. Margin="0"
  1181. Padding="2" />
  1182. </DataTemplate>
  1183. </DataGridTemplateColumn.CellEditingTemplate>
  1184. </DataGridTemplateColumn>-->
  1185. <DataGridTextColumn Header="{lex:Loc 描述}"
  1186. MinWidth="100"
  1187. Width="200"
  1188. Binding="{Binding Description, Mode=TwoWay}" />
  1189. </DataGrid.Columns>
  1190. </DataGrid>
  1191. </DockPanel>
  1192. </DockPanel>
  1193. <GridSplitter Grid.Column="0"
  1194. Grid.Row="0"
  1195. Grid.RowSpan="2"
  1196. Width="2"
  1197. Background="DeepSkyBlue"
  1198. VerticalAlignment="Stretch"
  1199. HorizontalAlignment="Right" />
  1200. <!--运动控制区-->
  1201. <Viewbox Grid.Column="1">
  1202. <Grid>
  1203. <Grid.RowDefinitions>
  1204. <RowDefinition Height="auto" />
  1205. <RowDefinition Height="auto" />
  1206. <RowDefinition Height="auto" />
  1207. <RowDefinition Height="auto" />
  1208. </Grid.RowDefinitions>
  1209. <ToggleButton Grid.ColumnSpan="2"
  1210. HorizontalAlignment="Left"
  1211. VerticalAlignment="Top"
  1212. materialDesign:ToggleButtonAssist.OnContent="{materialDesign:PackIcon Kind=ArrowLeft}"
  1213. Content="{materialDesign:PackIcon Kind=Camera}"
  1214. Style="{StaticResource MaterialDesignActionToggleButton}"
  1215. ToolTip="相机图像"
  1216. Margin="5,0"
  1217. IsChecked="{Binding IsLeftDrawerOpen,ElementName=DrawerHost}" />
  1218. <Grid Grid.Row="0"
  1219. Margin="10"
  1220. HorizontalAlignment="Center">
  1221. <Grid.ColumnDefinitions>
  1222. <ColumnDefinition Width="auto" />
  1223. <ColumnDefinition Width="auto" />
  1224. <ColumnDefinition Width="auto" />
  1225. <ColumnDefinition Width="auto" />
  1226. </Grid.ColumnDefinitions>
  1227. <Grid.RowDefinitions>
  1228. <RowDefinition Height="auto" />
  1229. <RowDefinition Height="auto" />
  1230. <RowDefinition Height="auto" />
  1231. <RowDefinition Height="auto" />
  1232. <RowDefinition Height="auto" />
  1233. <RowDefinition Height="auto" />
  1234. <RowDefinition Height="auto" />
  1235. <RowDefinition Height="auto" />
  1236. </Grid.RowDefinitions>
  1237. <Grid.Resources>
  1238. <Style TargetType="Button"
  1239. BasedOn="{StaticResource MaterialDesignRaisedDarkButton}">
  1240. <Setter Property="Width"
  1241. Value="60" />
  1242. <Setter Property="Height"
  1243. Value="60" />
  1244. <Setter Property="FontSize"
  1245. Value="13" />
  1246. <Setter Property="Padding"
  1247. Value="0" />
  1248. <Setter Property="HorizontalAlignment"
  1249. Value="Center" />
  1250. <Setter Property="VerticalAlignment"
  1251. Value="Center" />
  1252. <Setter Property="Margin"
  1253. Value="2" />
  1254. <Setter Property="materialDesign:ButtonAssist.CornerRadius"
  1255. Value="10" />
  1256. </Style>
  1257. </Grid.Resources>
  1258. <StackPanel Grid.ColumnSpan="4"
  1259. Grid.Row="0"
  1260. Grid.Column="0"
  1261. VerticalAlignment="Center"
  1262. Orientation="Horizontal"
  1263. Margin="30,0,0,0">
  1264. <Button Content="{lex:Loc 上使能}"
  1265. Grid.Row="2"
  1266. materialDesign:ButtonAssist.CornerRadius="10"
  1267. Style="{StaticResource MaterialDesignRaisedDarkButton}"
  1268. Command="{Binding MotorCommand}"
  1269. CommandParameter="True" />
  1270. <Button Content="{lex:Loc 下使能}"
  1271. Grid.Row="3"
  1272. Margin="10"
  1273. materialDesign:ButtonAssist.CornerRadius="10"
  1274. Style="{StaticResource MaterialDesignRaisedDarkButton}"
  1275. Command="{Binding MotorCommand}"
  1276. CommandParameter="False" />
  1277. <Button Content="{lex:Loc 复位错误}"
  1278. Grid.Row="4"
  1279. materialDesign:ButtonAssist.CornerRadius="10"
  1280. Style="{StaticResource MaterialDesignRaisedDarkButton}"
  1281. Command="{Binding ResetCommand}" />
  1282. </StackPanel>
  1283. <Button Grid.Row="2"
  1284. Grid.Column="0"
  1285. Command="{Binding JogCommand}"
  1286. CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=X-}">
  1287. <StackPanel Orientation="Vertical">
  1288. <materialDesign:PackIcon Kind="ArrowLeftBold"
  1289. Width="26"
  1290. Height="26" />
  1291. <TextBlock Text="-X"
  1292. HorizontalAlignment="Center" />
  1293. </StackPanel>
  1294. </Button>
  1295. <Button Grid.Row="2"
  1296. Grid.Column="2"
  1297. Command="{Binding JogCommand}"
  1298. CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=X+}">
  1299. <StackPanel Orientation="Vertical">
  1300. <materialDesign:PackIcon Kind="ArrowRightBold"
  1301. Width="26"
  1302. Height="26" />
  1303. <TextBlock Text="+X"
  1304. HorizontalAlignment="Center" />
  1305. </StackPanel>
  1306. </Button>
  1307. <Button Grid.Row="1"
  1308. Grid.Column="1"
  1309. Command="{Binding JogCommand}"
  1310. CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Y+}">
  1311. <StackPanel Orientation="Vertical">
  1312. <materialDesign:PackIcon Kind="ArrowTopBold"
  1313. Width="26"
  1314. Height="26" />
  1315. <TextBlock Text="+Y"
  1316. HorizontalAlignment="Center" />
  1317. </StackPanel>
  1318. </Button>
  1319. <Button Grid.Row="3"
  1320. Grid.Column="1"
  1321. Command="{Binding JogCommand}"
  1322. CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Y-}">
  1323. <StackPanel Orientation="Vertical">
  1324. <materialDesign:PackIcon Kind="ArrowBottomBold"
  1325. Width="26"
  1326. Height="26" />
  1327. <TextBlock Text="-Y"
  1328. HorizontalAlignment="Center" />
  1329. </StackPanel>
  1330. </Button>
  1331. <Button Grid.Row="1"
  1332. Grid.Column="3"
  1333. Command="{Binding JogCommand}"
  1334. CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Z+}">
  1335. <StackPanel Orientation="Vertical">
  1336. <materialDesign:PackIcon Kind="ArrowTopBold"
  1337. Width="26"
  1338. Height="26" />
  1339. <TextBlock Text="+Z"
  1340. HorizontalAlignment="Center" />
  1341. </StackPanel>
  1342. </Button>
  1343. <Button Grid.Row="3"
  1344. Grid.Column="3"
  1345. Command="{Binding JogCommand}"
  1346. CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=Z-}">
  1347. <StackPanel Orientation="Vertical">
  1348. <materialDesign:PackIcon Kind="ArrowBottomBold"
  1349. Width="26"
  1350. Height="26" />
  1351. <TextBlock Text="-Z"
  1352. HorizontalAlignment="Center" />
  1353. </StackPanel>
  1354. </Button>
  1355. <Button Grid.Row="4"
  1356. Grid.Column="3"
  1357. Command="{Binding JogCommand}"
  1358. CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=U+}">
  1359. <StackPanel Orientation="Vertical">
  1360. <materialDesign:PackIcon Kind="AxisZRotateCounterclockwise"
  1361. Width="26"
  1362. Height="26" />
  1363. <TextBlock Text="+U"
  1364. HorizontalAlignment="Center" />
  1365. </StackPanel>
  1366. </Button>
  1367. <Button Grid.Row="4"
  1368. Grid.Column="0"
  1369. Command="{Binding JogCommand}"
  1370. CommandParameter="{Binding ElementName=txtDistance,Path=Value,Converter={StaticResource JogConverter}, ConverterParameter=U-}">
  1371. <StackPanel Orientation="Vertical">
  1372. <materialDesign:PackIcon Kind="AxisZRotateClockwise"
  1373. Width="26"
  1374. Height="26" />
  1375. <TextBlock Text="-U"
  1376. HorizontalAlignment="Center" />
  1377. </StackPanel>
  1378. </Button>
  1379. <StackPanel Grid.Row="6"
  1380. Grid.ColumnSpan="7"
  1381. Margin="10,0"
  1382. Grid.Column="0"
  1383. VerticalAlignment="Center"
  1384. Orientation="Horizontal">
  1385. <TextBlock Text="{lex:Loc 步进距离}"
  1386. VerticalAlignment="Center" />
  1387. <uControl:myNumericUpDowm x:Name="txtDistance"
  1388. MinWidth="100"
  1389. Interval="0.1"
  1390. Minimum="0"
  1391. Maximum="100"
  1392. StringFormat="{}{0:N3} mm"
  1393. Value="{Binding Distance,Mode=TwoWay}"
  1394. Margin="10,0" />
  1395. </StackPanel>
  1396. <TextBlock Grid.Row="7"
  1397. Grid.ColumnSpan="7"
  1398. Margin="10,0"
  1399. Grid.Column="0"
  1400. VerticalAlignment="Center"
  1401. HorizontalAlignment="Center">
  1402. <TextBlock.Text>
  1403. <MultiBinding StringFormat="{}CurPos X: {0:F3} mm Y: {1:F3} mm Z: {2:F3} mm U: {3:F3} mm">
  1404. <Binding Path="Robot.CurrentPosition.X" />
  1405. <Binding Path="Robot.CurrentPosition.Y" />
  1406. <Binding Path="Robot.CurrentPosition.Z" />
  1407. <Binding Path="Robot.CurrentPosition.U" />
  1408. </MultiBinding>
  1409. </TextBlock.Text>
  1410. </TextBlock>
  1411. </Grid>
  1412. <Grid Grid.Row="1"
  1413. Grid.ColumnSpan="7">
  1414. <Grid.RowDefinitions>
  1415. <RowDefinition Height="auto" />
  1416. <RowDefinition Height="auto" />
  1417. <RowDefinition Height="auto" />
  1418. <RowDefinition Height="auto" />
  1419. </Grid.RowDefinitions>
  1420. <Grid.ColumnDefinitions>
  1421. <ColumnDefinition Width="auto" />
  1422. <ColumnDefinition Width="auto" />
  1423. <ColumnDefinition Width="auto" />
  1424. </Grid.ColumnDefinitions>
  1425. <TextBlock Grid.Row="1"
  1426. Grid.Column="0"
  1427. Text="{lex:Loc 点编号,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
  1428. Margin="10,0"
  1429. VerticalAlignment="Center" />
  1430. <ComboBox x:Name="cmbSelectPoint"
  1431. Grid.Row="2"
  1432. Grid.Column="0"
  1433. MinWidth="80"
  1434. materialDesign:HintAssist.Hint="{lex:Loc 选择点}"
  1435. Margin="10,0"
  1436. ItemsSource="{Binding Points}"
  1437. SelectedItem="{Binding SelectedPointInComboBox,Mode=TwoWay}">
  1438. <ComboBox.ItemTemplate>
  1439. <DataTemplate>
  1440. <StackPanel HorizontalAlignment="Left"
  1441. Orientation="Horizontal">
  1442. <TextBlock Text="{Binding Number,StringFormat={}{0}:}" />
  1443. <TextBlock Text="{Binding Label}" />
  1444. </StackPanel>
  1445. </DataTemplate>
  1446. </ComboBox.ItemTemplate>
  1447. </ComboBox>
  1448. <TextBlock Grid.Row="1"
  1449. Grid.Column="1"
  1450. Text="{lex:Loc 动作指令,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
  1451. Margin="10,0"
  1452. VerticalAlignment="Center" />
  1453. <ComboBox x:Name="cmbSelectMotioncmd"
  1454. Grid.Row="2"
  1455. Grid.Column="1"
  1456. MinWidth="80"
  1457. Margin="10,0"
  1458. materialDesign:HintAssist.Hint="{lex:Loc 动作指令}"
  1459. ItemsSource="{ext:EnumBindingSource EnumType=enums:MotionCommand}"
  1460. SelectedItem="{Binding DataContext.SelectMotionCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
  1461. <Button Grid.Row="2"
  1462. Grid.Column="2"
  1463. Content="{lex:Loc 执行动作}"
  1464. Margin="2.0"
  1465. Command="{Binding DataContext.ExecuteMotion,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}">
  1466. <Button.CommandParameter>
  1467. <MultiBinding Converter="{StaticResource MultiParameterConverter}">
  1468. <Binding ElementName="cmbSelectPoint"
  1469. Path="SelectedItem" />
  1470. <Binding ElementName="cmbSelectMotioncmd"
  1471. Path="SelectedItem" />
  1472. </MultiBinding>
  1473. </Button.CommandParameter>
  1474. </Button>
  1475. <Button Grid.Row="3"
  1476. Grid.Column="0"
  1477. Content="{lex:Loc 示教}"
  1478. Margin="2,0"
  1479. HorizontalAlignment="Right"
  1480. Command="{Binding DataContext.TechPointCommand,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
  1481. </Grid>
  1482. <ItemsControl Grid.Row="2"
  1483. ItemsSource="{Binding AdditionalAxisList}">
  1484. <ItemsControl.ItemTemplate>
  1485. <DataTemplate>
  1486. <Border Padding="6"
  1487. Margin="0,2"
  1488. Background="{DynamicResource MaterialDesignPaper}">
  1489. <DockPanel LastChildFill="False"
  1490. VerticalAlignment="Center">
  1491. <StackPanel Orientation="Horizontal"
  1492. DockPanel.Dock="Left"
  1493. VerticalAlignment="Center">
  1494. <TextBlock Text="{Binding Name}"
  1495. Width="140"
  1496. VerticalAlignment="Center" />
  1497. <TextBlock Text="{Binding CurrentPosition, StringFormat='{}{0:F3} mm'}"
  1498. Width="140"
  1499. Margin="10,0"
  1500. VerticalAlignment="Center" />
  1501. </StackPanel>
  1502. <StackPanel Orientation="Horizontal"
  1503. HorizontalAlignment="Right"
  1504. DockPanel.Dock="Right">
  1505. <Button Width="60"
  1506. Height="36"
  1507. Margin="6,0"
  1508. Style="{StaticResource MaterialDesignRaisedDarkButton}"
  1509. Command="{Binding DataContext.AdditionalAxisJogMinusCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
  1510. CommandParameter="{Binding}">
  1511. <StackPanel Orientation="Vertical">
  1512. <materialDesign:PackIcon Kind="ArrowLeftBold"
  1513. Width="26"
  1514. Height="26" />
  1515. <TextBlock Text="-"
  1516. HorizontalAlignment="Center" />
  1517. </StackPanel>
  1518. </Button>
  1519. <Button Width="60"
  1520. Height="36"
  1521. Margin="6,0"
  1522. Style="{StaticResource MaterialDesignRaisedDarkButton}"
  1523. Command="{Binding DataContext.AdditionalAxisJogPlusCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
  1524. CommandParameter="{Binding}">
  1525. <StackPanel Orientation="Vertical">
  1526. <materialDesign:PackIcon Kind="ArrowRightBold"
  1527. Width="26"
  1528. Height="26" />
  1529. <TextBlock Text="+"
  1530. HorizontalAlignment="Center" />
  1531. </StackPanel>
  1532. </Button>
  1533. <Button Content="上使能"
  1534. Width="60"
  1535. Height="36"
  1536. Margin="6,0"
  1537. Style="{StaticResource MaterialDesignRaisedDarkButton}"
  1538. Command="{Binding DataContext.AdditionalAxisMotorOnCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
  1539. CommandParameter="{Binding}" />
  1540. <Button Content="下使能"
  1541. Width="60"
  1542. Height="36"
  1543. Margin="6,0"
  1544. Style="{StaticResource MaterialDesignRaisedDarkButton}"
  1545. Command="{Binding DataContext.AdditionalAxisMotorOffCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
  1546. CommandParameter="{Binding}" />
  1547. </StackPanel>
  1548. </DockPanel>
  1549. </Border>
  1550. </DataTemplate>
  1551. </ItemsControl.ItemTemplate>
  1552. </ItemsControl>
  1553. </Grid>
  1554. </Viewbox>
  1555. </Grid>
  1556. </Grid>
  1557. </materialDesign:DrawerHost>
  1558. <StackPanel Grid.Row="2"
  1559. Orientation="Horizontal"
  1560. HorizontalAlignment="Center"
  1561. VerticalAlignment="Center"
  1562. Margin="20">
  1563. <Button Content="{lex:Loc 下一步}"
  1564. IsEnabled="{Binding IsAllowEdit}"
  1565. MinWidth="100"
  1566. HorizontalAlignment="Center"
  1567. VerticalAlignment="Center"
  1568. materialDesign:ButtonAssist.CornerRadius="10"
  1569. Style="{StaticResource MaterialDesignRaisedButton}"
  1570. Command="{Binding NextCommand}" />
  1571. </StackPanel>
  1572. </Grid>
  1573. </UserControl>