终端一体化运控平台
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

371 satır
17 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. <SolidColorBrush x:Key="tabColor" Color="#FF2AB2E7" />
  18. <!--<SolidColorBrush x:Key="bordColor" Color="#33ffffff" />-->
  19. <SolidColorBrush x:Key="bordColor" Color="#332AB2E7" />
  20. <con:DataTableRedundantConverter x:Key="tabConvert" />
  21. <Style x:Key="RowRadioButtonStyle" TargetType="{x:Type RadioButton}">
  22. <Setter Property="Template">
  23. <Setter.Value>
  24. <ControlTemplate TargetType="{x:Type RadioButton}">
  25. <Border
  26. x:Name="NvaBor"
  27. Background="Transparent"
  28. BorderBrush="#FF2AB2E7"
  29. BorderThickness="0">
  30. <ContentControl
  31. Margin="10,4"
  32. HorizontalAlignment="Center"
  33. VerticalAlignment="Center"
  34. HorizontalContentAlignment="Center"
  35. VerticalContentAlignment="Center"
  36. Content="{TemplateBinding Content}"
  37. FontSize="16" />
  38. </Border>
  39. <ControlTemplate.Triggers>
  40. <Trigger Property="IsChecked" Value="True">
  41. <Setter TargetName="NvaBor" Property="Background" Value="#22ffffff" />
  42. <Setter TargetName="NvaBor" Property="BorderThickness" Value="0" />
  43. </Trigger>
  44. <MultiTrigger>
  45. <MultiTrigger.Conditions>
  46. <Condition Property="IsChecked" Value="false" />
  47. <Condition Property="IsMouseOver" Value="True" />
  48. </MultiTrigger.Conditions>
  49. <MultiTrigger.Setters>
  50. <Setter TargetName="NvaBor" Property="Background" Value="#22ffffff" />
  51. </MultiTrigger.Setters>
  52. </MultiTrigger>
  53. </ControlTemplate.Triggers>
  54. </ControlTemplate>
  55. </Setter.Value>
  56. </Setter>
  57. </Style>
  58. <Style x:Key="InputTextboxStyle" TargetType="TextBox">
  59. <Setter Property="Margin" Value="5,0,0,0" />
  60. <Setter Property="BorderThickness" Value="0" />
  61. <Setter Property="HorizontalAlignment" Value="Left" />
  62. <Setter Property="Width" Value="150" />
  63. <Setter Property="Height" Value="40" />
  64. <Setter Property="CaretBrush" Value="{StaticResource TitleBorderColor}" />
  65. <Setter Property="Foreground" Value="{StaticResource TitleBorderColor}" />
  66. <Setter Property="VerticalContentAlignment" Value="Center" />
  67. <Setter Property="FontSize" Value="14" />
  68. <Setter Property="Background" Value="Transparent" />
  69. <Setter Property="VerticalAlignment" Value="Center" />
  70. </Style>
  71. <Style x:Key="ControlButtonStyle" TargetType="Button">
  72. <Setter Property="Margin" Value="0" />
  73. <Setter Property="FontSize" Value="18" />
  74. <Setter Property="Foreground" Value="#FFF53F62" />
  75. <Setter Property="FontWeight" Value="SemiBold" />
  76. <Setter Property="FontFamily" Value="楷体" />
  77. <Setter Property="VerticalContentAlignment" Value="Center" />
  78. <Setter Property="Template">
  79. <Setter.Value>
  80. <ControlTemplate TargetType="Button">
  81. <Border
  82. Name="TitleBarBr"
  83. BorderBrush="#00c2f4"
  84. BorderThickness="0"
  85. CornerRadius="0"
  86. Opacity="0.8">
  87. <ContentPresenter
  88. Margin="{TemplateBinding Margin}"
  89. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  90. VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  91. <Border.Background>
  92. <ImageBrush
  93. ImageSource="/BPASmartClient.CustomResource;component/Image/组合边框1.1.png"
  94. Opacity="0.8"
  95. Stretch="Fill" />
  96. </Border.Background>
  97. </Border>
  98. <ControlTemplate.Triggers>
  99. <Trigger Property="IsMouseOver" Value="true">
  100. <Setter TargetName="TitleBarBr" Property="Opacity" Value="1" />
  101. </Trigger>
  102. </ControlTemplate.Triggers>
  103. </ControlTemplate>
  104. </Setter.Value>
  105. </Setter>
  106. </Style>
  107. <Style x:Key="TitleTextblockStyle" TargetType="TextBlock">
  108. <Setter Property="FontSize" Value="16" />
  109. <Setter Property="HorizontalAlignment" Value="Center" />
  110. <Setter Property="VerticalAlignment" Value="Center" />
  111. <Setter Property="Foreground" Value="{StaticResource tabColor}" />
  112. <Setter Property="FontFamily" Value="楷体" />
  113. <Setter Property="FontWeight" Value="SemiBold" />
  114. </Style>
  115. </UserControl.Resources>
  116. <Grid Margin="10">
  117. <Grid.RowDefinitions>
  118. <RowDefinition Height="40" />
  119. <RowDefinition Height="40" />
  120. <RowDefinition />
  121. </Grid.RowDefinitions>
  122. <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
  123. <Button
  124. Width="150"
  125. Height="40"
  126. Margin="10,0,10,0"
  127. Command="{Binding AddCommand}"
  128. Content="添加原料参数"
  129. FontSize="20"
  130. Style="{StaticResource ImageButtonStyle}" />
  131. <Button
  132. Width="150"
  133. Height="40"
  134. Margin="10,0,10,0"
  135. Command="{Binding SaveCommand}"
  136. Content="保存参数"
  137. FontSize="20"
  138. Style="{StaticResource ImageButtonStyle}" />
  139. </StackPanel>
  140. <!--#region 表格标题栏设置-->
  141. <Grid
  142. Grid.Row="1"
  143. Margin="0,10,0,0"
  144. Background="#ff0C255F">
  145. <Grid.ColumnDefinitions>
  146. <ColumnDefinition />
  147. <ColumnDefinition />
  148. <ColumnDefinition />
  149. <ColumnDefinition />
  150. <ColumnDefinition />
  151. <ColumnDefinition />
  152. <ColumnDefinition />
  153. <ColumnDefinition />
  154. <ColumnDefinition />
  155. <ColumnDefinition />
  156. </Grid.ColumnDefinitions>
  157. <TextBlock
  158. Grid.Column="0"
  159. Style="{StaticResource TitleTextblockStyle}"
  160. Text="原料名称" />
  161. <Grid Grid.Column="1">
  162. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="慢加重量(g)" />
  163. <Border
  164. BorderBrush="{StaticResource bordColor}"
  165. BorderThickness="1,0,1,0"
  166. Cursor="SizeWE" />
  167. </Grid>
  168. <TextBlock
  169. Grid.Column="2"
  170. Style="{StaticResource TitleTextblockStyle}"
  171. Text="提前关阀重量" />
  172. <Grid Grid.Column="3">
  173. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="快加速度" />
  174. <Border
  175. BorderBrush="{StaticResource bordColor}"
  176. BorderThickness="1,0,1,0"
  177. Cursor="SizeWE" />
  178. </Grid>
  179. <TextBlock
  180. Grid.Column="4"
  181. Style="{StaticResource TitleTextblockStyle}"
  182. Text="慢加速度" />
  183. <Grid Grid.Column="5">
  184. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="伺服手动速度" />
  185. <Border
  186. BorderBrush="{StaticResource bordColor}"
  187. BorderThickness="1,0,1,0"
  188. Cursor="SizeWE" />
  189. </Grid>
  190. <TextBlock
  191. Grid.Column="6"
  192. Style="{StaticResource TitleTextblockStyle}"
  193. Text="料仓上限重量" />
  194. <Grid Grid.Column="7">
  195. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="料仓下限重量" />
  196. <Border
  197. BorderBrush="{StaticResource bordColor}"
  198. BorderThickness="1,0,1,0"
  199. Cursor="SizeWE" />
  200. </Grid>
  201. <TextBlock
  202. Grid.Column="8"
  203. Style="{StaticResource TitleTextblockStyle}"
  204. Text="搅拌速度" />
  205. <Grid Grid.Column="9">
  206. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="功能操作" />
  207. <Border
  208. BorderBrush="{StaticResource bordColor}"
  209. BorderThickness="1,0,1,0"
  210. Cursor="SizeWE" />
  211. </Grid>
  212. <Border
  213. Grid.ColumnSpan="10"
  214. BorderBrush="{StaticResource bordColor}"
  215. BorderThickness="1,0,1,0" />
  216. </Grid>
  217. <!--#endregion-->
  218. <Grid Grid.Row="2">
  219. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
  220. <ItemsControl ItemsSource="{Binding deviceParModels}">
  221. <ItemsControl.ItemTemplate>
  222. <DataTemplate>
  223. <Grid Name="gr" Height="30">
  224. <Grid.ColumnDefinitions>
  225. <ColumnDefinition />
  226. <ColumnDefinition />
  227. <ColumnDefinition />
  228. <ColumnDefinition />
  229. <ColumnDefinition />
  230. <ColumnDefinition />
  231. <ColumnDefinition />
  232. <ColumnDefinition />
  233. <ColumnDefinition />
  234. <ColumnDefinition />
  235. </Grid.ColumnDefinitions>
  236. <TextBox
  237. Grid.Column="0"
  238. Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
  239. Style="{StaticResource InputTextboxStyle}"
  240. Text="{Binding MaterialName}" />
  241. <Grid Grid.Column="1">
  242. <TextBox
  243. Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
  244. Style="{StaticResource InputTextboxStyle}"
  245. Text="{Binding SlowlyAddWeight}" />
  246. <Border
  247. BorderBrush="{StaticResource bordColor}"
  248. BorderThickness="1,0,1,0"
  249. Cursor="SizeWE" />
  250. </Grid>
  251. <TextBox
  252. Grid.Column="2"
  253. Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
  254. Style="{StaticResource InputTextboxStyle}"
  255. Text="{Binding PreCloseValveWeight}" />
  256. <Grid Grid.Column="3">
  257. <TextBox
  258. Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
  259. Style="{StaticResource InputTextboxStyle}"
  260. Text="{Binding RapidAcceleration}" />
  261. <Border
  262. BorderBrush="{StaticResource bordColor}"
  263. BorderThickness="1,0,1,0"
  264. Cursor="SizeWE" />
  265. </Grid>
  266. <TextBox
  267. Grid.Column="4"
  268. Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
  269. Style="{StaticResource InputTextboxStyle}"
  270. Text="{Binding SlowAcceleration}" />
  271. <Grid Grid.Column="5">
  272. <TextBox
  273. Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
  274. Style="{StaticResource InputTextboxStyle}"
  275. Text="{Binding ServoManualSpeed}" />
  276. <Border
  277. BorderBrush="{StaticResource bordColor}"
  278. BorderThickness="1,0,1,0"
  279. Cursor="SizeWE" />
  280. </Grid>
  281. <TextBox
  282. Grid.Column="6"
  283. Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
  284. Style="{StaticResource InputTextboxStyle}"
  285. Text="{Binding SiloUpperLimitWeight}" />
  286. <Grid Grid.Column="7">
  287. <TextBox
  288. Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
  289. Style="{StaticResource InputTextboxStyle}"
  290. Text="{Binding LowerLimitWeightOfSilo}" />
  291. <Border
  292. BorderBrush="{StaticResource bordColor}"
  293. BorderThickness="1,0,1,0"
  294. Cursor="SizeWE" />
  295. </Grid>
  296. <TextBox
  297. Grid.Column="8"
  298. Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
  299. Style="{StaticResource InputTextboxStyle}"
  300. Text="{Binding StirringSpeed}" />
  301. <Grid Grid.Column="9">
  302. <Button
  303. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  304. CommandParameter="{Binding MaterialName}"
  305. Content="删除"
  306. FontSize="16"
  307. Style="{StaticResource ControlButtonStyle}" />
  308. <Border
  309. BorderBrush="{StaticResource bordColor}"
  310. BorderThickness="1,0,1,0"
  311. Cursor="SizeWE" />
  312. </Grid>
  313. <Border
  314. Grid.ColumnSpan="10"
  315. BorderBrush="{StaticResource bordColor}"
  316. BorderThickness="1,0,1,1" />
  317. </Grid>
  318. <DataTemplate.Triggers>
  319. <Trigger Property="IsMouseOver" Value="true">
  320. <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
  321. </Trigger>
  322. </DataTemplate.Triggers>
  323. </DataTemplate>
  324. </ItemsControl.ItemTemplate>
  325. </ItemsControl>
  326. </ScrollViewer>
  327. </Grid>
  328. </Grid>
  329. </UserControl>