终端一体化运控平台
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

285 linhas
13 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.JXJFoodSmallStation.View.DeviceMaterialParView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:con="clr-namespace:BPASmartClient.JXJFoodSmallStation.Converter"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:BPASmartClient.JXJFoodSmallStation.View"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:vm="clr-namespace:BPASmartClient.JXJFoodSmallStation.ViewModel"
  10. d:DesignHeight="1080"
  11. d:DesignWidth="1920"
  12. mc:Ignorable="d">
  13. <UserControl.DataContext>
  14. <vm:DeviceMaterialParViewModel />
  15. </UserControl.DataContext>
  16. <UserControl.Resources>
  17. <ResourceDictionary>
  18. <ResourceDictionary.MergedDictionaries>
  19. <ResourceDictionary Source="/BPASmartClient.JXJFoodSmallStation;component/Resource/MyStyle.xaml" />
  20. </ResourceDictionary.MergedDictionaries>
  21. </ResourceDictionary>
  22. </UserControl.Resources>
  23. <Grid Margin="10">
  24. <Grid.RowDefinitions>
  25. <RowDefinition Height="40" />
  26. <RowDefinition Height="40" />
  27. <RowDefinition />
  28. </Grid.RowDefinitions>
  29. <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
  30. <Button
  31. Width="150"
  32. Height="40"
  33. Margin="10,0,10,0"
  34. Command="{Binding AddCommand}"
  35. Content="添加原料参数"
  36. FontSize="20"
  37. Style="{StaticResource ImageButtonStyle}" />
  38. <Button
  39. Width="150"
  40. Height="40"
  41. Margin="10,0,10,0"
  42. Command="{Binding SaveCommand}"
  43. Content="保存参数"
  44. FontSize="20"
  45. Style="{StaticResource ImageButtonStyle}" />
  46. </StackPanel>
  47. <!--#region 表格标题栏设置-->
  48. <Grid
  49. Grid.Row="1"
  50. Margin="0,10,0,0"
  51. Background="#ff0C255F">
  52. <Grid.ColumnDefinitions>
  53. <ColumnDefinition />
  54. <ColumnDefinition />
  55. <ColumnDefinition />
  56. <ColumnDefinition />
  57. <ColumnDefinition />
  58. <ColumnDefinition />
  59. <ColumnDefinition />
  60. <ColumnDefinition />
  61. <ColumnDefinition />
  62. <ColumnDefinition />
  63. <ColumnDefinition />
  64. </Grid.ColumnDefinitions>
  65. <TextBlock
  66. Grid.Column="0"
  67. Style="{StaticResource TitleTextblockStyle}"
  68. Text="原料名称" />
  69. <Grid Grid.Column="1">
  70. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="慢加重量(g)" />
  71. <Border
  72. BorderBrush="{StaticResource bordColor}"
  73. BorderThickness="1,0,1,0"
  74. Cursor="SizeWE" />
  75. </Grid>
  76. <TextBlock
  77. Grid.Column="2"
  78. Style="{StaticResource TitleTextblockStyle}"
  79. Text="提前关阀重量" />
  80. <Grid Grid.Column="3">
  81. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="快加速度" />
  82. <Border
  83. BorderBrush="{StaticResource bordColor}"
  84. BorderThickness="1,0,1,0"
  85. Cursor="SizeWE" />
  86. </Grid>
  87. <TextBlock
  88. Grid.Column="4"
  89. Style="{StaticResource TitleTextblockStyle}"
  90. Text="慢加速度" />
  91. <Grid Grid.Column="5">
  92. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="伺服手动速度" />
  93. <Border
  94. BorderBrush="{StaticResource bordColor}"
  95. BorderThickness="1,0,1,0"
  96. Cursor="SizeWE" />
  97. </Grid>
  98. <TextBlock
  99. Grid.Column="6"
  100. Style="{StaticResource TitleTextblockStyle}"
  101. Text="料仓上限重量" />
  102. <Grid Grid.Column="7">
  103. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="料仓下限重量" />
  104. <Border
  105. BorderBrush="{StaticResource bordColor}"
  106. BorderThickness="1,0,1,0"
  107. Cursor="SizeWE" />
  108. </Grid>
  109. <TextBlock
  110. Grid.Column="8"
  111. Style="{StaticResource TitleTextblockStyle}"
  112. Text="搅拌速度" />
  113. <Grid Grid.Column="9">
  114. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="精度误差阈值(±g)" />
  115. <Border
  116. BorderBrush="{StaticResource bordColor}"
  117. BorderThickness="1,0,1,0"
  118. Cursor="SizeWE" />
  119. </Grid>
  120. <Grid Grid.Column="10">
  121. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="功能操作" />
  122. <Border
  123. BorderBrush="{StaticResource bordColor}"
  124. BorderThickness="1,0,1,0"
  125. Cursor="SizeWE" />
  126. </Grid>
  127. <Border
  128. Grid.ColumnSpan="11"
  129. BorderBrush="{StaticResource bordColor}"
  130. BorderThickness="1,0,1,0" />
  131. </Grid>
  132. <!--#endregion-->
  133. <Grid Grid.Row="2">
  134. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
  135. <ItemsControl ItemsSource="{Binding deviceParModels}">
  136. <ItemsControl.ItemTemplate>
  137. <DataTemplate>
  138. <Grid Name="gr" Height="30">
  139. <Grid.ColumnDefinitions>
  140. <ColumnDefinition />
  141. <ColumnDefinition />
  142. <ColumnDefinition />
  143. <ColumnDefinition />
  144. <ColumnDefinition />
  145. <ColumnDefinition />
  146. <ColumnDefinition />
  147. <ColumnDefinition />
  148. <ColumnDefinition />
  149. <ColumnDefinition />
  150. <ColumnDefinition />
  151. </Grid.ColumnDefinitions>
  152. <TextBox
  153. Grid.Column="0"
  154. Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
  155. Style="{StaticResource InputTextboxStyle}"
  156. Text="{Binding MaterialName}" />
  157. <Grid Grid.Column="1">
  158. <TextBox
  159. Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
  160. Style="{StaticResource InputTextboxStyle}"
  161. Text="{Binding SlowlyAddWeight}" />
  162. <Border
  163. BorderBrush="{StaticResource bordColor}"
  164. BorderThickness="1,0,1,0"
  165. Cursor="SizeWE" />
  166. </Grid>
  167. <TextBox
  168. Grid.Column="2"
  169. Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
  170. Style="{StaticResource InputTextboxStyle}"
  171. Text="{Binding PreCloseValveWeight}" />
  172. <Grid Grid.Column="3">
  173. <TextBox
  174. Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
  175. Style="{StaticResource InputTextboxStyle}"
  176. Text="{Binding RapidAcceleration}" />
  177. <Border
  178. BorderBrush="{StaticResource bordColor}"
  179. BorderThickness="1,0,1,0"
  180. Cursor="SizeWE" />
  181. </Grid>
  182. <TextBox
  183. Grid.Column="4"
  184. Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
  185. Style="{StaticResource InputTextboxStyle}"
  186. Text="{Binding SlowAcceleration}" />
  187. <Grid Grid.Column="5">
  188. <TextBox
  189. Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
  190. Style="{StaticResource InputTextboxStyle}"
  191. Text="{Binding ServoManualSpeed}" />
  192. <Border
  193. BorderBrush="{StaticResource bordColor}"
  194. BorderThickness="1,0,1,0"
  195. Cursor="SizeWE" />
  196. </Grid>
  197. <TextBox
  198. Grid.Column="6"
  199. Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
  200. Style="{StaticResource InputTextboxStyle}"
  201. Text="{Binding SiloUpperLimitWeight}" />
  202. <Grid Grid.Column="7">
  203. <TextBox
  204. Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
  205. Style="{StaticResource InputTextboxStyle}"
  206. Text="{Binding LowerLimitWeightOfSilo}" />
  207. <Border
  208. BorderBrush="{StaticResource bordColor}"
  209. BorderThickness="1,0,1,0"
  210. Cursor="SizeWE" />
  211. </Grid>
  212. <TextBox
  213. Grid.Column="8"
  214. Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
  215. Style="{StaticResource InputTextboxStyle}"
  216. Text="{Binding StirringSpeed}" />
  217. <Grid Grid.Column="9">
  218. <TextBox
  219. Foreground="Red"
  220. Style="{StaticResource InputTextboxStyle}"
  221. Text="{Binding ErrorRange}" />
  222. <Border
  223. BorderBrush="{StaticResource bordColor}"
  224. BorderThickness="1,0,1,0"
  225. Cursor="SizeWE" />
  226. </Grid>
  227. <Button
  228. Grid.Column="10"
  229. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  230. CommandParameter="{Binding MaterialName}"
  231. Content="删除"
  232. FontSize="16"
  233. Style="{StaticResource ControlButtonStyle}" />
  234. <Border
  235. Grid.ColumnSpan="11"
  236. BorderBrush="{StaticResource bordColor}"
  237. BorderThickness="1,0,1,1" />
  238. </Grid>
  239. <DataTemplate.Triggers>
  240. <Trigger Property="IsMouseOver" Value="true">
  241. <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
  242. </Trigger>
  243. </DataTemplate.Triggers>
  244. </DataTemplate>
  245. </ItemsControl.ItemTemplate>
  246. </ItemsControl>
  247. </ScrollViewer>
  248. </Grid>
  249. </Grid>
  250. </UserControl>