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

SqliteDataView.xaml 56 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年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755
  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="0"/>
  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.05*" 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.1*" Header="温度" Binding="{Binding Temperature}" ElementStyle="{StaticResource dgCellstyle }">
  496. </DataGridTextColumn>
  497. <DataGridTextColumn Width="0.1*" Header="搅拌速度" Binding="{Binding Speed}" ElementStyle="{StaticResource dgCellstyle }">
  498. </DataGridTextColumn>
  499. <DataGridTextColumn Width="0.1*" Header="炒锅载重" Binding="{Binding FryPotWeight}" ElementStyle="{StaticResource dgCellstyle }">
  500. </DataGridTextColumn>
  501. <DataGridTextColumn Width="0.1*" Header="小火比例" Binding="{Binding SmallFire}" ElementStyle="{StaticResource dgCellstyle }">
  502. </DataGridTextColumn>
  503. <DataGridTextColumn Width="0.1*" Header="中火比例" Binding="{Binding MidFire}" ElementStyle="{StaticResource dgCellstyle }">
  504. </DataGridTextColumn>
  505. <DataGridTextColumn Width="0.1*" Header="大火比例" Binding="{Binding BigFire}" ElementStyle="{StaticResource dgCellstyle }">
  506. </DataGridTextColumn>
  507. <DataGridTextColumn Width="0.1*" Header="强火比例" Binding="{Binding StrongFire}" ElementStyle="{StaticResource dgCellstyle }">
  508. </DataGridTextColumn>
  509. <DataGridTextColumn Width="0.1*" Header="步数" Binding="{Binding Step}" ElementStyle="{StaticResource dgCellstyle }">
  510. </DataGridTextColumn>
  511. <DataGridTextColumn Width="0.1*" Header="配方名称" Binding="{Binding RecipeName}" ElementStyle="{StaticResource dgCellstyle }">
  512. </DataGridTextColumn>
  513. <DataGridTextColumn Width="0.1*" Header="配方用油量" Binding="{Binding OilCapacity}" ElementStyle="{StaticResource dgCellstyle }">
  514. </DataGridTextColumn>
  515. <DataGridTextColumn Width="0.1*" Header="总用油量" Binding="{Binding TotalOilCapactiy}" ElementStyle="{StaticResource dgCellstyle }">
  516. </DataGridTextColumn>
  517. <DataGridTextColumn Width="0.1*" Header="产量" Binding="{Binding TotalProduct}" ElementStyle="{StaticResource dgCellstyle }">
  518. </DataGridTextColumn>
  519. <DataGridTextColumn Width="0.15*" Header="时间" Binding="{Binding Time}" ElementStyle="{StaticResource dgCellstyle }">
  520. </DataGridTextColumn>
  521. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址">
  522. <DataGridTemplateColumn.CellTemplate>
  523. <DataTemplate>
  524. <TextBox Text="{Binding PlcAddress}" Style="{StaticResource textboxStyle}"></TextBox>
  525. </DataTemplate>
  526. </DataGridTemplateColumn.CellTemplate>
  527. </DataGridTemplateColumn>-->
  528. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址长度">
  529. <DataGridTemplateColumn.CellTemplate>
  530. <DataTemplate>
  531. <TextBox Text="{Binding Length}" Style="{StaticResource textboxStyle}"></TextBox>
  532. </DataTemplate>
  533. </DataGridTemplateColumn.CellTemplate>
  534. </DataGridTemplateColumn>-->
  535. </DataGrid.Columns>
  536. </DataGrid>
  537. <!--<DataGrid Grid.Row="1" x:Name="fryOne" Visibility="{Binding fryOneDataVisible}" ItemsSource="{Binding StatusOne}" GridLinesVisibility="All" Background="Transparent"
  538. AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource dataGrid}"
  539. ColumnHeaderStyle="{StaticResource ColumHeaderStyle}" RowStyle="{StaticResource rowStyle}" CellStyle="{StaticResource cellStyle}">
  540. <DataGrid.Columns>
  541. <DataGridTemplateColumn IsReadOnly="True" Width="0.1*" Header="ID">
  542. <DataGridTemplateColumn.CellTemplate>
  543. <DataTemplate>
  544. <TextBox Text="{Binding Id}" IsReadOnly="False" Style="{StaticResource textboxStyle}"></TextBox>
  545. </DataTemplate>
  546. </DataGridTemplateColumn.CellTemplate>
  547. </DataGridTemplateColumn>
  548. <DataGridTextColumn Width="0.2*" Header="温度" Binding="{Binding Temperature}" ElementStyle="{StaticResource dgCellstyle }">
  549. </DataGridTextColumn>
  550. <DataGridTextColumn Width="0.2*" Header="火力" Binding="{Binding HotPower}" ElementStyle="{StaticResource dgCellstyle }">
  551. </DataGridTextColumn>
  552. <DataGridTextColumn Width="0.2*" Header="搅拌速度" Binding="{Binding Speed}" ElementStyle="{StaticResource dgCellstyle }">
  553. </DataGridTextColumn>
  554. <DataGridTextColumn Width="0.2*" Header="炒锅载重" Binding="{Binding FryPotWeight}" ElementStyle="{StaticResource dgCellstyle }">
  555. </DataGridTextColumn>
  556. <DataGridTextColumn Width="0.2*" Header="配方用油量" Binding="{Binding OilCapacity}" ElementStyle="{StaticResource dgCellstyle }">
  557. </DataGridTextColumn>
  558. <DataGridTextColumn Width="0.2*" Header="总用油量" Binding="{Binding TotalOilCapactiy}" ElementStyle="{StaticResource dgCellstyle }">
  559. </DataGridTextColumn>
  560. <DataGridTextColumn Width="0.2*" Header="产量" Binding="{Binding TotalProduct}" ElementStyle="{StaticResource dgCellstyle }">
  561. </DataGridTextColumn>
  562. <DataGridTextColumn Width="0.2*" Header="时间" Binding="{Binding Time}" ElementStyle="{StaticResource dgCellstyle }">
  563. </DataGridTextColumn>
  564. --><!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址">
  565. <DataGridTemplateColumn.CellTemplate>
  566. <DataTemplate>
  567. <TextBox Text="{Binding PlcAddress}" Style="{StaticResource textboxStyle}"></TextBox>
  568. </DataTemplate>
  569. </DataGridTemplateColumn.CellTemplate>
  570. </DataGridTemplateColumn>-->
  571. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址长度">
  572. <DataGridTemplateColumn.CellTemplate>
  573. <DataTemplate>
  574. <TextBox Text="{Binding Length}" Style="{StaticResource textboxStyle}"></TextBox>
  575. </DataTemplate>
  576. </DataGridTemplateColumn.CellTemplate>
  577. </DataGridTemplateColumn>--><!--
  578. </DataGrid.Columns>
  579. </DataGrid>-->
  580. <DataGrid x:Name="fryTwo" Grid.Row="1" Visibility="{Binding fryTwoDataVisible}" ItemsSource="{Binding StatusTwo}" GridLinesVisibility="All" Background="Transparent"
  581. AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource dataGrid}"
  582. ColumnHeaderStyle="{StaticResource ColumHeaderStyle}" RowStyle="{StaticResource rowStyle}" CellStyle="{StaticResource cellStyle}">
  583. <DataGrid.Columns>
  584. <DataGridTemplateColumn IsReadOnly="True" Width="0.1*" Header="ID">
  585. <DataGridTemplateColumn.CellTemplate>
  586. <DataTemplate>
  587. <TextBox Text="{Binding Id}" IsReadOnly="False" Style="{StaticResource textboxStyle}"></TextBox>
  588. </DataTemplate>
  589. </DataGridTemplateColumn.CellTemplate>
  590. </DataGridTemplateColumn>
  591. <DataGridTextColumn Width="0.2*" Header="温度" Binding="{Binding Temperature}" ElementStyle="{StaticResource dgCellstyle }">
  592. </DataGridTextColumn>
  593. <DataGridTextColumn Width="0.2*" Header="火力" Binding="{Binding HotPower}" ElementStyle="{StaticResource dgCellstyle }">
  594. </DataGridTextColumn>
  595. <DataGridTextColumn Width="0.2*" Header="搅拌速度" Binding="{Binding Speed}" ElementStyle="{StaticResource dgCellstyle }">
  596. </DataGridTextColumn>
  597. <DataGridTextColumn Width="0.2*" Header="炒锅载重" Binding="{Binding FryPotWeight}" ElementStyle="{StaticResource dgCellstyle }">
  598. </DataGridTextColumn>
  599. <DataGridTextColumn Width="0.2*" Header="配方用油量" Binding="{Binding OilCapacity}" ElementStyle="{StaticResource dgCellstyle }">
  600. </DataGridTextColumn>
  601. <DataGridTextColumn Width="0.2*" Header="总用油量" Binding="{Binding TotalOilCapactiy}" ElementStyle="{StaticResource dgCellstyle }">
  602. </DataGridTextColumn>
  603. <DataGridTextColumn Width="0.2*" Header="产量" Binding="{Binding TotalProduct}" ElementStyle="{StaticResource dgCellstyle }">
  604. </DataGridTextColumn>
  605. <DataGridTextColumn Width="0.2*" Header="时间" Binding="{Binding Time}" ElementStyle="{StaticResource dgCellstyle }">
  606. </DataGridTextColumn>
  607. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址">
  608. <DataGridTemplateColumn.CellTemplate>
  609. <DataTemplate>
  610. <TextBox Text="{Binding PlcAddress}" Style="{StaticResource textboxStyle}"></TextBox>
  611. </DataTemplate>
  612. </DataGridTemplateColumn.CellTemplate>
  613. </DataGridTemplateColumn>-->
  614. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址长度">
  615. <DataGridTemplateColumn.CellTemplate>
  616. <DataTemplate>
  617. <TextBox Text="{Binding Length}" Style="{StaticResource textboxStyle}"></TextBox>
  618. </DataTemplate>
  619. </DataGridTemplateColumn.CellTemplate>
  620. </DataGridTemplateColumn>-->
  621. </DataGrid.Columns>
  622. </DataGrid>
  623. <DataGrid x:Name="fryThree" Grid.Row="1" Visibility="{Binding fryThreeDataVisible}" ItemsSource="{Binding StatusThree}" GridLinesVisibility="All" Background="Transparent"
  624. AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource dataGrid}"
  625. ColumnHeaderStyle="{StaticResource ColumHeaderStyle}" RowStyle="{StaticResource rowStyle}" CellStyle="{StaticResource cellStyle}">
  626. <DataGrid.Columns>
  627. <DataGridTemplateColumn IsReadOnly="True" Width="0.1*" Header="ID">
  628. <DataGridTemplateColumn.CellTemplate>
  629. <DataTemplate>
  630. <TextBox Text="{Binding Id}" IsReadOnly="False" Style="{StaticResource textboxStyle}"></TextBox>
  631. </DataTemplate>
  632. </DataGridTemplateColumn.CellTemplate>
  633. </DataGridTemplateColumn>
  634. <DataGridTextColumn Width="0.2*" Header="温度" Binding="{Binding Temperature}" ElementStyle="{StaticResource dgCellstyle }">
  635. </DataGridTextColumn>
  636. <DataGridTextColumn Width="0.2*" Header="火力" Binding="{Binding HotPower}" ElementStyle="{StaticResource dgCellstyle }">
  637. </DataGridTextColumn>
  638. <DataGridTextColumn Width="0.2*" Header="搅拌速度" Binding="{Binding Speed}" ElementStyle="{StaticResource dgCellstyle }">
  639. </DataGridTextColumn>
  640. <DataGridTextColumn Width="0.2*" Header="炒锅载重" Binding="{Binding FryPotWeight}" ElementStyle="{StaticResource dgCellstyle }">
  641. </DataGridTextColumn>
  642. <DataGridTextColumn Width="0.2*" Header="配方用油量" Binding="{Binding OilCapacity}" ElementStyle="{StaticResource dgCellstyle }">
  643. </DataGridTextColumn>
  644. <DataGridTextColumn Width="0.2*" Header="总用油量" Binding="{Binding TotalOilCapactiy}" ElementStyle="{StaticResource dgCellstyle }">
  645. </DataGridTextColumn>
  646. <DataGridTextColumn Width="0.2*" Header="产量" Binding="{Binding TotalProduct}" ElementStyle="{StaticResource dgCellstyle }">
  647. </DataGridTextColumn>
  648. <DataGridTextColumn Width="0.2*" Header="时间" Binding="{Binding Time}" ElementStyle="{StaticResource dgCellstyle }">
  649. </DataGridTextColumn>
  650. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址">
  651. <DataGridTemplateColumn.CellTemplate>
  652. <DataTemplate>
  653. <TextBox Text="{Binding PlcAddress}" Style="{StaticResource textboxStyle}"></TextBox>
  654. </DataTemplate>
  655. </DataGridTemplateColumn.CellTemplate>
  656. </DataGridTemplateColumn>-->
  657. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址长度">
  658. <DataGridTemplateColumn.CellTemplate>
  659. <DataTemplate>
  660. <TextBox Text="{Binding Length}" Style="{StaticResource textboxStyle}"></TextBox>
  661. </DataTemplate>
  662. </DataGridTemplateColumn.CellTemplate>
  663. </DataGridTemplateColumn>-->
  664. </DataGrid.Columns>
  665. </DataGrid>
  666. <DataGrid x:Name="fryFour" Grid.Row="1" Visibility="{Binding fryFourDataVisible}" ItemsSource="{Binding StatusFour}" GridLinesVisibility="All" Background="Transparent"
  667. AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource dataGrid}"
  668. ColumnHeaderStyle="{StaticResource ColumHeaderStyle}" RowStyle="{StaticResource rowStyle}" CellStyle="{StaticResource cellStyle}">
  669. <DataGrid.Columns>
  670. <DataGridTemplateColumn IsReadOnly="True" Width="0.1*" Header="ID">
  671. <DataGridTemplateColumn.CellTemplate>
  672. <DataTemplate>
  673. <TextBox Text="{Binding Id}" IsReadOnly="False" Style="{StaticResource textboxStyle}"></TextBox>
  674. </DataTemplate>
  675. </DataGridTemplateColumn.CellTemplate>
  676. </DataGridTemplateColumn>
  677. <DataGridTextColumn Width="0.2*" Header="温度" Binding="{Binding Temperature}" ElementStyle="{StaticResource dgCellstyle }">
  678. </DataGridTextColumn>
  679. <DataGridTextColumn Width="0.2*" Header="火力" Binding="{Binding HotPower}" ElementStyle="{StaticResource dgCellstyle }">
  680. </DataGridTextColumn>
  681. <DataGridTextColumn Width="0.2*" Header="搅拌速度" Binding="{Binding Speed}" ElementStyle="{StaticResource dgCellstyle }">
  682. </DataGridTextColumn>
  683. <DataGridTextColumn Width="0.2*" Header="炒锅载重" Binding="{Binding FryPotWeight}" ElementStyle="{StaticResource dgCellstyle }">
  684. </DataGridTextColumn>
  685. <DataGridTextColumn Width="0.2*" Header="配方用油量" Binding="{Binding OilCapacity}" ElementStyle="{StaticResource dgCellstyle }">
  686. </DataGridTextColumn>
  687. <DataGridTextColumn Width="0.2*" Header="总用油量" Binding="{Binding TotalOilCapactiy}" ElementStyle="{StaticResource dgCellstyle }">
  688. </DataGridTextColumn>
  689. <DataGridTextColumn Width="0.2*" Header="产量" Binding="{Binding TotalProduct}" ElementStyle="{StaticResource dgCellstyle }">
  690. </DataGridTextColumn>
  691. <DataGridTextColumn Width="0.2*" Header="时间" Binding="{Binding Time}" ElementStyle="{StaticResource dgCellstyle }">
  692. </DataGridTextColumn>
  693. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址">
  694. <DataGridTemplateColumn.CellTemplate>
  695. <DataTemplate>
  696. <TextBox Text="{Binding PlcAddress}" Style="{StaticResource textboxStyle}"></TextBox>
  697. </DataTemplate>
  698. </DataGridTemplateColumn.CellTemplate>
  699. </DataGridTemplateColumn>-->
  700. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址长度">
  701. <DataGridTemplateColumn.CellTemplate>
  702. <DataTemplate>
  703. <TextBox Text="{Binding Length}" Style="{StaticResource textboxStyle}"></TextBox>
  704. </DataTemplate>
  705. </DataGridTemplateColumn.CellTemplate>
  706. </DataGridTemplateColumn>-->
  707. </DataGrid.Columns>
  708. </DataGrid>
  709. <DataGrid x:Name="fryFive" Grid.Row="1" Visibility="{Binding fryFiveDataVisible}" ItemsSource="{Binding StatusFive}" GridLinesVisibility="All" Background="Transparent"
  710. AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource dataGrid}"
  711. ColumnHeaderStyle="{StaticResource ColumHeaderStyle}" RowStyle="{StaticResource rowStyle}" CellStyle="{StaticResource cellStyle}">
  712. <DataGrid.Columns>
  713. <DataGridTemplateColumn IsReadOnly="True" Width="0.1*" Header="ID">
  714. <DataGridTemplateColumn.CellTemplate>
  715. <DataTemplate>
  716. <TextBox Text="{Binding Id}" IsReadOnly="False" Style="{StaticResource textboxStyle}"></TextBox>
  717. </DataTemplate>
  718. </DataGridTemplateColumn.CellTemplate>
  719. </DataGridTemplateColumn>
  720. <DataGridTextColumn Width="0.2*" Header="温度" Binding="{Binding Temperature}" ElementStyle="{StaticResource dgCellstyle }">
  721. </DataGridTextColumn>
  722. <DataGridTextColumn Width="0.2*" Header="火力" Binding="{Binding HotPower}" ElementStyle="{StaticResource dgCellstyle }">
  723. </DataGridTextColumn>
  724. <DataGridTextColumn Width="0.2*" Header="搅拌速度" Binding="{Binding Speed}" ElementStyle="{StaticResource dgCellstyle }">
  725. </DataGridTextColumn>
  726. <DataGridTextColumn Width="0.2*" Header="炒锅载重" Binding="{Binding FryPotWeight}" ElementStyle="{StaticResource dgCellstyle }">
  727. </DataGridTextColumn>
  728. <DataGridTextColumn Width="0.2*" Header="配方用油量" Binding="{Binding OilCapacity}" ElementStyle="{StaticResource dgCellstyle }">
  729. </DataGridTextColumn>
  730. <DataGridTextColumn Width="0.2*" Header="总用油量" Binding="{Binding TotalOilCapactiy}" ElementStyle="{StaticResource dgCellstyle }">
  731. </DataGridTextColumn>
  732. <DataGridTextColumn Width="0.2*" Header="产量" Binding="{Binding TotalProduct}" ElementStyle="{StaticResource dgCellstyle }">
  733. </DataGridTextColumn>
  734. <DataGridTextColumn Width="0.2*" Header="时间" Binding="{Binding Time}" ElementStyle="{StaticResource dgCellstyle }">
  735. </DataGridTextColumn>
  736. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址">
  737. <DataGridTemplateColumn.CellTemplate>
  738. <DataTemplate>
  739. <TextBox Text="{Binding PlcAddress}" Style="{StaticResource textboxStyle}"></TextBox>
  740. </DataTemplate>
  741. </DataGridTemplateColumn.CellTemplate>
  742. </DataGridTemplateColumn>-->
  743. <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址长度">
  744. <DataGridTemplateColumn.CellTemplate>
  745. <DataTemplate>
  746. <TextBox Text="{Binding Length}" Style="{StaticResource textboxStyle}"></TextBox>
  747. </DataTemplate>
  748. </DataGridTemplateColumn.CellTemplate>
  749. </DataGridTemplateColumn>-->
  750. </DataGrid.Columns>
  751. </DataGrid>
  752. </Grid>
  753. </UserControl>