ProductHome.xaml 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  1. <UserControl x:Class="TeamAAS_VP.Views.Product.ProductHome"
  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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  6. xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  7. xmlns:local="clr-namespace:TeamAAS_VP.Models"
  8. xmlns:localview="clr-namespace:TeamAAS_VP.Views.Product"
  9. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  10. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  11. xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Product"
  12. xmlns:lex="http://wpflocalizeextension.codeplex.com"
  13. lex:LocalizeDictionary.DesignCulture="zh-CN"
  14. lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
  15. lex:ResxLocalizationProvider.DefaultDictionary="Lang"
  16. prism:ViewModelLocator.AutoWireViewModel="True"
  17. mc:Ignorable="d"
  18. d:DataContext="{d:DesignInstance Type=vm:ProductHomeViewModel}"
  19. d:Height="600"
  20. d:Width="1024"
  21. d:Background="White"
  22. FontFamily="{DynamicResource DefaultFont}">
  23. <b:Interaction.Triggers>
  24. <b:EventTrigger EventName="Loaded">
  25. <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
  26. </b:EventTrigger>
  27. </b:Interaction.Triggers>
  28. <DockPanel LastChildFill="True">
  29. <!--列表-->
  30. <Border DockPanel.Dock="Left"
  31. Width="220"
  32. CornerRadius="0,10,10,0">
  33. <Border.Background>
  34. <LinearGradientBrush>
  35. <GradientStop Color="#787878"
  36. Offset="0" />
  37. <GradientStop Color="Transparent"
  38. Offset="1" />
  39. </LinearGradientBrush>
  40. </Border.Background>
  41. <Grid>
  42. <Grid.RowDefinitions>
  43. <RowDefinition Height="Auto" />
  44. <RowDefinition Height="*" />
  45. </Grid.RowDefinitions>
  46. <!--头部-->
  47. <Grid Grid.Row="0">
  48. <Grid>
  49. <Grid.ColumnDefinitions>
  50. <ColumnDefinition Width="*" />
  51. <ColumnDefinition Width="Auto" />
  52. <ColumnDefinition Width="Auto" />
  53. <ColumnDefinition Width="Auto" />
  54. <ColumnDefinition Width="Auto" />
  55. </Grid.ColumnDefinitions>
  56. <StackPanel Grid.Column="0"
  57. Margin="10,10,0,0"
  58. Orientation="Horizontal">
  59. <materialDesign:PackIcon Kind="FormatListBulleted"
  60. VerticalAlignment="Top" />
  61. <TextBlock Text="{lex:Loc 产品列表}"
  62. Margin="10,0,0,0"
  63. FontSize="12"
  64. VerticalAlignment="Top"
  65. TextAlignment="Center" />
  66. </StackPanel>
  67. <Button Height="35"
  68. Width="35"
  69. IsEnabled="{Binding IsAllowEdit}"
  70. Grid.Column="1"
  71. Style="{StaticResource MaterialDesignIconButton}"
  72. Command="{Binding CreateCommand}">
  73. <StackPanel Orientation="Vertical">
  74. <materialDesign:PackIcon Kind="PlusCircle" />
  75. <TextBlock Text="{lex:Loc 增加}"
  76. FontSize="8"
  77. Foreground="Black"
  78. HorizontalAlignment="Center"
  79. TextTrimming="CharacterEllipsis" />
  80. </StackPanel>
  81. </Button>
  82. <Button Height="35"
  83. Width="35"
  84. IsEnabled="{Binding IsAllowEdit}"
  85. Grid.Column="2"
  86. Style="{StaticResource MaterialDesignIconButton}"
  87. Command="{Binding RemoveCommand}"
  88. CommandParameter="{Binding ElementName=ModelsListBox,Path=SelectedItem}">
  89. <StackPanel Orientation="Vertical">
  90. <materialDesign:PackIcon Kind="DeleteForever" />
  91. <TextBlock Text="{lex:Loc 移除}"
  92. FontSize="8"
  93. Foreground="Black"
  94. HorizontalAlignment="Center"
  95. TextTrimming="CharacterEllipsis" />
  96. </StackPanel>
  97. </Button>
  98. <materialDesign:PopupBox IsEnabled="{Binding IsAllowEdit}"
  99. Grid.Column="3">
  100. <StackPanel Margin="5">
  101. <Button Command="{Binding CopyCommand}"
  102. CommandParameter="{Binding ElementName=ModelsListBox,Path=SelectedItem}">
  103. <Button.Content>
  104. <StackPanel Orientation="Horizontal">
  105. <materialDesign:PackIcon Kind="ContentCopy" />
  106. <TextBlock Text="{lex:Loc 复制}"
  107. Margin="3,0"
  108. VerticalAlignment="Center" />
  109. </StackPanel>
  110. </Button.Content>
  111. </Button>
  112. <Button Command="{Binding EditNameCommand}"
  113. CommandParameter="{Binding ElementName=ModelsListBox,Path=SelectedItem}">
  114. <Button.Content>
  115. <StackPanel Orientation="Horizontal">
  116. <materialDesign:PackIcon Kind="Rename" />
  117. <TextBlock Text="{lex:Loc 修改名称}"
  118. Margin="3,0"
  119. VerticalAlignment="Center" />
  120. </StackPanel>
  121. </Button.Content>
  122. </Button>
  123. <Button Command="{Binding SaveCommand}"
  124. CommandParameter="{Binding ElementName=ModelsListBox,Path=SelectedItem}">
  125. <Button.Content>
  126. <StackPanel Orientation="Horizontal">
  127. <materialDesign:PackIcon Kind="ContentSave" />
  128. <TextBlock Text="{lex:Loc 保存}"
  129. Margin="3,0"
  130. VerticalAlignment="Center" />
  131. </StackPanel>
  132. </Button.Content>
  133. </Button>
  134. <Button Command="{Binding SaveTemplateCommand}"
  135. CommandParameter="{Binding ElementName=ModelsListBox,Path=SelectedItem}">
  136. <Button.Content>
  137. <StackPanel Orientation="Horizontal">
  138. <materialDesign:PackIcon Kind="ContentSaveSettingsOutline" />
  139. <TextBlock Text="{lex:Loc 保存成模板}"
  140. Margin="3,0"
  141. VerticalAlignment="Center" />
  142. </StackPanel>
  143. </Button.Content>
  144. </Button>
  145. </StackPanel>
  146. </materialDesign:PopupBox>
  147. </Grid>
  148. </Grid>
  149. <!--产品列表-->
  150. <ListBox x:Name="ModelsListBox"
  151. Grid.Row="1"
  152. Background="Transparent"
  153. ItemsSource="{Binding Products}"
  154. SelectedItem="{Binding SelectProduct}"
  155. BorderBrush="White"
  156. BorderThickness="1"
  157. Margin="2,2,2,10">
  158. <b:Interaction.Triggers>
  159. <b:EventTrigger EventName="SelectionChanged">
  160. <b:InvokeCommandAction Command="{Binding ProductSelectionChangedCommand}"
  161. CommandParameter="{Binding ElementName=ModelsListBox,Path=SelectedItem}" />
  162. </b:EventTrigger>
  163. </b:Interaction.Triggers>
  164. <ListBox.ItemContainerStyle>
  165. <Style TargetType="ListBoxItem">
  166. <Setter Property="Background"
  167. Value="Transparent" />
  168. </Style>
  169. </ListBox.ItemContainerStyle>
  170. <ListBox.ItemTemplate>
  171. <DataTemplate>
  172. <Border x:Name="itemBorder"
  173. BorderThickness="1"
  174. CornerRadius="8"
  175. Opacity="1"
  176. BorderBrush="#CCCCCC"
  177. Tag="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=localview:ProductHome}, Path=DataContext}">
  178. <StackPanel Orientation="Vertical"
  179. HorizontalAlignment="Stretch"
  180. Background="Transparent"
  181. Width="200"
  182. Margin="5">
  183. <StackPanel Orientation="Horizontal">
  184. <materialDesign:PackIcon Kind="CubeOutline">
  185. <materialDesign:PackIcon.Style>
  186. <Style TargetType="materialDesign:PackIcon">
  187. <Style.Triggers>
  188. <DataTrigger Binding="{Binding IsLoad}"
  189. Value="True">
  190. <Setter Property="Foreground"
  191. Value="Green" />
  192. <Setter Property="Width"
  193. Value="26" />
  194. <Setter Property="Height"
  195. Value="26" />
  196. </DataTrigger>
  197. <DataTrigger Binding="{Binding IsLoad}"
  198. Value="False">
  199. <Setter Property="Foreground"
  200. Value="Black" />
  201. <Setter Property="Width"
  202. Value="20" />
  203. <Setter Property="Height"
  204. Value="20" />
  205. </DataTrigger>
  206. </Style.Triggers>
  207. </Style>
  208. </materialDesign:PackIcon.Style>
  209. </materialDesign:PackIcon>
  210. <TextBlock Text="{Binding Name}"
  211. FontSize="12"
  212. FontWeight="Bold"
  213. VerticalAlignment="Center"
  214. Margin="5,1"
  215. TextWrapping="Wrap" />
  216. </StackPanel>
  217. <TextBlock Text="{Binding NumberCode}"
  218. FontSize="12"
  219. VerticalAlignment="Center"
  220. Margin="5,1"
  221. TextWrapping="Wrap" />
  222. <TextBlock Text="{Binding Description}"
  223. FontSize="10"
  224. Foreground="#2c2c2c"
  225. Margin="5,5"
  226. TextWrapping="Wrap"
  227. TextTrimming="CharacterEllipsis" />
  228. </StackPanel>
  229. <Border.ContextMenu>
  230. <ContextMenu DataContext="{Binding RelativeSource={RelativeSource Self}, Path=PlacementTarget.Tag}">
  231. <MenuItem Header="{lex:Loc 新建}"
  232. Command="{Binding CreateCommand}"
  233. Icon="{materialDesign:PackIcon Kind=CreateNewFolderOutline}" />
  234. <MenuItem Header="{lex:Loc 移除}"
  235. Command="{Binding RemoveCommand}"
  236. CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}, Path=PlacementTarget.DataContext}"
  237. Icon="{materialDesign:PackIcon Kind=Remove}" />
  238. <Separator />
  239. <MenuItem Header="{lex:Loc 编辑}"
  240. Command="{Binding EditCommand}"
  241. CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}, Path=PlacementTarget.DataContext}"
  242. Icon="{materialDesign:PackIcon Kind=Edit}" />
  243. <MenuItem Header="{lex:Loc 复制}"
  244. Command="{Binding CopyCommand}"
  245. CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}, Path=PlacementTarget.DataContext}"
  246. Icon="{materialDesign:PackIcon Kind=ContentCopy}" />
  247. <Separator />
  248. <MenuItem Header="{lex:Loc 修改名称}"
  249. Command="{Binding EditNameCommand}"
  250. CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}, Path=PlacementTarget.DataContext}"
  251. Icon="{materialDesign:PackIcon Kind=Rename}" />
  252. <MenuItem Header="{lex:Loc 保存}"
  253. Command="{Binding SaveCommand}"
  254. CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}, Path=PlacementTarget.DataContext}"
  255. Icon="{materialDesign:PackIcon Kind=ContentSave}" />
  256. <MenuItem Header="{lex:Loc 保存成模板}"
  257. Command="{Binding SaveTemplateCommand}"
  258. CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}, Path=PlacementTarget.DataContext}"
  259. Icon="{materialDesign:PackIcon Kind=ContentSaveSettingsOutline}" />
  260. </ContextMenu>
  261. </Border.ContextMenu>
  262. </Border>
  263. <DataTemplate.Triggers>
  264. <Trigger SourceName="itemBorder"
  265. Property="IsMouseOver"
  266. Value="True">
  267. <Setter TargetName="itemBorder"
  268. Property="Background"
  269. Value="#3DB8B8" />
  270. </Trigger>
  271. </DataTemplate.Triggers>
  272. </DataTemplate>
  273. </ListBox.ItemTemplate>
  274. <ListBox.ContextMenu>
  275. <ContextMenu>
  276. <MenuItem Header="{lex:Loc 新建}"
  277. Command="{Binding CreateCommand}"
  278. Icon="{materialDesign:PackIcon Kind=CreateNewFolderOutline}" />
  279. </ContextMenu>
  280. </ListBox.ContextMenu>
  281. </ListBox>
  282. </Grid>
  283. </Border>
  284. <!--内容-->
  285. <Grid Visibility="{Binding SelectProduct,Converter={StaticResource ObjectToVisibilityConverter}}">
  286. <Grid.RowDefinitions>
  287. <RowDefinition Height="*" />
  288. <RowDefinition Height="auto" />
  289. </Grid.RowDefinitions>
  290. <ScrollViewer VerticalScrollBarVisibility="Auto"
  291. HorizontalScrollBarVisibility="Auto"
  292. HorizontalAlignment="Stretch"
  293. VerticalAlignment="Center">
  294. <StackPanel Orientation="Vertical"
  295. HorizontalAlignment="Center"
  296. Margin="20">
  297. <TextBlock>
  298. <TextBlock.Text>
  299. <MultiBinding StringFormat="{}{0}: {1}">
  300. <lex:BLoc Key="产品名称" />
  301. <Binding Path="SelectProduct.Name" />
  302. </MultiBinding>
  303. </TextBlock.Text>
  304. </TextBlock>
  305. <TextBlock>
  306. <TextBlock.Text>
  307. <MultiBinding StringFormat="{}{0}: {1}">
  308. <lex:BLoc Key="产品编号" />
  309. <Binding Path="SelectProduct.NumberCode" />
  310. </MultiBinding>
  311. </TextBlock.Text>
  312. </TextBlock>
  313. <TextBlock>
  314. <TextBlock.Text>
  315. <MultiBinding StringFormat="{}{0}: {1}">
  316. <lex:BLoc Key="产品描述" />
  317. <Binding Path="SelectProduct.Description" />
  318. </MultiBinding>
  319. </TextBlock.Text>
  320. </TextBlock>
  321. <TextBlock>
  322. <TextBlock.Text>
  323. <MultiBinding StringFormat="{}{0}: {1:yyyy-MM-dd HH:mm:ss}">
  324. <lex:BLoc Key="最后修改时间" />
  325. <Binding Path="SelectProduct.DateTime" />
  326. </MultiBinding>
  327. </TextBlock.Text>
  328. </TextBlock>
  329. <TreeView MinWidth="220"
  330. ItemsSource="{Binding SelectProduct.CameraProcedures}">
  331. <TreeView.ItemTemplate>
  332. <HierarchicalDataTemplate ItemsSource="{Binding ProcedureModels}"
  333. DataType="{x:Type local:ProcedureModel}">
  334. <HierarchicalDataTemplate.ItemTemplate>
  335. <HierarchicalDataTemplate>
  336. <StackPanel Orientation="Vertical">
  337. <TextBlock>
  338. <TextBlock.Text>
  339. <MultiBinding StringFormat="{}{0}: {1}">
  340. <lex:BLoc Key="流程名称" />
  341. <Binding Path="Name" />
  342. </MultiBinding>
  343. </TextBlock.Text>
  344. </TextBlock>
  345. <TextBlock>
  346. <TextBlock.Text>
  347. <MultiBinding StringFormat="{}{0}: {1}">
  348. <lex:BLoc Key="视觉模式" />
  349. <Binding Path="VisionModel" />
  350. </MultiBinding>
  351. </TextBlock.Text>
  352. </TextBlock>
  353. <TextBlock>
  354. <TextBlock.Text>
  355. <MultiBinding StringFormat="{}{0}: {1}">
  356. <lex:BLoc Key="机器人" />
  357. <Binding Path="RobotId" />
  358. </MultiBinding>
  359. </TextBlock.Text>
  360. </TextBlock>
  361. <TextBlock Text="{Binding FeederId,StringFormat=Feeder:{0}}" />
  362. <TextBlock>
  363. <TextBlock.Text>
  364. <MultiBinding StringFormat="{}{0}: {1}">
  365. <lex:BLoc Key="相机" />
  366. <Binding Path="CameraId" />
  367. </MultiBinding>
  368. </TextBlock.Text>
  369. </TextBlock>
  370. <TextBlock>
  371. <TextBlock.Text>
  372. <MultiBinding StringFormat="{}{0}: {1}">
  373. <lex:BLoc Key="校准" />
  374. <Binding Path="CalibrationId" />
  375. </MultiBinding>
  376. </TextBlock.Text>
  377. </TextBlock>
  378. <TextBlock>
  379. <TextBlock.Text>
  380. <MultiBinding StringFormat="{}{0}: {1}us">
  381. <lex:BLoc Key="相机曝光时间" />
  382. <Binding Path="ExposureTime" />
  383. </MultiBinding>
  384. </TextBlock.Text>
  385. </TextBlock>
  386. <TextBlock>
  387. <TextBlock.Text>
  388. <MultiBinding StringFormat="{}{0}: {1}">
  389. <lex:BLoc Key="相机增益" />
  390. <Binding Path="Gain" />
  391. </MultiBinding>
  392. </TextBlock.Text>
  393. </TextBlock>
  394. <TextBlock>
  395. <TextBlock.Text>
  396. <MultiBinding StringFormat="{}{0}: {1}">
  397. <lex:BLoc Key="光源亮度" />
  398. <Binding Path="LightValue" />
  399. </MultiBinding>
  400. </TextBlock.Text>
  401. </TextBlock>
  402. <TextBlock>
  403. <TextBlock.Text>
  404. <MultiBinding StringFormat="{}{0}: {1}">
  405. <lex:BLoc Key="触发指令" />
  406. <Binding Path="TriggerCommand" />
  407. </MultiBinding>
  408. </TextBlock.Text>
  409. </TextBlock>
  410. <TextBlock>
  411. <TextBlock.Text>
  412. <MultiBinding StringFormat="{}{0}: {1}">
  413. <lex:BLoc Key="Feeder振动动作个数" />
  414. <Binding Path="FeederWorks.Count" />
  415. </MultiBinding>
  416. </TextBlock.Text>
  417. </TextBlock>
  418. <TextBlock>
  419. <TextBlock.Text>
  420. <MultiBinding StringFormat="{}{0}: {1}">
  421. <lex:BLoc Key="Feeder料仓供料动作个数" />
  422. <Binding Path="FeederStockWorks.FeederStockWorkList.Count" />
  423. </MultiBinding>
  424. </TextBlock.Text>
  425. </TextBlock>
  426. <TextBlock>
  427. <TextBlock.Text>
  428. <MultiBinding StringFormat="{}{0}: {1}">
  429. <lex:BLoc Key="Feeder供料动作个数" />
  430. <Binding Path="FeederStockWorks.FeederWorkList.Count" />
  431. </MultiBinding>
  432. </TextBlock.Text>
  433. </TextBlock>
  434. <TextBlock>
  435. <TextBlock.Text>
  436. <MultiBinding StringFormat="{}{0}: {1}">
  437. <lex:BLoc Key="供料的Blob最小面积" />
  438. <Binding Path="MinArea" />
  439. </MultiBinding>
  440. </TextBlock.Text>
  441. </TextBlock>
  442. <TextBlock>
  443. <TextBlock.Text>
  444. <MultiBinding StringFormat="{}{0}: {1}">
  445. <lex:BLoc Key="末端执行器个数" />
  446. <Binding Path="ToolInfo.Count" />
  447. </MultiBinding>
  448. </TextBlock.Text>
  449. </TextBlock>
  450. <TextBlock>
  451. <TextBlock.Text>
  452. <MultiBinding StringFormat="{}{0}: {1}ms">
  453. <lex:BLoc Key="延时拍照" />
  454. <Binding Path="WaitPhoto" />
  455. </MultiBinding>
  456. </TextBlock.Text>
  457. </TextBlock>
  458. <TextBlock>
  459. <TextBlock.Text>
  460. <MultiBinding StringFormat="{}{0}: {1}ms">
  461. <lex:BLoc Key="Feeder振动完延时拍照" />
  462. <Binding Path="WaitFeederStop" />
  463. </MultiBinding>
  464. </TextBlock.Text>
  465. </TextBlock>
  466. <TextBlock>
  467. <TextBlock.Text>
  468. <MultiBinding StringFormat="{}{0}: {1}ms">
  469. <lex:BLoc Key="吸真空时长" />
  470. <Binding Path="WaitSuction" />
  471. </MultiBinding>
  472. </TextBlock.Text>
  473. </TextBlock>
  474. <TextBlock>
  475. <TextBlock.Text>
  476. <MultiBinding StringFormat="{}{0}: {1}ms">
  477. <lex:BLoc Key="破真空时长" />
  478. <Binding Path="WaitBlow" />
  479. </MultiBinding>
  480. </TextBlock.Text>
  481. </TextBlock>
  482. <TextBlock>
  483. <TextBlock.Text>
  484. <MultiBinding StringFormat="{}{0}: {1}">
  485. <lex:BLoc Key="视觉引导模式" />
  486. <Binding Path="VibrationModel" />
  487. </MultiBinding>
  488. </TextBlock.Text>
  489. </TextBlock>
  490. <TextBlock>
  491. <TextBlock.Text>
  492. <MultiBinding StringFormat="{}{0}: {1}">
  493. <lex:BLoc Key="Feeder最大振动拍照次数" />
  494. <Binding Path="FeederFailLimit" />
  495. </MultiBinding>
  496. </TextBlock.Text>
  497. </TextBlock>
  498. <TextBlock>
  499. <TextBlock.Text>
  500. <MultiBinding StringFormat="{}{0}: {1}">
  501. <lex:BLoc Key="发送给机器人的最大点位数量" />
  502. <Binding Path="OutputPointCountMax" />
  503. </MultiBinding>
  504. </TextBlock.Text>
  505. </TextBlock>
  506. </StackPanel>
  507. </HierarchicalDataTemplate>
  508. </HierarchicalDataTemplate.ItemTemplate>
  509. <TextBlock Margin="3,2"
  510. Text="{Binding Camera}" />
  511. </HierarchicalDataTemplate>
  512. </TreeView.ItemTemplate>
  513. </TreeView>
  514. <TextBlock>
  515. <TextBlock.Text>
  516. <MultiBinding StringFormat="{}{0}: {1}">
  517. <lex:BLoc Key="点位个数" />
  518. <Binding Path="SelectProduct.RobotPoint.Points.Count" />
  519. </MultiBinding>
  520. </TextBlock.Text>
  521. </TextBlock>
  522. <TextBlock>
  523. <TextBlock.Text>
  524. <MultiBinding StringFormat="{}{0}: {1}">
  525. <lex:BLoc Key="托盘个数" />
  526. <Binding Path="SelectProduct.RobotPoint.Pallets.Count" />
  527. </MultiBinding>
  528. </TextBlock.Text>
  529. </TextBlock>
  530. <Border BorderThickness="1"
  531. Height="1"
  532. BorderBrush="Gray" />
  533. <ListBox ItemsSource="{Binding SelectProduct.RobotPoint.Pallets}">
  534. <ListBox.ItemTemplate>
  535. <DataTemplate>
  536. <StackPanel Orientation="Vertical">
  537. <TextBlock>
  538. <TextBlock.Text>
  539. <MultiBinding StringFormat="{}{0}: {1}">
  540. <lex:BLoc Key="托盘名称" />
  541. <Binding Path="Name" />
  542. </MultiBinding>
  543. </TextBlock.Text>
  544. </TextBlock>
  545. <TextBlock>
  546. <TextBlock.Text>
  547. <MultiBinding StringFormat="{}{0}: {1}">
  548. <lex:BLoc Key="托盘描述" />
  549. <Binding Path="Description" />
  550. </MultiBinding>
  551. </TextBlock.Text>
  552. </TextBlock>
  553. <TextBlock>
  554. <TextBlock.Text>
  555. <MultiBinding StringFormat="{}{0}: {1}">
  556. <lex:BLoc Key="行" />
  557. <Binding Path="Row" />
  558. </MultiBinding>
  559. </TextBlock.Text>
  560. </TextBlock>
  561. <TextBlock>
  562. <TextBlock.Text>
  563. <MultiBinding StringFormat="{}{0}: {1}">
  564. <lex:BLoc Key="列" />
  565. <Binding Path="Column" />
  566. </MultiBinding>
  567. </TextBlock.Text>
  568. </TextBlock>
  569. <TextBlock>
  570. <TextBlock.Text>
  571. <MultiBinding StringFormat="{}{0}: {1}">
  572. <lex:BLoc Key="排列方式" />
  573. <Binding Path="Arrangement" />
  574. </MultiBinding>
  575. </TextBlock.Text>
  576. </TextBlock>
  577. </StackPanel>
  578. </DataTemplate>
  579. </ListBox.ItemTemplate>
  580. </ListBox>
  581. <Border BorderThickness="1"
  582. Height="1"
  583. BorderBrush="Gray" />
  584. <TextBlock Text="{Binding SelectProduct.Speed,StringFormat=Speed: {0}%}" />
  585. <TextBlock Text="{Binding SelectProduct.Accel,StringFormat=Accel: {0}%}" />
  586. <TextBlock Text="{Binding SelectProduct.Speeds,StringFormat=Speeds: {0}mm/s}" />
  587. <TextBlock Text="{Binding SelectProduct.Accels,StringFormat=Accels: {0}mm/s²}" />
  588. <TextBlock Text="{Binding SelectProduct.Power,StringFormat=Power: {0}}" />
  589. <TextBlock>
  590. <TextBlock.Text>
  591. <MultiBinding StringFormat="{}{0}: {1}">
  592. <lex:BLoc Key="全局参数个数" />
  593. <Binding Path="SelectProduct.GlobalParamListCollection.Count" />
  594. </MultiBinding>
  595. </TextBlock.Text>
  596. </TextBlock>
  597. <Border BorderThickness="1"
  598. Height="1"
  599. BorderBrush="Gray" />
  600. <ListBox ItemsSource="{Binding SelectProduct.GlobalParamListCollection}">
  601. <ListBox.ItemTemplate>
  602. <DataTemplate>
  603. <StackPanel Orientation="Vertical">
  604. <TextBlock Text="{Binding Number,StringFormat=Number: {0}}" />
  605. <TextBlock Text="{Binding Name,StringFormat=Name: {0}}" />
  606. <TextBlock Text="{Binding Param1,StringFormat=Param1: {0}}" />
  607. <TextBlock Text="{Binding Param2,StringFormat=Param2: {0}}" />
  608. <TextBlock Text="{Binding Param3,StringFormat=Param3: {0}}" />
  609. <TextBlock Text="{Binding Param4,StringFormat=Param4: {0}}" />
  610. </StackPanel>
  611. </DataTemplate>
  612. </ListBox.ItemTemplate>
  613. </ListBox>
  614. <Border BorderThickness="1"
  615. Height="1"
  616. BorderBrush="Gray" />
  617. </StackPanel>
  618. </ScrollViewer>
  619. <Button Grid.Row="1"
  620. IsEnabled="{Binding IsAllowEdit}"
  621. Margin="5"
  622. HorizontalAlignment="Center"
  623. VerticalAlignment="Center"
  624. Command="{Binding EditCommand}"
  625. CommandParameter="{Binding ElementName=ModelsListBox,Path=SelectedItem}">
  626. <StackPanel Orientation="Horizontal">
  627. <materialDesign:PackIcon Kind="EditBoxOutline" />
  628. <TextBlock Text="{lex:Loc 编辑}" />
  629. </StackPanel>
  630. </Button>
  631. </Grid>
  632. </DockPanel>
  633. </UserControl>