终端一体化运控平台
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 

748 рядки
55 KiB

  1. <UserControl x:Class="FryPot_DosingSystem.View.SqliteDataView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:FryPot_DosingSystem.View"
  7. xmlns:vm="clr-namespace:FryPot_DosingSystem.ViewModel"
  8. mc:Ignorable="d"
  9. d:DesignHeight="450" d:DesignWidth="800"
  10. xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2">
  11. <UserControl.DataContext>
  12. <vm:SqliteDataViewModel/>
  13. </UserControl.DataContext>
  14. <UserControl.Resources>
  15. <Style x:Key="dataGrid" TargetType="DataGrid" >
  16. <Setter Property="HorizontalGridLinesBrush" Value="#FF2AB2E7"/>
  17. <Setter Property="VerticalGridLinesBrush" Value="#FF2AB2E7"/>
  18. <Setter Property="BorderThickness" Value="1"/>
  19. <Setter Property="BorderBrush" Value="#FF2AB2E7"/>
  20. <Setter Property="CanUserResizeColumns" Value="False"/>
  21. <Setter Property="HeadersVisibility" Value="Column"/>
  22. <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
  23. <Setter Property="VerticalScrollBarVisibility" Value="Hidden"/>
  24. </Style>
  25. <Style x:Key="ColumHeaderStyle" TargetType="DataGridColumnHeader">
  26. <Setter Property="HorizontalContentAlignment" Value="Center"></Setter>
  27. <Setter Property="VerticalAlignment" Value="Center"/>
  28. <Setter Property="Background" Value="#FF2AB2E7"></Setter>
  29. <Setter Property="Foreground" Value="white"></Setter>
  30. <Setter Property="BorderThickness" Value="0.6"></Setter>
  31. <Setter Property="BorderBrush" Value="White"></Setter>
  32. <Setter Property="Height" Value="30"/>
  33. <Setter Property="FontSize" Value="16"/>
  34. <Setter Property="FontWeight" Value="Heavy"/>
  35. <Setter Property="Margin" Value="-1,-1,-1,-1" />
  36. </Style>
  37. <Style x:Key="rowStyle" TargetType="DataGridRow">
  38. <Setter Property="Height" Value="35"/>
  39. <Setter Property="Foreground" Value="#FF2AB2E7"/>
  40. <Style.Triggers>
  41. <Trigger Property="AlternationIndex" Value="0">
  42. <Setter Property="Background" Value="Transparent" />
  43. </Trigger>
  44. <Trigger Property="AlternationIndex" Value="1">
  45. <Setter Property="Background" Value="Transparent" />
  46. </Trigger>
  47. <Trigger Property="IsMouseOver" Value="True">
  48. <Setter Property="Background" Value="#000066" />
  49. </Trigger>
  50. </Style.Triggers>
  51. </Style>
  52. <Style x:Key="textboxStyle" TargetType="TextBox">
  53. <Setter Property="Background" Value="Transparent"/>
  54. <Setter Property="Foreground" Value="#FF2AB2E7"/>
  55. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  56. <Setter Property="VerticalContentAlignment" Value="Center"/>
  57. <Setter Property="FontSize" Value="16"/>
  58. <Setter Property="BorderThickness" Value="0"/>
  59. <Setter Property="CaretBrush" Value="LightBlue"/>
  60. <Style.Triggers>
  61. <Trigger Property="IsFocused" Value="True">
  62. <Setter Property="Cursor" Value="Arrow"/>
  63. </Trigger>
  64. </Style.Triggers>
  65. </Style>
  66. <Style x:Key="cellStyle" TargetType="DataGridCell">
  67. <Style.Triggers>
  68. <Trigger Property="IsSelected" Value="True">
  69. <Setter Property="Background" Value="Transparent"/>
  70. <Setter Property="Foreground"
  71. Value="#FF2AB2E7"/>
  72. </Trigger>
  73. <Trigger Property="IsSelected" Value="false">
  74. <Setter Property="Background" Value="Transparent"/>
  75. <Setter Property="Foreground"
  76. Value="#FF2AB2E7"/>
  77. </Trigger>
  78. </Style.Triggers>
  79. </Style>
  80. <Style x:Key="dgCellstyle" TargetType="TextBlock">
  81. <Setter Property="HorizontalAlignment" Value="Center"></Setter>
  82. <Setter Property="VerticalAlignment" Value="Center"/>
  83. <Setter Property="FontSize" Value="16"/>
  84. </Style>
  85. <Style x:Key="PickerStyle" TargetType="{x:Type DatePicker}">
  86. <Setter Property="Foreground" Value="#FF2AB2E7" />
  87. <Setter Property="IsTodayHighlighted" Value="True" />
  88. <Setter Property="SelectedDateFormat" Value="Short" />
  89. <Setter Property="Padding" Value="2" />
  90. <Setter Property="BorderThickness" Value="2" />
  91. <Setter Property="VerticalContentAlignment" Value="Center" />
  92. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  93. <!-- Set CalendarStyle to DatePickerCalendarStyle. -->
  94. <Setter Property="CalendarStyle" Value="{DynamicResource DatePickerCalendarStyle}" />
  95. <Setter Property="Width" Value="130" />
  96. <Setter Property="FontSize" Value="12" />
  97. <!--<Setter Property="Height" Value="30" />-->
  98. <Setter Property="Template">
  99. <Setter.Value>
  100. <ControlTemplate TargetType="{x:Type DatePicker}">
  101. <Border
  102. x:Name="br"
  103. Padding="{TemplateBinding Padding}"
  104. Background="{TemplateBinding Background}"
  105. BorderBrush="{TemplateBinding BorderBrush}"
  106. BorderThickness="{TemplateBinding BorderThickness}">
  107. <Grid
  108. x:Name="PART_Root"
  109. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  110. VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
  111. <Grid.ColumnDefinitions>
  112. <ColumnDefinition Width="*" />
  113. <ColumnDefinition Width="Auto" />
  114. </Grid.ColumnDefinitions>
  115. <Button
  116. x:Name="PART_Button"
  117. Grid.Column="1"
  118. Height="20"
  119. Margin="3,0,3,0"
  120. HorizontalAlignment="Left"
  121. VerticalAlignment="Top"
  122. Background="Transparent"
  123. Focusable="False"
  124. Foreground="{TemplateBinding Foreground}"
  125. Style="{StaticResource DropDownButtonStyle}" />
  126. <DatePickerTextBox
  127. x:Name="PART_TextBox"
  128. Grid.Column="0"
  129. Margin="5,0,0,0"
  130. VerticalAlignment="Center"
  131. Foreground="{TemplateBinding Foreground}"
  132. Style="{StaticResource DatePickerTextBoxStyle}"
  133. Text="{TemplateBinding Text}" />
  134. <Grid
  135. x:Name="PART_DisabledVisual"
  136. Grid.Row="0"
  137. Grid.Column="0"
  138. Grid.ColumnSpan="2"
  139. IsHitTestVisible="False"
  140. Opacity="0">
  141. <Grid.ColumnDefinitions>
  142. <ColumnDefinition Width="*" />
  143. <ColumnDefinition Width="Auto" />
  144. </Grid.ColumnDefinitions>
  145. <Rectangle
  146. Grid.Row="0"
  147. Grid.Column="0"
  148. Fill="#A5FFFFFF"
  149. RadiusX="1"
  150. RadiusY="1" />
  151. <Rectangle
  152. Grid.Row="0"
  153. Grid.Column="1"
  154. Width="19"
  155. Height="18"
  156. Margin="3,0,3,0"
  157. Fill="#A5FFFFFF"
  158. RadiusX="1"
  159. RadiusY="1" />
  160. <Popup
  161. x:Name="PART_Popup"
  162. AllowsTransparency="True"
  163. Placement="Bottom"
  164. PlacementTarget="{Binding ElementName=br}"
  165. PopupAnimation="Slide"
  166. StaysOpen="False" />
  167. </Grid>
  168. </Grid>
  169. <VisualStateManager.VisualStateGroups>
  170. <VisualStateGroup x:Name="CommonStates">
  171. <VisualState x:Name="Normal" />
  172. <VisualState x:Name="Disabled">
  173. <Storyboard>
  174. <DoubleAnimation
  175. Storyboard.TargetName="PART_DisabledVisual"
  176. Storyboard.TargetProperty="Opacity"
  177. To="1"
  178. Duration="0" />
  179. </Storyboard>
  180. </VisualState>
  181. </VisualStateGroup>
  182. </VisualStateManager.VisualStateGroups>
  183. </Border>
  184. <ControlTemplate.Triggers>
  185. <Trigger Property="IsMouseOver" Value="True">
  186. <Setter TargetName="br" Property="BorderBrush" Value="#3aa7f3" />
  187. </Trigger>
  188. </ControlTemplate.Triggers>
  189. </ControlTemplate>
  190. </Setter.Value>
  191. </Setter>
  192. </Style>
  193. <Style x:Key="FocusVisual">
  194. <Setter Property="Control.Template">
  195. <Setter.Value>
  196. <ControlTemplate>
  197. <Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
  198. </ControlTemplate>
  199. </Setter.Value>
  200. </Setter>
  201. </Style>
  202. <SolidColorBrush x:Key="TextBox.Static.Background" Color="#FFFFFFFF"/>
  203. <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
  204. <Setter Property="OverridesDefaultStyle" Value="true"/>
  205. <Setter Property="AllowDrop" Value="true"/>
  206. <Setter Property="MinWidth" Value="0"/>
  207. <Setter Property="MinHeight" Value="0"/>
  208. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  209. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  210. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  211. <Setter Property="Template">
  212. <Setter.Value>
  213. <ControlTemplate TargetType="{x:Type TextBox}">
  214. <ScrollViewer x:Name="PART_ContentHost" Background="Transparent" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
  215. </ControlTemplate>
  216. </Setter.Value>
  217. </Setter>
  218. </Style>
  219. <LinearGradientBrush x:Key="ComboBox.Static.Background" EndPoint="0,1" StartPoint="0,0">
  220. <GradientStop Color="Transparent" Offset="0.0"/>
  221. <GradientStop Color="Transparent" Offset="1.0"/>
  222. </LinearGradientBrush>
  223. <SolidColorBrush x:Key="ComboBox.Static.Border" Color="#FFACACAC"/>
  224. <SolidColorBrush x:Key="ComboBox.Static.Glyph" Color="#FF2AB2E7"/>
  225. <SolidColorBrush x:Key="ComboBox.Static.Editable.Background" Color="Transparent"/>
  226. <SolidColorBrush x:Key="ComboBox.Static.Editable.Border" Color="#FFABADB3"/>
  227. <SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Background" Color="Transparent"/>
  228. <SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Border" Color="Transparent"/>
  229. <LinearGradientBrush x:Key="ComboBox.MouseOver.Background" EndPoint="0,1" StartPoint="0,0">
  230. <GradientStop Color="Transparent" Offset="0.0"/>
  231. <GradientStop Color="Transparent" Offset="1.0"/>
  232. </LinearGradientBrush>
  233. <SolidColorBrush x:Key="ComboBox.MouseOver.Border" Color="#FF7EB4EA"/>
  234. <SolidColorBrush x:Key="ComboBox.MouseOver.Glyph" Color="#FF000000"/>
  235. <SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Background" Color="Transparent"/>
  236. <SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Border" Color="#FF7EB4EA"/>
  237. <LinearGradientBrush x:Key="ComboBox.MouseOver.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
  238. <GradientStop Color="Transparent" Offset="0.0"/>
  239. <GradientStop Color="Transparent" Offset="1.0"/>
  240. </LinearGradientBrush>
  241. <SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Button.Border" Color="#FF7EB4EA"/>
  242. <LinearGradientBrush x:Key="ComboBox.Pressed.Background" EndPoint="0,1" StartPoint="0,0">
  243. <GradientStop Color="#FFDAECFC" Offset="0.0"/>
  244. <GradientStop Color="#FFC4E0FC" Offset="1.0"/>
  245. </LinearGradientBrush>
  246. <SolidColorBrush x:Key="ComboBox.Pressed.Border" Color="#FF569DE5"/>
  247. <SolidColorBrush x:Key="ComboBox.Pressed.Glyph" Color="#FF000000"/>
  248. <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Background" Color="#FFFFFFFF"/>
  249. <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Border" Color="#FF569DE5"/>
  250. <LinearGradientBrush x:Key="ComboBox.Pressed.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
  251. <GradientStop Color="#FFDAEBFC" Offset="0.0"/>
  252. <GradientStop Color="#FFC4E0FC" Offset="1.0"/>
  253. </LinearGradientBrush>
  254. <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Button.Border" Color="#FF569DE5"/>
  255. <SolidColorBrush x:Key="ComboBox.Disabled.Background" Color="#FFF0F0F0"/>
  256. <SolidColorBrush x:Key="ComboBox.Disabled.Border" Color="#FFD9D9D9"/>
  257. <SolidColorBrush x:Key="ComboBox.Disabled.Glyph" Color="#FFBFBFBF"/>
  258. <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Background" Color="#FFFFFFFF"/>
  259. <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Border" Color="#FFBFBFBF"/>
  260. <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Background" Color="Transparent"/>
  261. <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Border" Color="Transparent"/>
  262. <Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
  263. <Setter Property="OverridesDefaultStyle" Value="true"/>
  264. <Setter Property="IsTabStop" Value="false"/>
  265. <Setter Property="Focusable" Value="false"/>
  266. <Setter Property="ClickMode" Value="Press"/>
  267. <Setter Property="Template">
  268. <Setter.Value>
  269. <ControlTemplate TargetType="{x:Type ToggleButton}">
  270. <Border x:Name="templateRoot" Background="{StaticResource ComboBox.Static.Background}" BorderBrush="{StaticResource ComboBox.Static.Border}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
  271. <Border x:Name="splitBorder" BorderBrush="Transparent" BorderThickness="1" HorizontalAlignment="Right" Margin="0" SnapsToDevicePixels="true" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
  272. <Path x:Name="arrow" Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z" Fill="{StaticResource ComboBox.Static.Glyph}" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center"/>
  273. </Border>
  274. </Border>
  275. <ControlTemplate.Triggers>
  276. <MultiDataTrigger>
  277. <MultiDataTrigger.Conditions>
  278. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
  279. <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="false"/>
  280. <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="false"/>
  281. <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="true"/>
  282. </MultiDataTrigger.Conditions>
  283. <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Static.Editable.Background}"/>
  284. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Static.Editable.Border}"/>
  285. <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Static.Editable.Button.Background}"/>
  286. <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Static.Editable.Button.Border}"/>
  287. </MultiDataTrigger>
  288. <Trigger Property="IsMouseOver" Value="true">
  289. <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.MouseOver.Glyph}"/>
  290. </Trigger>
  291. <MultiDataTrigger>
  292. <MultiDataTrigger.Conditions>
  293. <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
  294. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
  295. </MultiDataTrigger.Conditions>
  296. <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Background}"/>
  297. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Border}"/>
  298. </MultiDataTrigger>
  299. <MultiDataTrigger>
  300. <MultiDataTrigger.Conditions>
  301. <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
  302. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
  303. </MultiDataTrigger.Conditions>
  304. <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Editable.Background}"/>
  305. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Editable.Border}"/>
  306. <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.MouseOver.Editable.Button.Background}"/>
  307. <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.MouseOver.Editable.Button.Border}"/>
  308. </MultiDataTrigger>
  309. <Trigger Property="IsPressed" Value="true">
  310. <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Pressed.Glyph}"/>
  311. </Trigger>
  312. <MultiDataTrigger>
  313. <MultiDataTrigger.Conditions>
  314. <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true"/>
  315. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
  316. </MultiDataTrigger.Conditions>
  317. <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Background}"/>
  318. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Border}"/>
  319. </MultiDataTrigger>
  320. <MultiDataTrigger>
  321. <MultiDataTrigger.Conditions>
  322. <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true"/>
  323. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
  324. </MultiDataTrigger.Conditions>
  325. <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Editable.Background}"/>
  326. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Editable.Border}"/>
  327. <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Pressed.Editable.Button.Background}"/>
  328. <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Pressed.Editable.Button.Border}"/>
  329. </MultiDataTrigger>
  330. <Trigger Property="IsEnabled" Value="false">
  331. <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Disabled.Glyph}"/>
  332. </Trigger>
  333. <MultiDataTrigger>
  334. <MultiDataTrigger.Conditions>
  335. <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
  336. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
  337. </MultiDataTrigger.Conditions>
  338. <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Background}"/>
  339. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Border}"/>
  340. </MultiDataTrigger>
  341. <MultiDataTrigger>
  342. <MultiDataTrigger.Conditions>
  343. <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
  344. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
  345. </MultiDataTrigger.Conditions>
  346. <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Editable.Background}"/>
  347. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Editable.Border}"/>
  348. <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Disabled.Editable.Button.Background}"/>
  349. <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Disabled.Editable.Button.Border}"/>
  350. </MultiDataTrigger>
  351. </ControlTemplate.Triggers>
  352. </ControlTemplate>
  353. </Setter.Value>
  354. </Setter>
  355. </Style>
  356. <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
  357. <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
  358. <Grid.ColumnDefinitions>
  359. <ColumnDefinition Width="*"/>
  360. <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
  361. </Grid.ColumnDefinitions>
  362. <Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
  363. <theme:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
  364. <Border x:Name="dropDownBorder" Background="Transparent" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1">
  365. <ScrollViewer x:Name="DropDownScrollViewer">
  366. <Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
  367. <Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
  368. <Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
  369. </Canvas>
  370. <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  371. </Grid>
  372. </ScrollViewer>
  373. </Border>
  374. </theme:SystemDropShadowChrome>
  375. </Popup>
  376. <ToggleButton x:Name="toggleButton" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
  377. <Border x:Name="border" Background="{StaticResource TextBox.Static.Background}" Margin="{TemplateBinding BorderThickness}">
  378. <TextBox x:Name="PART_EditableTextBox" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}" Style="{StaticResource ComboBoxEditableTextBox}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
  379. </Border>
  380. </Grid>
  381. <ControlTemplate.Triggers>
  382. <Trigger Property="IsEnabled" Value="false">
  383. <Setter Property="Opacity" TargetName="border" Value="0.56"/>
  384. </Trigger>
  385. <Trigger Property="IsKeyboardFocusWithin" Value="true">
  386. <Setter Property="Foreground" Value="Black"/>
  387. </Trigger>
  388. <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
  389. <Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>
  390. <Setter Property="Color" TargetName="shadow" Value="#71000000"/>
  391. </Trigger>
  392. <Trigger Property="HasItems" Value="false">
  393. <Setter Property="Height" TargetName="dropDownBorder" Value="95"/>
  394. </Trigger>
  395. <MultiTrigger>
  396. <MultiTrigger.Conditions>
  397. <Condition Property="IsGrouping" Value="true"/>
  398. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
  399. </MultiTrigger.Conditions>
  400. <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
  401. </MultiTrigger>
  402. <Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
  403. <Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
  404. <Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
  405. </Trigger>
  406. </ControlTemplate.Triggers>
  407. </ControlTemplate>
  408. <ControlTemplate x:Key="ComboBoxTemplate" TargetType="{x:Type ComboBox}">
  409. <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
  410. <Grid.ColumnDefinitions>
  411. <ColumnDefinition Width="*"/>
  412. <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
  413. </Grid.ColumnDefinitions>
  414. <Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
  415. <theme:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
  416. <Border x:Name="dropDownBorder" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1">
  417. <ScrollViewer x:Name="DropDownScrollViewer">
  418. <Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
  419. <Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
  420. <Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
  421. </Canvas>
  422. <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  423. </Grid>
  424. </ScrollViewer>
  425. </Border>
  426. </theme:SystemDropShadowChrome>
  427. </Popup>
  428. <ToggleButton x:Name="toggleButton" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
  429. <ContentPresenter x:Name="contentPresenter" ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" Content="{TemplateBinding SelectionBoxItem}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="false" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  430. </Grid>
  431. <ControlTemplate.Triggers>
  432. <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
  433. <Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>
  434. <Setter Property="Color" TargetName="shadow" Value="#71000000"/>
  435. </Trigger>
  436. <Trigger Property="HasItems" Value="false">
  437. <Setter Property="Height" TargetName="dropDownBorder" Value="95"/>
  438. </Trigger>
  439. <MultiTrigger>
  440. <MultiTrigger.Conditions>
  441. <Condition Property="IsGrouping" Value="true"/>
  442. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
  443. </MultiTrigger.Conditions>
  444. <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
  445. </MultiTrigger>
  446. <Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
  447. <Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
  448. <Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
  449. </Trigger>
  450. </ControlTemplate.Triggers>
  451. </ControlTemplate>
  452. <Style x:Key="ComboBoxStyle1" TargetType="{x:Type ComboBox}">
  453. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
  454. <Setter Property="Background" Value="{StaticResource ComboBox.Static.Background}"/>
  455. <Setter Property="BorderBrush" Value="{StaticResource ComboBox.Static.Border}"/>
  456. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
  457. <Setter Property="BorderThickness" Value="1"/>
  458. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
  459. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
  460. <Setter Property="Padding" Value="6,3,5,3"/>
  461. <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
  462. <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
  463. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  464. <Setter Property="Template" Value="{StaticResource ComboBoxTemplate}"/>
  465. <Style.Triggers>
  466. <Trigger Property="IsEditable" Value="true">
  467. <Setter Property="IsTabStop" Value="false"/>
  468. <Setter Property="Padding" Value="2"/>
  469. <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}"/>
  470. </Trigger>
  471. </Style.Triggers>
  472. </Style>
  473. </UserControl.Resources>
  474. <Grid>
  475. <Grid.RowDefinitions>
  476. <RowDefinition Height="0.1*"/>
  477. <RowDefinition/>
  478. </Grid.RowDefinitions>
  479. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
  480. <!--<DatePicker Margin="50,0" Height="35" Style="{StaticResource PickerStyle}" SelectedDate="{Binding SelectedDate}"></DatePicker>
  481. <ComboBox Style="{DynamicResource ComboBoxStyle1}" ItemsSource="{Binding list}" Height="35" Width="150" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontSize="18" Foreground="#FF2AB2E7" SelectedValue="{Binding cboSelectedValue}" Margin="0,0,50,0"></ComboBox>-->
  482. <Button Width="150" Height="35" Content="查询" FontSize="20" Foreground="#FF2AB2E7" Background="Transparent" BorderBrush="#FF2AB2E7" BorderThickness="1" Margin="0,0,10,0" Command="{Binding SelectCommand}"></Button>
  483. </StackPanel>
  484. <DataGrid Grid.Row="1" x:Name="fryPot" ItemsSource="{Binding Status}" GridLinesVisibility="All" Background="Transparent" LoadingRow="fryPot_LoadingRow"
  485. AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource dataGrid}"
  486. ColumnHeaderStyle="{StaticResource ColumHeaderStyle}" RowStyle="{StaticResource rowStyle}" CellStyle="{StaticResource cellStyle}">
  487. <DataGrid.Columns>
  488. <DataGridTemplateColumn IsReadOnly="True" Width="0.1*" Header="ID">
  489. <DataGridTemplateColumn.CellTemplate>
  490. <DataTemplate>
  491. <TextBox Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow}}, Path=Header}" IsReadOnly="True" Style="{StaticResource textboxStyle}"></TextBox>
  492. </DataTemplate>
  493. </DataGridTemplateColumn.CellTemplate>
  494. </DataGridTemplateColumn>
  495. <DataGridTextColumn Width="0.2*" Header="温度" Binding="{Binding Temperature}" ElementStyle="{StaticResource dgCellstyle }">
  496. </DataGridTextColumn>
  497. <DataGridTextColumn Width="0.2*" Header="火力" Binding="{Binding HotPower}" ElementStyle="{StaticResource dgCellstyle }">
  498. </DataGridTextColumn>
  499. <DataGridTextColumn Width="0.2*" Header="搅拌速度" Binding="{Binding Speed}" ElementStyle="{StaticResource dgCellstyle }">
  500. </DataGridTextColumn>
  501. <DataGridTextColumn Width="0.2*" Header="炒锅载重" Binding="{Binding FryPotWeight}" ElementStyle="{StaticResource dgCellstyle }">
  502. </DataGridTextColumn>
  503. <DataGridTextColumn Width="0.2*" Header="配方名称" Binding="{Binding RecipeName}" ElementStyle="{StaticResource dgCellstyle }">
  504. </DataGridTextColumn>
  505. <DataGridTextColumn Width="0.2*" Header="配方用油量" Binding="{Binding OilCapacity}" ElementStyle="{StaticResource dgCellstyle }">
  506. </DataGridTextColumn>
  507. <DataGridTextColumn Width="0.2*" Header="总用油量" Binding="{Binding TotalOilCapactiy}" ElementStyle="{StaticResource dgCellstyle }">
  508. </DataGridTextColumn>
  509. <DataGridTextColumn Width="0.2*" Header="产量" Binding="{Binding TotalProduct}" ElementStyle="{StaticResource dgCellstyle }">
  510. </DataGridTextColumn>
  511. <DataGridTextColumn Width="0.2*" Header="时间" Binding="{Binding Time}" ElementStyle="{StaticResource dgCellstyle }">
  512. </DataGridTextColumn>
  513. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址">
  514. <DataGridTemplateColumn.CellTemplate>
  515. <DataTemplate>
  516. <TextBox Text="{Binding PlcAddress}" Style="{StaticResource textboxStyle}"></TextBox>
  517. </DataTemplate>
  518. </DataGridTemplateColumn.CellTemplate>
  519. </DataGridTemplateColumn>-->
  520. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址长度">
  521. <DataGridTemplateColumn.CellTemplate>
  522. <DataTemplate>
  523. <TextBox Text="{Binding Length}" Style="{StaticResource textboxStyle}"></TextBox>
  524. </DataTemplate>
  525. </DataGridTemplateColumn.CellTemplate>
  526. </DataGridTemplateColumn>-->
  527. </DataGrid.Columns>
  528. </DataGrid>
  529. <!--<DataGrid Grid.Row="1" x:Name="fryOne" Visibility="{Binding fryOneDataVisible}" ItemsSource="{Binding StatusOne}" GridLinesVisibility="All" Background="Transparent"
  530. AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource dataGrid}"
  531. ColumnHeaderStyle="{StaticResource ColumHeaderStyle}" RowStyle="{StaticResource rowStyle}" CellStyle="{StaticResource cellStyle}">
  532. <DataGrid.Columns>
  533. <DataGridTemplateColumn IsReadOnly="True" Width="0.1*" Header="ID">
  534. <DataGridTemplateColumn.CellTemplate>
  535. <DataTemplate>
  536. <TextBox Text="{Binding Id}" IsReadOnly="False" Style="{StaticResource textboxStyle}"></TextBox>
  537. </DataTemplate>
  538. </DataGridTemplateColumn.CellTemplate>
  539. </DataGridTemplateColumn>
  540. <DataGridTextColumn Width="0.2*" Header="温度" Binding="{Binding Temperature}" ElementStyle="{StaticResource dgCellstyle }">
  541. </DataGridTextColumn>
  542. <DataGridTextColumn Width="0.2*" Header="火力" Binding="{Binding HotPower}" ElementStyle="{StaticResource dgCellstyle }">
  543. </DataGridTextColumn>
  544. <DataGridTextColumn Width="0.2*" Header="搅拌速度" Binding="{Binding Speed}" ElementStyle="{StaticResource dgCellstyle }">
  545. </DataGridTextColumn>
  546. <DataGridTextColumn Width="0.2*" Header="炒锅载重" Binding="{Binding FryPotWeight}" ElementStyle="{StaticResource dgCellstyle }">
  547. </DataGridTextColumn>
  548. <DataGridTextColumn Width="0.2*" Header="配方用油量" Binding="{Binding OilCapacity}" ElementStyle="{StaticResource dgCellstyle }">
  549. </DataGridTextColumn>
  550. <DataGridTextColumn Width="0.2*" Header="总用油量" Binding="{Binding TotalOilCapactiy}" ElementStyle="{StaticResource dgCellstyle }">
  551. </DataGridTextColumn>
  552. <DataGridTextColumn Width="0.2*" Header="产量" Binding="{Binding TotalProduct}" ElementStyle="{StaticResource dgCellstyle }">
  553. </DataGridTextColumn>
  554. <DataGridTextColumn Width="0.2*" Header="时间" Binding="{Binding Time}" ElementStyle="{StaticResource dgCellstyle }">
  555. </DataGridTextColumn>
  556. --><!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址">
  557. <DataGridTemplateColumn.CellTemplate>
  558. <DataTemplate>
  559. <TextBox Text="{Binding PlcAddress}" Style="{StaticResource textboxStyle}"></TextBox>
  560. </DataTemplate>
  561. </DataGridTemplateColumn.CellTemplate>
  562. </DataGridTemplateColumn>-->
  563. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址长度">
  564. <DataGridTemplateColumn.CellTemplate>
  565. <DataTemplate>
  566. <TextBox Text="{Binding Length}" Style="{StaticResource textboxStyle}"></TextBox>
  567. </DataTemplate>
  568. </DataGridTemplateColumn.CellTemplate>
  569. </DataGridTemplateColumn>--><!--
  570. </DataGrid.Columns>
  571. </DataGrid>-->
  572. <DataGrid x:Name="fryTwo" Grid.Row="1" Visibility="{Binding fryTwoDataVisible}" ItemsSource="{Binding StatusTwo}" GridLinesVisibility="All" Background="Transparent"
  573. AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource dataGrid}"
  574. ColumnHeaderStyle="{StaticResource ColumHeaderStyle}" RowStyle="{StaticResource rowStyle}" CellStyle="{StaticResource cellStyle}">
  575. <DataGrid.Columns>
  576. <DataGridTemplateColumn IsReadOnly="True" Width="0.1*" Header="ID">
  577. <DataGridTemplateColumn.CellTemplate>
  578. <DataTemplate>
  579. <TextBox Text="{Binding Id}" IsReadOnly="False" Style="{StaticResource textboxStyle}"></TextBox>
  580. </DataTemplate>
  581. </DataGridTemplateColumn.CellTemplate>
  582. </DataGridTemplateColumn>
  583. <DataGridTextColumn Width="0.2*" Header="温度" Binding="{Binding Temperature}" ElementStyle="{StaticResource dgCellstyle }">
  584. </DataGridTextColumn>
  585. <DataGridTextColumn Width="0.2*" Header="火力" Binding="{Binding HotPower}" ElementStyle="{StaticResource dgCellstyle }">
  586. </DataGridTextColumn>
  587. <DataGridTextColumn Width="0.2*" Header="搅拌速度" Binding="{Binding Speed}" ElementStyle="{StaticResource dgCellstyle }">
  588. </DataGridTextColumn>
  589. <DataGridTextColumn Width="0.2*" Header="炒锅载重" Binding="{Binding FryPotWeight}" ElementStyle="{StaticResource dgCellstyle }">
  590. </DataGridTextColumn>
  591. <DataGridTextColumn Width="0.2*" Header="配方用油量" Binding="{Binding OilCapacity}" ElementStyle="{StaticResource dgCellstyle }">
  592. </DataGridTextColumn>
  593. <DataGridTextColumn Width="0.2*" Header="总用油量" Binding="{Binding TotalOilCapactiy}" ElementStyle="{StaticResource dgCellstyle }">
  594. </DataGridTextColumn>
  595. <DataGridTextColumn Width="0.2*" Header="产量" Binding="{Binding TotalProduct}" ElementStyle="{StaticResource dgCellstyle }">
  596. </DataGridTextColumn>
  597. <DataGridTextColumn Width="0.2*" Header="时间" Binding="{Binding Time}" ElementStyle="{StaticResource dgCellstyle }">
  598. </DataGridTextColumn>
  599. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址">
  600. <DataGridTemplateColumn.CellTemplate>
  601. <DataTemplate>
  602. <TextBox Text="{Binding PlcAddress}" Style="{StaticResource textboxStyle}"></TextBox>
  603. </DataTemplate>
  604. </DataGridTemplateColumn.CellTemplate>
  605. </DataGridTemplateColumn>-->
  606. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址长度">
  607. <DataGridTemplateColumn.CellTemplate>
  608. <DataTemplate>
  609. <TextBox Text="{Binding Length}" Style="{StaticResource textboxStyle}"></TextBox>
  610. </DataTemplate>
  611. </DataGridTemplateColumn.CellTemplate>
  612. </DataGridTemplateColumn>-->
  613. </DataGrid.Columns>
  614. </DataGrid>
  615. <DataGrid x:Name="fryThree" Grid.Row="1" Visibility="{Binding fryThreeDataVisible}" ItemsSource="{Binding StatusThree}" GridLinesVisibility="All" Background="Transparent"
  616. AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource dataGrid}"
  617. ColumnHeaderStyle="{StaticResource ColumHeaderStyle}" RowStyle="{StaticResource rowStyle}" CellStyle="{StaticResource cellStyle}">
  618. <DataGrid.Columns>
  619. <DataGridTemplateColumn IsReadOnly="True" Width="0.1*" Header="ID">
  620. <DataGridTemplateColumn.CellTemplate>
  621. <DataTemplate>
  622. <TextBox Text="{Binding Id}" IsReadOnly="False" Style="{StaticResource textboxStyle}"></TextBox>
  623. </DataTemplate>
  624. </DataGridTemplateColumn.CellTemplate>
  625. </DataGridTemplateColumn>
  626. <DataGridTextColumn Width="0.2*" Header="温度" Binding="{Binding Temperature}" ElementStyle="{StaticResource dgCellstyle }">
  627. </DataGridTextColumn>
  628. <DataGridTextColumn Width="0.2*" Header="火力" Binding="{Binding HotPower}" ElementStyle="{StaticResource dgCellstyle }">
  629. </DataGridTextColumn>
  630. <DataGridTextColumn Width="0.2*" Header="搅拌速度" Binding="{Binding Speed}" ElementStyle="{StaticResource dgCellstyle }">
  631. </DataGridTextColumn>
  632. <DataGridTextColumn Width="0.2*" Header="炒锅载重" Binding="{Binding FryPotWeight}" ElementStyle="{StaticResource dgCellstyle }">
  633. </DataGridTextColumn>
  634. <DataGridTextColumn Width="0.2*" Header="配方用油量" Binding="{Binding OilCapacity}" ElementStyle="{StaticResource dgCellstyle }">
  635. </DataGridTextColumn>
  636. <DataGridTextColumn Width="0.2*" Header="总用油量" Binding="{Binding TotalOilCapactiy}" ElementStyle="{StaticResource dgCellstyle }">
  637. </DataGridTextColumn>
  638. <DataGridTextColumn Width="0.2*" Header="产量" Binding="{Binding TotalProduct}" ElementStyle="{StaticResource dgCellstyle }">
  639. </DataGridTextColumn>
  640. <DataGridTextColumn Width="0.2*" Header="时间" Binding="{Binding Time}" ElementStyle="{StaticResource dgCellstyle }">
  641. </DataGridTextColumn>
  642. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址">
  643. <DataGridTemplateColumn.CellTemplate>
  644. <DataTemplate>
  645. <TextBox Text="{Binding PlcAddress}" Style="{StaticResource textboxStyle}"></TextBox>
  646. </DataTemplate>
  647. </DataGridTemplateColumn.CellTemplate>
  648. </DataGridTemplateColumn>-->
  649. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址长度">
  650. <DataGridTemplateColumn.CellTemplate>
  651. <DataTemplate>
  652. <TextBox Text="{Binding Length}" Style="{StaticResource textboxStyle}"></TextBox>
  653. </DataTemplate>
  654. </DataGridTemplateColumn.CellTemplate>
  655. </DataGridTemplateColumn>-->
  656. </DataGrid.Columns>
  657. </DataGrid>
  658. <DataGrid x:Name="fryFour" Grid.Row="1" Visibility="{Binding fryFourDataVisible}" ItemsSource="{Binding StatusFour}" GridLinesVisibility="All" Background="Transparent"
  659. AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource dataGrid}"
  660. ColumnHeaderStyle="{StaticResource ColumHeaderStyle}" RowStyle="{StaticResource rowStyle}" CellStyle="{StaticResource cellStyle}">
  661. <DataGrid.Columns>
  662. <DataGridTemplateColumn IsReadOnly="True" Width="0.1*" Header="ID">
  663. <DataGridTemplateColumn.CellTemplate>
  664. <DataTemplate>
  665. <TextBox Text="{Binding Id}" IsReadOnly="False" Style="{StaticResource textboxStyle}"></TextBox>
  666. </DataTemplate>
  667. </DataGridTemplateColumn.CellTemplate>
  668. </DataGridTemplateColumn>
  669. <DataGridTextColumn Width="0.2*" Header="温度" Binding="{Binding Temperature}" ElementStyle="{StaticResource dgCellstyle }">
  670. </DataGridTextColumn>
  671. <DataGridTextColumn Width="0.2*" Header="火力" Binding="{Binding HotPower}" ElementStyle="{StaticResource dgCellstyle }">
  672. </DataGridTextColumn>
  673. <DataGridTextColumn Width="0.2*" Header="搅拌速度" Binding="{Binding Speed}" ElementStyle="{StaticResource dgCellstyle }">
  674. </DataGridTextColumn>
  675. <DataGridTextColumn Width="0.2*" Header="炒锅载重" Binding="{Binding FryPotWeight}" ElementStyle="{StaticResource dgCellstyle }">
  676. </DataGridTextColumn>
  677. <DataGridTextColumn Width="0.2*" Header="配方用油量" Binding="{Binding OilCapacity}" ElementStyle="{StaticResource dgCellstyle }">
  678. </DataGridTextColumn>
  679. <DataGridTextColumn Width="0.2*" Header="总用油量" Binding="{Binding TotalOilCapactiy}" ElementStyle="{StaticResource dgCellstyle }">
  680. </DataGridTextColumn>
  681. <DataGridTextColumn Width="0.2*" Header="产量" Binding="{Binding TotalProduct}" ElementStyle="{StaticResource dgCellstyle }">
  682. </DataGridTextColumn>
  683. <DataGridTextColumn Width="0.2*" Header="时间" Binding="{Binding Time}" ElementStyle="{StaticResource dgCellstyle }">
  684. </DataGridTextColumn>
  685. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址">
  686. <DataGridTemplateColumn.CellTemplate>
  687. <DataTemplate>
  688. <TextBox Text="{Binding PlcAddress}" Style="{StaticResource textboxStyle}"></TextBox>
  689. </DataTemplate>
  690. </DataGridTemplateColumn.CellTemplate>
  691. </DataGridTemplateColumn>-->
  692. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址长度">
  693. <DataGridTemplateColumn.CellTemplate>
  694. <DataTemplate>
  695. <TextBox Text="{Binding Length}" Style="{StaticResource textboxStyle}"></TextBox>
  696. </DataTemplate>
  697. </DataGridTemplateColumn.CellTemplate>
  698. </DataGridTemplateColumn>-->
  699. </DataGrid.Columns>
  700. </DataGrid>
  701. <DataGrid x:Name="fryFive" Grid.Row="1" Visibility="{Binding fryFiveDataVisible}" ItemsSource="{Binding StatusFive}" GridLinesVisibility="All" Background="Transparent"
  702. AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource dataGrid}"
  703. ColumnHeaderStyle="{StaticResource ColumHeaderStyle}" RowStyle="{StaticResource rowStyle}" CellStyle="{StaticResource cellStyle}">
  704. <DataGrid.Columns>
  705. <DataGridTemplateColumn IsReadOnly="True" Width="0.1*" Header="ID">
  706. <DataGridTemplateColumn.CellTemplate>
  707. <DataTemplate>
  708. <TextBox Text="{Binding Id}" IsReadOnly="False" Style="{StaticResource textboxStyle}"></TextBox>
  709. </DataTemplate>
  710. </DataGridTemplateColumn.CellTemplate>
  711. </DataGridTemplateColumn>
  712. <DataGridTextColumn Width="0.2*" Header="温度" Binding="{Binding Temperature}" ElementStyle="{StaticResource dgCellstyle }">
  713. </DataGridTextColumn>
  714. <DataGridTextColumn Width="0.2*" Header="火力" Binding="{Binding HotPower}" ElementStyle="{StaticResource dgCellstyle }">
  715. </DataGridTextColumn>
  716. <DataGridTextColumn Width="0.2*" Header="搅拌速度" Binding="{Binding Speed}" ElementStyle="{StaticResource dgCellstyle }">
  717. </DataGridTextColumn>
  718. <DataGridTextColumn Width="0.2*" Header="炒锅载重" Binding="{Binding FryPotWeight}" ElementStyle="{StaticResource dgCellstyle }">
  719. </DataGridTextColumn>
  720. <DataGridTextColumn Width="0.2*" Header="配方用油量" Binding="{Binding OilCapacity}" ElementStyle="{StaticResource dgCellstyle }">
  721. </DataGridTextColumn>
  722. <DataGridTextColumn Width="0.2*" Header="总用油量" Binding="{Binding TotalOilCapactiy}" ElementStyle="{StaticResource dgCellstyle }">
  723. </DataGridTextColumn>
  724. <DataGridTextColumn Width="0.2*" Header="产量" Binding="{Binding TotalProduct}" ElementStyle="{StaticResource dgCellstyle }">
  725. </DataGridTextColumn>
  726. <DataGridTextColumn Width="0.2*" Header="时间" Binding="{Binding Time}" ElementStyle="{StaticResource dgCellstyle }">
  727. </DataGridTextColumn>
  728. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址">
  729. <DataGridTemplateColumn.CellTemplate>
  730. <DataTemplate>
  731. <TextBox Text="{Binding PlcAddress}" Style="{StaticResource textboxStyle}"></TextBox>
  732. </DataTemplate>
  733. </DataGridTemplateColumn.CellTemplate>
  734. </DataGridTemplateColumn>-->
  735. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址长度">
  736. <DataGridTemplateColumn.CellTemplate>
  737. <DataTemplate>
  738. <TextBox Text="{Binding Length}" Style="{StaticResource textboxStyle}"></TextBox>
  739. </DataTemplate>
  740. </DataGridTemplateColumn.CellTemplate>
  741. </DataGridTemplateColumn>-->
  742. </DataGrid.Columns>
  743. </DataGrid>
  744. </Grid>
  745. </UserControl>