AfagFeederParams.xaml 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687
  1. <UserControl x:Class="TeamAAS_VP.Views.Product.AfagFeederParams"
  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:sys="clr-namespace:System;assembly=mscorlib"
  8. xmlns:enums="clr-namespace:TeamAAS_VP.Enums"
  9. xmlns:ucontrol="clr-namespace:TeamAAS_VP.Controls"
  10. xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
  11. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  12. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  13. xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Product"
  14. xmlns:lex="http://wpflocalizeextension.codeplex.com"
  15. lex:LocalizeDictionary.DesignCulture="zh-CN"
  16. lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
  17. lex:ResxLocalizationProvider.DefaultDictionary="Lang"
  18. prism:ViewModelLocator.AutoWireViewModel="True"
  19. mc:Ignorable="d"
  20. d:DataContext="{d:DesignInstance Type=vm:AfagFeederParamsViewModel}"
  21. d:Height="700"
  22. d:Width="1024"
  23. d:Background="White"
  24. FontFamily="{DynamicResource DefaultFont}">
  25. <b:Interaction.Triggers>
  26. <b:EventTrigger EventName="Loaded">
  27. <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
  28. </b:EventTrigger>
  29. </b:Interaction.Triggers>
  30. <Grid Grid.Row="1">
  31. <Grid.RowDefinitions>
  32. <RowDefinition Height="auto" />
  33. <RowDefinition Height="*" />
  34. <RowDefinition Height="auto" />
  35. </Grid.RowDefinitions>
  36. <Button Grid.Row="0"
  37. Content="{materialDesign:PackIcon Kind=ArrowLeftCircle}"
  38. Width="50"
  39. HorizontalAlignment="Left"
  40. VerticalAlignment="Top"
  41. ToolTip="{lex:Loc 返回}"
  42. Style="{StaticResource MaterialDesignIconButton}"
  43. Command="{Binding BackCommand}" />
  44. <StackPanel Grid.Row="0"
  45. Orientation="Horizontal"
  46. Margin="50,0"
  47. VerticalAlignment="Center">
  48. <materialDesign:PackIcon Kind="CubeOutline"
  49. Width="30"
  50. Height="30" />
  51. <TextBlock Text="{Binding SelectProduct.Name}"
  52. VerticalAlignment="Center" />
  53. <TextBlock Text="{lex:Loc Feeder振动集,Converter={StaticResource StringFormatConverter},ConverterParameter=' - {0}'}"
  54. VerticalAlignment="Center" />
  55. </StackPanel>
  56. <Border BorderThickness="1,1,1,1"
  57. VerticalAlignment="Bottom"
  58. Height="1">
  59. <Border.BorderBrush>
  60. <VisualBrush>
  61. <VisualBrush.Visual>
  62. <Rectangle StrokeDashArray="4 4"
  63. Stroke="LightGray"
  64. StrokeThickness="1"
  65. Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
  66. Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}" />
  67. </VisualBrush.Visual>
  68. </VisualBrush>
  69. </Border.BorderBrush>
  70. </Border>
  71. <Grid Grid.Row="1">
  72. <Grid.ColumnDefinitions>
  73. <ColumnDefinition Width="auto" />
  74. <ColumnDefinition Width="*" />
  75. </Grid.ColumnDefinitions>
  76. <Expander Grid.Column="0"
  77. ExpandDirection="Right"
  78. Background="Transparent">
  79. <Expander.Header>
  80. <TextBlock RenderTransformOrigin=".5,.5"
  81. Text="Navigation Description">
  82. <TextBlock.LayoutTransform>
  83. <RotateTransform Angle="90" />
  84. </TextBlock.LayoutTransform>
  85. </TextBlock>
  86. </Expander.Header>
  87. <ScrollViewer>
  88. <StackPanel Margin="8,24,16,24"
  89. Orientation="Vertical">
  90. <Image Source="pack://application:,,,/TeamAAS-VP;component/Resources/Images/6Feeder任务.png"
  91. Stretch="Uniform"
  92. Width="350"
  93. HorizontalAlignment="Center"
  94. VerticalAlignment="Top" />
  95. <TextBlock Text="{lex:Loc Feeder任务}" />
  96. <TextBlock Foreground="Gray"
  97. TextWrapping="Wrap"
  98. Text="{lex:Loc Feeder任务描述}" />
  99. </StackPanel>
  100. </ScrollViewer>
  101. </Expander>
  102. <Grid Grid.Column="1"
  103. IsEnabled="{Binding IsAllowEdit}">
  104. <Grid.ColumnDefinitions>
  105. <ColumnDefinition Width="auto" />
  106. <ColumnDefinition Width="*" />
  107. </Grid.ColumnDefinitions>
  108. <ucontrol:AflexControl x:Name="uvc"
  109. Grid.Column="0" />
  110. <ScrollViewer Grid.Column="2">
  111. <StackPanel Grid.Column="2"
  112. Background="White"
  113. Orientation="Vertical">
  114. <!--振动盘-->
  115. <Border CornerRadius="10"
  116. BorderThickness="1">
  117. <Border.BorderBrush>
  118. <VisualBrush>
  119. <VisualBrush.Visual>
  120. <Rectangle StrokeDashArray="4 4"
  121. Stroke="Gray"
  122. StrokeThickness="1"
  123. Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
  124. Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}" />
  125. </VisualBrush.Visual>
  126. </VisualBrush>
  127. </Border.BorderBrush>
  128. <!--振动盘-->
  129. <Expander HorizontalAlignment="Stretch"
  130. Background="Transparent"
  131. Margin="2"
  132. materialDesign:ExpanderAssist.ExpanderButtonPosition="Start"
  133. IsExpanded="True">
  134. <Expander.Header>
  135. <TextBlock FontWeight="Bold"
  136. Text="{lex:Loc Feeder动作流程配置}" />
  137. </Expander.Header>
  138. <StackPanel Orientation="Vertical">
  139. <StackPanel Orientation="Horizontal">
  140. <TextBlock Text="{lex:Loc 配置编号,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
  141. VerticalAlignment="Center" />
  142. <ComboBox MinWidth="100"
  143. materialDesign:HintAssist.Hint="{lex:Loc 配置编号}"
  144. materialDesign:HintAssist.HelperText="{lex:Loc 配置编号}"
  145. Margin="5,0"
  146. SelectedIndex="{Binding FunctionIndex,Mode=TwoWay}">
  147. <ComboBoxItem>
  148. <TextBlock Text="Deley"
  149. VerticalAlignment="Center" />
  150. </ComboBoxItem>
  151. <ComboBoxItem>
  152. <TextBlock Text="1|Flip"
  153. VerticalAlignment="Center" />
  154. </ComboBoxItem>
  155. <ComboBoxItem>
  156. <TextBlock Text="2|Move"
  157. VerticalAlignment="Center" />
  158. </ComboBoxItem>
  159. <ComboBoxItem>
  160. <TextBlock Text="3|Flip"
  161. VerticalAlignment="Center" />
  162. </ComboBoxItem>
  163. <ComboBoxItem>
  164. <TextBlock Text="4|Move"
  165. VerticalAlignment="Center" />
  166. </ComboBoxItem>
  167. <ComboBoxItem>
  168. <TextBlock Text="5|"
  169. VerticalAlignment="Center" />
  170. </ComboBoxItem>
  171. <ComboBoxItem>
  172. <TextBlock Text="6|"
  173. VerticalAlignment="Center" />
  174. </ComboBoxItem>
  175. <ComboBoxItem>
  176. <TextBlock Text="7|"
  177. VerticalAlignment="Center" />
  178. </ComboBoxItem>
  179. <ComboBoxItem>
  180. <TextBlock Text="8|"
  181. VerticalAlignment="Center" />
  182. </ComboBoxItem>
  183. <ComboBoxItem>
  184. <TextBlock Text="9|"
  185. VerticalAlignment="Center" />
  186. </ComboBoxItem>
  187. <ComboBoxItem>
  188. <TextBlock Text="10|"
  189. VerticalAlignment="Center" />
  190. </ComboBoxItem>
  191. <ComboBoxItem>
  192. <TextBlock Text="11|"
  193. VerticalAlignment="Center" />
  194. </ComboBoxItem>
  195. <ComboBoxItem>
  196. <TextBlock Text="12|"
  197. VerticalAlignment="Center" />
  198. </ComboBoxItem>
  199. <ComboBoxItem>
  200. <TextBlock Text="13|"
  201. VerticalAlignment="Center" />
  202. </ComboBoxItem>
  203. </ComboBox>
  204. <Button Content="{lex:Loc 添加}"
  205. materialDesign:ButtonAssist.CornerRadius="10"
  206. Command="{Binding AddFunctionCommand}" />
  207. <Button Content="{lex:Loc 移除}"
  208. Margin="5,0"
  209. materialDesign:ButtonAssist.CornerRadius="10"
  210. Command="{Binding RemoveFunctionCommand}"
  211. CommandParameter="{Binding ElementName=lstAction,Path=SelectedIndex}" />
  212. <Button Command="{Binding RunCommandWorks}"
  213. CommandParameter="0"
  214. Margin="5,0"
  215. Style="{StaticResource MaterialDesignIconButton}"
  216. ToolTip="Run">
  217. <materialDesign:PackIcon Kind="Play" />
  218. </Button>
  219. </StackPanel>
  220. <ListView x:Name="lstAction"
  221. ItemsSource="{Binding SelectProcedure.FeederWorks.FeederWorkList}">
  222. <ListView.View>
  223. <GridView>
  224. <GridViewColumn Header="Setp"
  225. DisplayMemberBinding="{Binding Step}" />
  226. <GridViewColumn Header="{lex:Loc 配置}">
  227. <GridViewColumn.CellTemplate>
  228. <DataTemplate>
  229. <ComboBox Width="100"
  230. HorizontalContentAlignment="Center"
  231. SelectedIndex="{Binding ConfigIndex,Mode=TwoWay}"
  232. >
  233. <ComboBoxItem>
  234. <TextBlock Text="Deley"
  235. VerticalAlignment="Center" />
  236. </ComboBoxItem>
  237. <ComboBoxItem>
  238. <TextBlock Text="1|Flip"
  239. VerticalAlignment="Center" />
  240. </ComboBoxItem>
  241. <ComboBoxItem>
  242. <TextBlock Text="2|Move"
  243. VerticalAlignment="Center" />
  244. </ComboBoxItem>
  245. <ComboBoxItem>
  246. <TextBlock Text="3|Flip"
  247. VerticalAlignment="Center" />
  248. </ComboBoxItem>
  249. <ComboBoxItem>
  250. <TextBlock Text="4|Move"
  251. VerticalAlignment="Center" />
  252. </ComboBoxItem>
  253. <ComboBoxItem>
  254. <TextBlock Text="5|"
  255. VerticalAlignment="Center" />
  256. </ComboBoxItem>
  257. <ComboBoxItem>
  258. <TextBlock Text="6|"
  259. VerticalAlignment="Center" />
  260. </ComboBoxItem>
  261. <ComboBoxItem>
  262. <TextBlock Text="7|"
  263. VerticalAlignment="Center" />
  264. </ComboBoxItem>
  265. <ComboBoxItem>
  266. <TextBlock Text="8|"
  267. VerticalAlignment="Center" />
  268. </ComboBoxItem>
  269. <ComboBoxItem>
  270. <TextBlock Text="9|"
  271. VerticalAlignment="Center" />
  272. </ComboBoxItem>
  273. <ComboBoxItem>
  274. <TextBlock Text="10|"
  275. VerticalAlignment="Center" />
  276. </ComboBoxItem>
  277. <ComboBoxItem>
  278. <TextBlock Text="11|"
  279. VerticalAlignment="Center" />
  280. </ComboBoxItem>
  281. <ComboBoxItem>
  282. <TextBlock Text="12|"
  283. VerticalAlignment="Center" />
  284. </ComboBoxItem>
  285. <ComboBoxItem>
  286. <TextBlock Text="13|"
  287. VerticalAlignment="Center" />
  288. </ComboBoxItem>
  289. </ComboBox>
  290. </DataTemplate>
  291. </GridViewColumn.CellTemplate>
  292. </GridViewColumn>
  293. <GridViewColumn Header="{lex:Loc 振动强度}">
  294. <GridViewColumn.CellTemplate>
  295. <DataTemplate>
  296. <mah:NumericUpDown
  297. Style="{StaticResource MahApps.Styles.NumericUpDown.DataGrid.Editing}"
  298. Maximum="100"
  299. Minimum="0"
  300. Interval="0.1"
  301. materialDesign:HintAssist.Hint="{lex:Loc 振动强度}"
  302. StringFormat="{}{0:N1} %"
  303. Value="{Binding Intensity,Mode=TwoWay}" />
  304. </DataTemplate>
  305. </GridViewColumn.CellTemplate>
  306. </GridViewColumn>
  307. <GridViewColumn Header="{lex:Loc 振动方向}">
  308. <GridViewColumn.CellTemplate>
  309. <DataTemplate>
  310. <mah:NumericUpDown
  311. Style="{StaticResource MahApps.Styles.NumericUpDown.DataGrid.Editing}"
  312. Maximum="360"
  313. Minimum="0"
  314. Interval="0.1"
  315. materialDesign:HintAssist.Hint="{lex:Loc 振动方向}"
  316. StringFormat="{}{0:N1} °"
  317. Value="{Binding Direction,Mode=TwoWay}" />
  318. </DataTemplate>
  319. </GridViewColumn.CellTemplate>
  320. </GridViewColumn>
  321. <GridViewColumn Header="{lex:Loc 持续时间,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}(ms)'}">
  322. <GridViewColumn.CellTemplate>
  323. <DataTemplate>
  324. <mah:NumericUpDown Interval="100"
  325. Style="{StaticResource MahApps.Styles.NumericUpDown.DataGrid.Editing}"
  326. Minimum="1"
  327. Maximum="100000"
  328. StringFormat="{}{0:N0} ms"
  329. Value="{Binding Duration,Mode=TwoWay}" />
  330. </DataTemplate>
  331. </GridViewColumn.CellTemplate>
  332. </GridViewColumn>
  333. </GridView>
  334. </ListView.View>
  335. </ListView>
  336. </StackPanel>
  337. </Expander>
  338. </Border>
  339. <!--料仓-->
  340. <Border CornerRadius="10"
  341. BorderThickness="1">
  342. <Border.BorderBrush>
  343. <VisualBrush>
  344. <VisualBrush.Visual>
  345. <Rectangle StrokeDashArray="4 4"
  346. Stroke="Gray"
  347. StrokeThickness="1"
  348. Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
  349. Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}" />
  350. </VisualBrush.Visual>
  351. </VisualBrush>
  352. </Border.BorderBrush>
  353. <!--料仓-->
  354. <Expander HorizontalAlignment="Stretch"
  355. Margin="2"
  356. IsExpanded="True"
  357. Background="Transparent"
  358. materialDesign:ExpanderAssist.ExpanderButtonPosition="Start">
  359. <Expander.Header>
  360. <Grid>
  361. <Grid.ColumnDefinitions>
  362. <ColumnDefinition Width="auto" />
  363. <ColumnDefinition Width="*" />
  364. </Grid.ColumnDefinitions>
  365. <TextBlock Grid.Column="0"
  366. FontWeight="Bold"
  367. VerticalAlignment="Center"
  368. Text="{lex:Loc 料仓出料动作流程配置}" />
  369. <StackPanel Grid.Column="1"
  370. Orientation="Horizontal"
  371. HorizontalAlignment="Right">
  372. <Button Command="{Binding RunCommandWorks}"
  373. CommandParameter="1"
  374. Style="{StaticResource MaterialDesignIconButton}"
  375. ToolTip="Run">
  376. <materialDesign:PackIcon Kind="Play" />
  377. </Button>
  378. <Button Content="{lex:Loc 出料时机设定}"
  379. HorizontalAlignment="Right"
  380. Background="Green"
  381. Command="{Binding SettingStockCommand}"
  382. Margin="2,0" />
  383. </StackPanel>
  384. </Grid>
  385. </Expander.Header>
  386. <StackPanel Orientation="Vertical">
  387. <!--料仓-->
  388. <GroupBox Header="{lex:Loc 料仓任务}">
  389. <StackPanel Orientation="Vertical">
  390. <StackPanel Orientation="Horizontal">
  391. <TextBlock Text="{lex:Loc 寄存器,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
  392. VerticalAlignment="Center" />
  393. <ComboBox MinWidth="100"
  394. materialDesign:HintAssist.Hint="{lex:Loc 寄存器}"
  395. materialDesign:HintAssist.HelperText="{lex:Loc 寄存器}"
  396. Margin="5,0"
  397. SelectedIndex="{Binding RegisterType,Mode=TwoWay}">
  398. <ComboBoxItem>
  399. <TextBlock Text="Deley"
  400. VerticalAlignment="Center" />
  401. </ComboBoxItem>
  402. <ComboBoxItem>
  403. <TextBlock Text="HoldingRegister"
  404. VerticalAlignment="Center" />
  405. </ComboBoxItem>
  406. </ComboBox>
  407. <Button Content="{lex:Loc 添加}"
  408. materialDesign:ButtonAssist.CornerRadius="10"
  409. Command="{Binding AddStockFunctionCommand}" />
  410. <Button Content="{lex:Loc 移除}"
  411. Margin="5,0"
  412. materialDesign:ButtonAssist.CornerRadius="10"
  413. Command="{Binding RemoveStockFunctionCommand}"
  414. CommandParameter="{Binding ElementName=lstStock,Path=SelectedIndex}" />
  415. </StackPanel>
  416. <ListView x:Name="lstStock"
  417. ItemsSource="{Binding SelectProcedure.FeederStockWorks.FeederStockWorkList}">
  418. <ListView.View>
  419. <GridView>
  420. <GridViewColumn DisplayMemberBinding="{Binding Step}"
  421. Header="Setp" />
  422. <GridViewColumn Header="{lex:Loc 寄存器}">
  423. <GridViewColumn.CellTemplate>
  424. <DataTemplate>
  425. <ComboBox MinWidth="100"
  426. materialDesign:HintAssist.Hint="{lex:Loc 功能码}"
  427. materialDesign:HintAssist.HelperText="{lex:Loc 功能码}"
  428. Margin="5,0"
  429. HorizontalContentAlignment="Center"
  430. SelectedIndex="{Binding RegisterIndex,Mode=TwoWay}">
  431. <ComboBoxItem>
  432. <TextBlock Text="Deley"
  433. VerticalAlignment="Center" />
  434. </ComboBoxItem>
  435. <ComboBoxItem>
  436. <TextBlock Text="HoldingRegister"
  437. VerticalAlignment="Center" />
  438. </ComboBoxItem>
  439. </ComboBox>
  440. </DataTemplate>
  441. </GridViewColumn.CellTemplate>
  442. </GridViewColumn>
  443. <GridViewColumn Header="{lex:Loc 地址}">
  444. <GridViewColumn.CellTemplate>
  445. <DataTemplate>
  446. <mah:NumericUpDown Interval="1"
  447. Style="{StaticResource MahApps.Styles.NumericUpDown.DataGrid.Editing}"
  448. Minimum="1"
  449. Maximum="100000"
  450. Value="{Binding Address,Mode=TwoWay}" />
  451. </DataTemplate>
  452. </GridViewColumn.CellTemplate>
  453. </GridViewColumn>
  454. <GridViewColumn Header="{lex:Loc 持续时间,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}(ms)'}">
  455. <GridViewColumn.CellTemplate>
  456. <DataTemplate>
  457. <mah:NumericUpDown Interval="100"
  458. Style="{StaticResource MahApps.Styles.NumericUpDown.DataGrid.Editing}"
  459. Minimum="1"
  460. Maximum="100000"
  461. StringFormat="{}{0:N0} ms"
  462. Value="{Binding Duration,Mode=TwoWay}" />
  463. </DataTemplate>
  464. </GridViewColumn.CellTemplate>
  465. </GridViewColumn>
  466. </GridView>
  467. </ListView.View>
  468. </ListView>
  469. </StackPanel>
  470. </GroupBox>
  471. <GroupBox Header="{lex:Loc Feeder任务}">
  472. <StackPanel Orientation="Vertical">
  473. <StackPanel Orientation="Horizontal">
  474. <TextBlock Text="{lex:Loc 动作,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
  475. VerticalAlignment="Center" />
  476. <ComboBox MinWidth="100"
  477. materialDesign:HintAssist.Hint="{lex:Loc 配置编号}"
  478. materialDesign:HintAssist.HelperText="{lex:Loc 配置编号}"
  479. Margin="5,0"
  480. SelectedIndex="{Binding FunctionIndex1,Mode=TwoWay}">
  481. <ComboBoxItem>
  482. <TextBlock Text="Deley"
  483. VerticalAlignment="Center" />
  484. </ComboBoxItem>
  485. <ComboBoxItem>
  486. <TextBlock Text="1|Flip"
  487. VerticalAlignment="Center" />
  488. </ComboBoxItem>
  489. <ComboBoxItem>
  490. <TextBlock Text="2|Move"
  491. VerticalAlignment="Center" />
  492. </ComboBoxItem>
  493. <ComboBoxItem>
  494. <TextBlock Text="3|Flip"
  495. VerticalAlignment="Center" />
  496. </ComboBoxItem>
  497. <ComboBoxItem>
  498. <TextBlock Text="4|Move"
  499. VerticalAlignment="Center" />
  500. </ComboBoxItem>
  501. <ComboBoxItem>
  502. <TextBlock Text="5|"
  503. VerticalAlignment="Center" />
  504. </ComboBoxItem>
  505. <ComboBoxItem>
  506. <TextBlock Text="6|"
  507. VerticalAlignment="Center" />
  508. </ComboBoxItem>
  509. <ComboBoxItem>
  510. <TextBlock Text="7|"
  511. VerticalAlignment="Center" />
  512. </ComboBoxItem>
  513. <ComboBoxItem>
  514. <TextBlock Text="8|"
  515. VerticalAlignment="Center" />
  516. </ComboBoxItem>
  517. <ComboBoxItem>
  518. <TextBlock Text="9|"
  519. VerticalAlignment="Center" />
  520. </ComboBoxItem>
  521. <ComboBoxItem>
  522. <TextBlock Text="10|"
  523. VerticalAlignment="Center" />
  524. </ComboBoxItem>
  525. <ComboBoxItem>
  526. <TextBlock Text="11|"
  527. VerticalAlignment="Center" />
  528. </ComboBoxItem>
  529. <ComboBoxItem>
  530. <TextBlock Text="12|"
  531. VerticalAlignment="Center" />
  532. </ComboBoxItem>
  533. <ComboBoxItem>
  534. <TextBlock Text="13|"
  535. VerticalAlignment="Center" />
  536. </ComboBoxItem>
  537. </ComboBox>
  538. <Button Content="{lex:Loc 添加}"
  539. materialDesign:ButtonAssist.CornerRadius="10"
  540. Command="{Binding AddStockFeederFunctionCommand}" />
  541. <Button Content="{lex:Loc 移除}"
  542. Margin="5,0"
  543. materialDesign:ButtonAssist.CornerRadius="10"
  544. Command="{Binding RemoveStockFeederFunctionCommand}"
  545. CommandParameter="{Binding ElementName=lstStockFeeder,Path=SelectedIndex}" />
  546. </StackPanel>
  547. <ListView x:Name="lstStockFeeder"
  548. ItemsSource="{Binding SelectProcedure.FeederStockWorks.FeederWorkList}">
  549. <ListView.View>
  550. <GridView>
  551. <GridViewColumn DisplayMemberBinding="{Binding Step}"
  552. Header="Setp" />
  553. <GridViewColumn Header="{lex:Loc 配置}">
  554. <GridViewColumn.CellTemplate>
  555. <DataTemplate>
  556. <ComboBox Width="100"
  557. HorizontalContentAlignment="Center"
  558. SelectedIndex="{Binding ConfigIndex,Mode=TwoWay}">
  559. <ComboBoxItem>
  560. <TextBlock Text="Deley"
  561. VerticalAlignment="Center" />
  562. </ComboBoxItem>
  563. <ComboBoxItem>
  564. <TextBlock Text="1|Flip"
  565. VerticalAlignment="Center" />
  566. </ComboBoxItem>
  567. <ComboBoxItem>
  568. <TextBlock Text="2|Move"
  569. VerticalAlignment="Center" />
  570. </ComboBoxItem>
  571. <ComboBoxItem>
  572. <TextBlock Text="3|Flip"
  573. VerticalAlignment="Center" />
  574. </ComboBoxItem>
  575. <ComboBoxItem>
  576. <TextBlock Text="4|Move"
  577. VerticalAlignment="Center" />
  578. </ComboBoxItem>
  579. <ComboBoxItem>
  580. <TextBlock Text="5|"
  581. VerticalAlignment="Center" />
  582. </ComboBoxItem>
  583. <ComboBoxItem>
  584. <TextBlock Text="6|"
  585. VerticalAlignment="Center" />
  586. </ComboBoxItem>
  587. <ComboBoxItem>
  588. <TextBlock Text="7|"
  589. VerticalAlignment="Center" />
  590. </ComboBoxItem>
  591. <ComboBoxItem>
  592. <TextBlock Text="8|"
  593. VerticalAlignment="Center" />
  594. </ComboBoxItem>
  595. <ComboBoxItem>
  596. <TextBlock Text="9|"
  597. VerticalAlignment="Center" />
  598. </ComboBoxItem>
  599. <ComboBoxItem>
  600. <TextBlock Text="10|"
  601. VerticalAlignment="Center" />
  602. </ComboBoxItem>
  603. <ComboBoxItem>
  604. <TextBlock Text="11|"
  605. VerticalAlignment="Center" />
  606. </ComboBoxItem>
  607. <ComboBoxItem>
  608. <TextBlock Text="12|"
  609. VerticalAlignment="Center" />
  610. </ComboBoxItem>
  611. <ComboBoxItem>
  612. <TextBlock Text="13|"
  613. VerticalAlignment="Center" />
  614. </ComboBoxItem>
  615. </ComboBox>
  616. </DataTemplate>
  617. </GridViewColumn.CellTemplate>
  618. </GridViewColumn>
  619. <GridViewColumn Header="{lex:Loc 振动强度}">
  620. <GridViewColumn.CellTemplate>
  621. <DataTemplate>
  622. <mah:NumericUpDown Style="{StaticResource MahApps.Styles.NumericUpDown.DataGrid.Editing}"
  623. Maximum="100"
  624. Minimum="0"
  625. Interval="0.1"
  626. materialDesign:HintAssist.Hint="振动强度"
  627. StringFormat="{}{0:N1} %"
  628. Value="{Binding Intensity,Mode=TwoWay}" />
  629. </DataTemplate>
  630. </GridViewColumn.CellTemplate>
  631. </GridViewColumn>
  632. <GridViewColumn Header="{lex:Loc 振动方向}">
  633. <GridViewColumn.CellTemplate>
  634. <DataTemplate>
  635. <mah:NumericUpDown Style="{StaticResource MahApps.Styles.NumericUpDown.DataGrid.Editing}"
  636. Maximum="360"
  637. Minimum="0"
  638. Interval="0.1"
  639. materialDesign:HintAssist.Hint="振动方向"
  640. StringFormat="{}{0:N1} °"
  641. Value="{Binding Direction,Mode=TwoWay}" />
  642. </DataTemplate>
  643. </GridViewColumn.CellTemplate>
  644. </GridViewColumn>
  645. <GridViewColumn Header="{lex:Loc 持续时间,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}(ms)'}">
  646. <GridViewColumn.CellTemplate>
  647. <DataTemplate>
  648. <mah:NumericUpDown Interval="100"
  649. Style="{StaticResource MahApps.Styles.NumericUpDown.DataGrid.Editing}"
  650. Minimum="1"
  651. Maximum="100000"
  652. StringFormat="{}{0:N0} ms"
  653. Value="{Binding Duration,Mode=TwoWay}" />
  654. </DataTemplate>
  655. </GridViewColumn.CellTemplate>
  656. </GridViewColumn>
  657. </GridView>
  658. </ListView.View>
  659. </ListView>
  660. </StackPanel>
  661. </GroupBox>
  662. </StackPanel>
  663. </Expander>
  664. </Border>
  665. </StackPanel>
  666. </ScrollViewer>
  667. </Grid>
  668. </Grid>
  669. <StackPanel Grid.Row="2"
  670. Orientation="Horizontal"
  671. HorizontalAlignment="Center"
  672. VerticalAlignment="Center"
  673. Margin="20">
  674. <Button Content="{lex:Loc 下一步}"
  675. IsEnabled="{Binding IsAllowEdit}"
  676. MinWidth="100"
  677. HorizontalAlignment="Center"
  678. VerticalAlignment="Center"
  679. materialDesign:ButtonAssist.CornerRadius="10"
  680. Style="{StaticResource MaterialDesignRaisedButton}"
  681. Command="{Binding NextCommand}" />
  682. </StackPanel>
  683. </Grid>
  684. </UserControl>