终端一体化运控平台
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

FlowProcessView.xaml 39 KiB

2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. <Window x:Class="FryPot_DosingSystem.View.FlowProcessView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:FryPot_DosingSystem.View"
  7. xmlns:vm="clr-namespace:FryPot_DosingSystem.ViewModel"
  8. xmlns:Themes1="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
  9. mc:Ignorable="d"
  10. Title="FlowProcessView" Height="675" Width="1075" WindowStartupLocation="CenterScreen" WindowStyle="None" AllowsTransparency="True">
  11. <Window.DataContext>
  12. <vm:FlowProcessSetViewModel/>
  13. </Window.DataContext>
  14. <Window.Resources>
  15. <!--<ResourceDictionary>
  16. <ResourceDictionary.MergedDictionaries>
  17. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
  18. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
  19. </ResourceDictionary.MergedDictionaries>
  20. </ResourceDictionary>-->
  21. <SolidColorBrush x:Key="foreground" Color="#a2c2e8" />
  22. <SolidColorBrush x:Key="borderBrush" Color="#FF074B92" />
  23. <Style x:Key="ComboBoxFocusVisual">
  24. <Setter Property="Control.Template">
  25. <Setter.Value>
  26. <ControlTemplate>
  27. <Rectangle
  28. Margin="4,4,21,4"
  29. SnapsToDevicePixels="true"
  30. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  31. StrokeDashArray="1 2"
  32. StrokeThickness="1" />
  33. </ControlTemplate>
  34. </Setter.Value>
  35. </Setter>
  36. </Style>
  37. <Geometry x:Key="DownArrowGeometry">M 0 0 L 3.5 4 L 7 0 Z</Geometry>
  38. <Style x:Key="ComboBoxTransparentButtonStyle" TargetType="{x:Type ToggleButton}">
  39. <Setter Property="MinWidth" Value="0" />
  40. <Setter Property="MinHeight" Value="0" />
  41. <Setter Property="Width" Value="Auto" />
  42. <Setter Property="Height" Value="Auto" />
  43. <Setter Property="Background" Value="Transparent" />
  44. <Setter Property="Foreground" Value="White" />
  45. <Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" />
  46. <Setter Property="BorderThickness" Value="2" />
  47. <Setter Property="Template">
  48. <Setter.Value>
  49. <ControlTemplate TargetType="{x:Type ToggleButton}">
  50. <DockPanel
  51. Background="{TemplateBinding Background}"
  52. LastChildFill="false"
  53. SnapsToDevicePixels="true">
  54. <Themes1:ClassicBorderDecorator
  55. x:Name="Border"
  56. Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
  57. BorderBrush="{TemplateBinding BorderBrush}"
  58. BorderStyle="None"
  59. BorderThickness="{TemplateBinding BorderThickness}"
  60. DockPanel.Dock="Right">
  61. <Path
  62. HorizontalAlignment="Center"
  63. VerticalAlignment="Center"
  64. Data="{StaticResource DownArrowGeometry}"
  65. Fill="{TemplateBinding Foreground}" />
  66. </Themes1:ClassicBorderDecorator>
  67. </DockPanel>
  68. <ControlTemplate.Triggers>
  69. <Trigger Property="IsChecked" Value="true">
  70. <Setter TargetName="Border" Property="BorderStyle" Value="AltPressed" />
  71. </Trigger>
  72. </ControlTemplate.Triggers>
  73. </ControlTemplate>
  74. </Setter.Value>
  75. </Setter>
  76. <Style.Triggers>
  77. <Trigger Property="IsEnabled" Value="false">
  78. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
  79. </Trigger>
  80. </Style.Triggers>
  81. </Style>
  82. <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
  83. <Setter Property="OverridesDefaultStyle" Value="true" />
  84. <Setter Property="AllowDrop" Value="true" />
  85. <Setter Property="MinWidth" Value="0" />
  86. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  87. <Setter Property="MinHeight" Value="0" />
  88. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  89. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  90. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  91. <Setter Property="Template">
  92. <Setter.Value>
  93. <ControlTemplate TargetType="{x:Type TextBox}">
  94. <ScrollViewer
  95. x:Name="PART_ContentHost"
  96. Background="Transparent"
  97. Focusable="false"
  98. HorizontalScrollBarVisibility="Hidden"
  99. VerticalScrollBarVisibility="Hidden" />
  100. </ControlTemplate>
  101. </Setter.Value>
  102. </Setter>
  103. </Style>
  104. <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
  105. <Border
  106. Background="{TemplateBinding Background}"
  107. BorderBrush="{TemplateBinding BorderBrush}"
  108. BorderThickness="{TemplateBinding BorderThickness}"
  109. SnapsToDevicePixels="true">
  110. <Grid>
  111. <Themes1:ClassicBorderDecorator
  112. x:Name="Border"
  113. BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}"
  114. BorderStyle="None"
  115. BorderThickness="2">
  116. <Popup
  117. x:Name="PART_Popup"
  118. AllowsTransparency="true"
  119. Focusable="False"
  120. IsOpen="{TemplateBinding IsDropDownOpen}"
  121. Placement="Bottom"
  122. PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
  123. <Themes1:SystemDropShadowChrome
  124. x:Name="Shdw"
  125. MinWidth="{Binding ActualWidth, ElementName=Border}"
  126. MaxHeight="{TemplateBinding MaxDropDownHeight}"
  127. Color="Transparent">
  128. <Border
  129. x:Name="DropDownBorder"
  130. BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
  131. BorderThickness="1">
  132. <Border.Background>
  133. <ImageBrush
  134. ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png"
  135. Opacity="0.5"
  136. Stretch="Fill" />
  137. </Border.Background>
  138. <ScrollViewer x:Name="DropDownScrollViewer">
  139. <Grid RenderOptions.ClearTypeHint="Enabled">
  140. <Canvas
  141. Width="0"
  142. Height="0"
  143. HorizontalAlignment="Left"
  144. VerticalAlignment="Top">
  145. <Rectangle
  146. x:Name="OpaqueRect"
  147. Width="{Binding ActualWidth, ElementName=DropDownBorder}"
  148. Height="{Binding ActualHeight, ElementName=DropDownBorder}"
  149. Fill="{Binding Background, ElementName=DropDownBorder}" />
  150. </Canvas>
  151. <ItemsPresenter
  152. x:Name="ItemsPresenter"
  153. KeyboardNavigation.DirectionalNavigation="Contained"
  154. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  155. </Grid>
  156. </ScrollViewer>
  157. </Border>
  158. </Themes1:SystemDropShadowChrome>
  159. </Popup>
  160. </Themes1:ClassicBorderDecorator>
  161. <ToggleButton
  162. Width="Auto"
  163. MinWidth="0"
  164. MinHeight="0"
  165. ClickMode="Press"
  166. Focusable="false"
  167. IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  168. Style="{StaticResource ComboBoxTransparentButtonStyle}" />
  169. <DockPanel>
  170. <FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" />
  171. <TextBox
  172. x:Name="PART_EditableTextBox"
  173. Margin="{TemplateBinding Padding}"
  174. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  175. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  176. CaretBrush="White"
  177. IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
  178. Style="{StaticResource ComboBoxEditableTextBox}" />
  179. </DockPanel>
  180. </Grid>
  181. </Border>
  182. <ControlTemplate.Triggers>
  183. <Trigger Property="HasItems" Value="false">
  184. <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
  185. </Trigger>
  186. <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
  187. <Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
  188. <Setter TargetName="Shdw" Property="Color" Value="#71000000" />
  189. </Trigger>
  190. <Trigger Property="IsEnabled" Value="false">
  191. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  192. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  193. </Trigger>
  194. <MultiTrigger>
  195. <MultiTrigger.Conditions>
  196. <Condition Property="IsGrouping" Value="true" />
  197. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
  198. </MultiTrigger.Conditions>
  199. <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
  200. </MultiTrigger>
  201. <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
  202. <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
  203. <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
  204. </Trigger>
  205. </ControlTemplate.Triggers>
  206. </ControlTemplate>
  207. <Style x:Key="BaseComboBoxStyle" TargetType="{x:Type ComboBox}">
  208. <Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}" />
  209. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  210. <Setter Property="Background" Value="Transparent" />
  211. <Setter Property="BorderBrush" Value="{DynamicResource borderBrush}" />
  212. <Setter Property="BorderThickness" Value="1" />
  213. <Setter Property="Margin" Value="0,0,0,0" />
  214. <Setter Property="Padding" Value="0" />
  215. <Setter Property="Height" Value="24" />
  216. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
  217. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
  218. <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
  219. <Setter Property="ScrollViewer.PanningMode" Value="Both" />
  220. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  221. <Setter Property="VerticalContentAlignment" Value="Center" />
  222. <Setter Property="IsTextSearchCaseSensitive" Value="true" />
  223. <Setter Property="IsEditable" Value="true" />
  224. <Setter Property="StaysOpenOnEdit" Value="true" />
  225. <Setter Property="Template">
  226. <Setter.Value>
  227. <ControlTemplate TargetType="{x:Type ComboBox}">
  228. <Border
  229. Background="{TemplateBinding Background}"
  230. BorderBrush="{TemplateBinding BorderBrush}"
  231. BorderThickness="{TemplateBinding BorderThickness}"
  232. SnapsToDevicePixels="true">
  233. <Grid>
  234. <Themes1:ClassicBorderDecorator
  235. x:Name="Border"
  236. BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}"
  237. BorderStyle="None"
  238. BorderThickness="2">
  239. <Popup
  240. x:Name="PART_Popup"
  241. AllowsTransparency="true"
  242. Focusable="False"
  243. IsOpen="{TemplateBinding IsDropDownOpen}"
  244. Placement="Bottom"
  245. PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
  246. <Themes1:SystemDropShadowChrome
  247. x:Name="Shdw"
  248. MinWidth="{Binding ActualWidth, ElementName=Border}"
  249. MaxHeight="{TemplateBinding MaxDropDownHeight}"
  250. Color="Transparent">
  251. <Border
  252. x:Name="DropDownBorder"
  253. BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
  254. BorderThickness="1">
  255. <Border.Background>
  256. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png" />
  257. </Border.Background>
  258. <ScrollViewer x:Name="DropDownScrollViewer">
  259. <Grid RenderOptions.ClearTypeHint="Enabled">
  260. <Canvas
  261. Width="0"
  262. Height="0"
  263. HorizontalAlignment="Left"
  264. VerticalAlignment="Top">
  265. <Rectangle
  266. x:Name="OpaqueRect"
  267. Width="{Binding ActualWidth, ElementName=DropDownBorder}"
  268. Height="{Binding ActualHeight, ElementName=DropDownBorder}"
  269. Fill="{Binding Background, ElementName=DropDownBorder}" />
  270. </Canvas>
  271. <ItemsPresenter
  272. x:Name="ItemsPresenter"
  273. KeyboardNavigation.DirectionalNavigation="Contained"
  274. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  275. </Grid>
  276. </ScrollViewer>
  277. </Border>
  278. </Themes1:SystemDropShadowChrome>
  279. </Popup>
  280. </Themes1:ClassicBorderDecorator>
  281. <DockPanel Margin="2">
  282. <FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" />
  283. <Border x:Name="SelectedItemBorder" Margin="{TemplateBinding Padding}">
  284. <ContentPresenter
  285. Margin="1,1,1,1"
  286. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  287. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  288. Content="{TemplateBinding SelectionBoxItem}"
  289. ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
  290. ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
  291. ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
  292. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  293. </Border>
  294. </DockPanel>
  295. <ToggleButton
  296. Width="Auto"
  297. MinWidth="0"
  298. MinHeight="0"
  299. Margin="2"
  300. ClickMode="Press"
  301. Focusable="false"
  302. IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  303. Style="{StaticResource ComboBoxTransparentButtonStyle}" />
  304. </Grid>
  305. </Border>
  306. <ControlTemplate.Triggers>
  307. <MultiTrigger>
  308. <MultiTrigger.Conditions>
  309. <!--<Condition Property="IsSelectionBoxHighlighted" Value="true"/>-->
  310. <Condition Property="IsDropDownOpen" Value="false" />
  311. </MultiTrigger.Conditions>
  312. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
  313. </MultiTrigger>
  314. <!--<Trigger Property="IsSelectionBoxHighlighted" Value="true">
  315. <Setter Property="Background" TargetName="SelectedItemBorder" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
  316. </Trigger>-->
  317. <Trigger Property="HasItems" Value="false">
  318. <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
  319. </Trigger>
  320. <Trigger Property="IsEnabled" Value="false">
  321. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  322. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  323. </Trigger>
  324. <MultiTrigger>
  325. <MultiTrigger.Conditions>
  326. <Condition Property="IsGrouping" Value="true" />
  327. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
  328. </MultiTrigger.Conditions>
  329. <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
  330. </MultiTrigger>
  331. <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
  332. <Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
  333. <Setter TargetName="Shdw" Property="Color" Value="#71000000" />
  334. </Trigger>
  335. <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
  336. <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
  337. <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
  338. </Trigger>
  339. </ControlTemplate.Triggers>
  340. </ControlTemplate>
  341. </Setter.Value>
  342. </Setter>
  343. <Style.Triggers>
  344. <Trigger Property="IsEditable" Value="true">
  345. <Setter Property="IsTabStop" Value="false" />
  346. <Setter Property="Padding" Value="1" />
  347. <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
  348. </Trigger>
  349. </Style.Triggers>
  350. </Style>
  351. <Style BasedOn="{StaticResource BaseComboBoxStyle}" TargetType="ComboBox" />
  352. <!--#endregion-->
  353. <!--#region ColorCommboxStyle-->
  354. <ObjectDataProvider
  355. x:Key="colorPropertieOdp"
  356. MethodName="GetProperties"
  357. ObjectInstance="{x:Type Colors}" />
  358. <Style
  359. x:Key="ColorCommboxStyle"
  360. BasedOn="{StaticResource BaseComboBoxStyle}"
  361. TargetType="ComboBox">
  362. <Setter Property="IsTextSearchCaseSensitive" Value="False" />
  363. <Setter Property="IsEditable" Value="False" />
  364. <Setter Property="StaysOpenOnEdit" Value="False" />
  365. <Setter Property="ItemsSource" Value="{Binding Source={StaticResource colorPropertieOdp}}" />
  366. <Setter Property="ItemTemplate">
  367. <Setter.Value>
  368. <DataTemplate>
  369. <StackPanel Orientation="Horizontal">
  370. <Rectangle
  371. Width="40"
  372. Height="10"
  373. Fill="{Binding Name}" />
  374. <TextBlock Text="{Binding Name}" />
  375. </StackPanel>
  376. </DataTemplate>
  377. </Setter.Value>
  378. </Setter>
  379. </Style>
  380. <!--#endregion-->
  381. </Window.Resources>
  382. <Border x:Name="br">
  383. <Border.Background>
  384. <SolidColorBrush Color="#264c73"/>
  385. </Border.Background>
  386. <Grid>
  387. <Grid.RowDefinitions>
  388. <RowDefinition Height="50"/>
  389. <RowDefinition Height="50"/>
  390. <RowDefinition Height="50"/>
  391. <RowDefinition Height="40"/>
  392. <RowDefinition/>
  393. </Grid.RowDefinitions>
  394. <TextBlock Text="炒锅工艺" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FF2AB2E7" Background="Transparent" FontSize="25" Cursor="Arrow" ></TextBlock>
  395. <Border BorderThickness="0,0,0,1" BorderBrush="#FF2AB2E7"></Border>
  396. <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right">
  397. <Button Content="向前新增" Width="100" Margin="0,0,10,0" Height="30" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Cursor="Hand" FontSize="18" Command="{Binding AddFrontFlowItemCommand}" ></Button>
  398. <Button Content="向后新增" Width="100" Margin="0,0,10,0" Height="30" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Cursor="Hand" FontSize="18" Command="{Binding AddLastFlowItemCommand}" ></Button>
  399. <Button Content="删除选项" Width="100" Margin="0,0,10,0" Height="30" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Cursor="Hand" FontSize="18" Command="{Binding DeleteFlowItemCommand}" ></Button>
  400. <Button Content="新增料品" Width="100" Margin="0,0,10,0" Height="30" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Cursor="Hand" FontSize="18" Click="Button_Click"></Button>
  401. <Button Content="保存工艺" Width="100" Margin="0,0,10,0" Height="30" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Cursor="Hand" FontSize="18" Command="{Binding ConfirmCommand}" ></Button>
  402. <Button Content="取消" Height="30" Width="100" Margin="0,0,10,0" Background="Transparent" FontSize="18" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Command="{Binding CloseWindowCommand}"></Button>
  403. </StackPanel>
  404. <Grid Grid.Row="2" Background="#FF2AB2E7" Margin="0,0,0,5">
  405. <Grid.ColumnDefinitions>
  406. <ColumnDefinition Width="87"/>
  407. <ColumnDefinition Width="120"/>
  408. <ColumnDefinition Width="92"/>
  409. <ColumnDefinition Width="112"/>
  410. <ColumnDefinition Width="112"/>
  411. <ColumnDefinition Width="92"/>
  412. <ColumnDefinition Width="92"/>
  413. <ColumnDefinition Width="92"/>
  414. <ColumnDefinition Width="92"/>
  415. <ColumnDefinition Width="92"/>
  416. <ColumnDefinition Width="92"/>
  417. <ColumnDefinition Width="92"/>
  418. </Grid.ColumnDefinitions>
  419. <TextBlock Text="工艺步骤" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="white" FontSize="18"/>
  420. <GridSplitter BorderThickness="0.2" BorderBrush="White"></GridSplitter>
  421. <TextBlock Grid.Column="1" Text="原料/桶号设定" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="white" FontSize="18"/>
  422. <GridSplitter Grid.Column="1" BorderThickness="0.2" BorderBrush="White"></GridSplitter>
  423. <TextBlock Grid.Column="2" Text="速度(Hz)" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="white" FontSize="18"/>
  424. <GridSplitter Grid.Column="2" BorderThickness="0.2" BorderBrush="White"></GridSplitter>
  425. <TextBlock Grid.Column="3" Text="添加重量(Kg)" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="white" FontSize="18" ></TextBlock>
  426. <GridSplitter Grid.Column="3" BorderThickness="0.2" BorderBrush="White"></GridSplitter>
  427. <TextBlock Grid.Column="4" Text="目标重量(Kg)" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="white" FontSize="18" ></TextBlock>
  428. <GridSplitter Grid.Column="4" BorderThickness="0.2" BorderBrush="White"></GridSplitter>
  429. <TextBlock Grid.Column="5" Text="温度(℃)" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="white" FontSize="18"/>
  430. <GridSplitter Grid.Column="5" BorderThickness="0.2" BorderBrush="White"></GridSplitter>
  431. <TextBlock Grid.Column="6" Text="时间(M)" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="white" FontSize="18"/>
  432. <GridSplitter Grid.Column="6" BorderThickness="0.2" BorderBrush="White"></GridSplitter>
  433. <TextBlock Grid.Column="7" Text="一圈火比例" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="white" FontSize="18"/>
  434. <GridSplitter Grid.Column="7" BorderThickness="0.2" BorderBrush="White"></GridSplitter>
  435. <TextBlock Grid.Column="8" Text="二圈火比例" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="white" FontSize="18"/>
  436. <GridSplitter Grid.Column="8" BorderThickness="0.2" BorderBrush="White"></GridSplitter>
  437. <TextBlock Grid.Column="9" Text="三圈火比例" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="white" FontSize="18"/>
  438. <GridSplitter Grid.Column="9" BorderThickness="0.2" BorderBrush="White"></GridSplitter>
  439. <TextBlock Grid.Column="10" Text="四圈火比例" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="white" FontSize="18"/>
  440. </Grid>
  441. <StackPanel Grid.Row="3" VerticalAlignment="Center" Orientation="Horizontal" Margin="0,0,0,5">
  442. <TextBlock Text="目标重量偏差设置:" FontSize="20" Foreground="#FF2AB2E7" VerticalAlignment="Center"/>
  443. <TextBox Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#e69519" Cursor="Hand" Text="{Binding targetWeightOffset}" FontSize="18" Width="200" TextChanged="TextBox_TextChanged_10" Height="35" VerticalContentAlignment="Center"/>
  444. <TextBlock Text="Kg" FontSize="20" Foreground="#FF2AB2E7" VerticalAlignment="Center"/>
  445. </StackPanel>
  446. <StackPanel Grid.Row="3" VerticalAlignment="Center" Orientation="Horizontal" Margin="500,0,0,5">
  447. <TextBlock Text="秘制配方搅拌时间设置:" FontSize="20" Foreground="#FF2AB2E7" VerticalAlignment="Center"/>
  448. <TextBox Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#e69519" Cursor="Hand" Text="{Binding StirTime}" FontSize="18" Width="200" TextChanged="TextBox_TextChanged_10" Height="35" VerticalContentAlignment="Center"/>
  449. <TextBlock Text="分钟" FontSize="20" Foreground="#FF2AB2E7" VerticalAlignment="Center"/>
  450. </StackPanel>
  451. <ScrollViewer Grid.Row="4" VerticalScrollBarVisibility="Hidden">
  452. <ItemsControl x:Name="itemcontrols" AlternationCount="{Binding flowProcessModels.Count}" ItemsSource="{Binding flowProcessModels}" Margin="0,1,0,-1">
  453. <ItemsControl.ItemsPanel>
  454. <ItemsPanelTemplate>
  455. <StackPanel/>
  456. </ItemsPanelTemplate>
  457. </ItemsControl.ItemsPanel>
  458. <ItemsControl.ItemTemplate>
  459. <DataTemplate>
  460. <StackPanel x:Name="stk" Orientation="Horizontal" >
  461. <Label MouseLeftButtonDown="Label_MouseLeftButtonDown" Content="{Binding Path=(ItemsControl.AlternationIndex),RelativeSource={
  462. RelativeSource TemplatedParent}}" Foreground="SkyBlue" Width="87" Height="40" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontSize="18" Background="Transparent" BorderBrush="#FF2AB2E7" BorderThickness="1,1,0.5,1"/>
  463. <ComboBox ItemsSource="{Binding DataContext.FlowItems, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}" Text="{Binding FryMaterialNum}" Style="{StaticResource BaseComboBoxStyle}" IsReadOnly="True" Width="120" Height="40" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Background="Transparent" Foreground="SkyBlue" FontSize="18" BorderBrush="#FF2AB2E7" BorderThickness="0.5,1,0.5,1"/>
  464. <TextBox Text="{Binding FrySpeed}" Width="92" Height="40" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Background="Transparent" Foreground="SkyBlue" FontSize="18" BorderBrush="#FF2AB2E7" BorderThickness="0.5,1,0.5,1" TextChanged="TextBox_TextChanged"/>
  465. <TextBox Text="{Binding FryWeight}" Width="112" Height="40" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Background="Transparent" Foreground="SkyBlue" FontSize="18" BorderBrush="#FF2AB2E7" BorderThickness="0.5,1,0.5,1" TextChanged="TextBox_TextChanged_1"/>
  466. <TextBox Text="{Binding TargeWeight}" Width="112" Height="40" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Background="Transparent" Foreground="SkyBlue" FontSize="18" BorderBrush="#FF2AB2E7" BorderThickness="0.5,1,0.5,1" TextChanged="TextBox_TextChanged_8"/>
  467. <TextBox Text="{Binding FryTemperature}" Width="92" Height="40" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Background="Transparent" Foreground="SkyBlue" FontSize="18" BorderBrush="#FF2AB2E7" BorderThickness="0.5,1,0.5,1" TextChanged="TextBox_TextChanged_2"/>
  468. <TextBox Text="{Binding FryPeriodTime}" Width="92" Height="40" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Background="Transparent" Foreground="SkyBlue" FontSize="18" BorderBrush="#FF2AB2E7" BorderThickness="0.5,1,1,1" TextChanged="TextBox_TextChanged_3"/>
  469. <TextBox FontSize="18" >
  470. <TextBox.Template>
  471. <ControlTemplate>
  472. <Border Width="92" Height="40" BorderThickness="0.5,1,1,1" BorderBrush="#FF2AB2E7">
  473. <StackPanel Orientation="Horizontal">
  474. <TextBox Width="60" Height="40" VerticalAlignment="Center" BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Right" Padding="0,0,10,0" BorderBrush="Transparent" HorizontalAlignment="Center" Background="Transparent" Foreground="SkyBlue" Text="{Binding SmallFirePercent}" TextChanged="TextBox_TextChanged_4"/>
  475. <TextBlock Text="%" HorizontalAlignment="Right" Foreground="SkyBlue" VerticalAlignment="Center"/>
  476. </StackPanel>
  477. </Border>
  478. <ControlTemplate.Triggers>
  479. </ControlTemplate.Triggers>
  480. </ControlTemplate>
  481. </TextBox.Template>
  482. </TextBox>
  483. <TextBox FontSize="18" >
  484. <TextBox.Template>
  485. <ControlTemplate>
  486. <Border Width="92" Height="40" BorderThickness="0.5,1,1,1" BorderBrush="#FF2AB2E7">
  487. <StackPanel Orientation="Horizontal">
  488. <TextBox Width="60" Height="40" VerticalAlignment="Center" BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Right" Padding="0,0,10,0" BorderBrush="Transparent" HorizontalAlignment="Center" Background="Transparent" Foreground="SkyBlue" Text="{Binding MidFirePercent}" TextChanged="TextBox_TextChanged_5"/>
  489. <TextBlock Text="%" HorizontalAlignment="Right" Foreground="SkyBlue" VerticalAlignment="Center"/>
  490. </StackPanel>
  491. </Border>
  492. <ControlTemplate.Triggers>
  493. </ControlTemplate.Triggers>
  494. </ControlTemplate>
  495. </TextBox.Template>
  496. </TextBox>
  497. <TextBox FontSize="18" >
  498. <TextBox.Template>
  499. <ControlTemplate>
  500. <Border Width="92" Height="40" BorderThickness="0.5,1,1,1" BorderBrush="#FF2AB2E7">
  501. <StackPanel Orientation="Horizontal">
  502. <TextBox Width="60" Height="40" VerticalAlignment="Center" BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Right" Padding="0,0,10,0" BorderBrush="Transparent" HorizontalAlignment="Center" Background="Transparent" Foreground="SkyBlue" Text="{Binding BigFirePercent}" TextChanged="TextBox_TextChanged_6"/>
  503. <TextBlock Text="%" HorizontalAlignment="Right" Foreground="SkyBlue" VerticalAlignment="Center"/>
  504. </StackPanel>
  505. </Border>
  506. <ControlTemplate.Triggers>
  507. </ControlTemplate.Triggers>
  508. </ControlTemplate>
  509. </TextBox.Template>
  510. </TextBox>
  511. <TextBox FontSize="18" >
  512. <TextBox.Template>
  513. <ControlTemplate>
  514. <Border Width="92" Height="40" BorderThickness="0.5,1,1,1" BorderBrush="#FF2AB2E7">
  515. <StackPanel Orientation="Horizontal">
  516. <TextBox Width="60" Height="40" VerticalAlignment="Center" BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Right" Padding="0,0,10,0" BorderBrush="Transparent" HorizontalAlignment="Center" Background="Transparent" Foreground="SkyBlue" Text="{Binding StrongFirePercent}" TextChanged="TextBox_TextChanged_7"/>
  517. <TextBlock Text="%" HorizontalAlignment="Right" Foreground="SkyBlue" VerticalAlignment="Center"/>
  518. </StackPanel>
  519. </Border>
  520. <ControlTemplate.Triggers>
  521. </ControlTemplate.Triggers>
  522. </ControlTemplate>
  523. </TextBox.Template>
  524. </TextBox>
  525. </StackPanel>
  526. </DataTemplate>
  527. </ItemsControl.ItemTemplate>
  528. </ItemsControl>
  529. </ScrollViewer>
  530. </Grid>
  531. </Border>
  532. </Window>