终端一体化运控平台
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.
 
 
 

412 satır
18 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.DosingSystem.View.RecipeSettingsView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  10. xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
  11. d:DesignHeight="450"
  12. d:DesignWidth="800"
  13. mc:Ignorable="d">
  14. <UserControl.Resources>
  15. <SolidColorBrush x:Key="BorderSolid" Color="#5523CACA" />
  16. <SolidColorBrush x:Key="FontColor" Color="#FF2AB2E7" />
  17. <SolidColorBrush x:Key="TitleFontColor" Color="#ddd" />
  18. <SolidColorBrush x:Key="CursorColor" Color="Aqua" />
  19. <SolidColorBrush x:Key="TitleBorderColor" Color="#FF2AB2E7" />
  20. <SolidColorBrush x:Key="TextBlockForeground" Color="#9934F7F7" />
  21. <Style x:Key="TextBlockStyle" TargetType="TextBlock">
  22. <Setter Property="FontFamily" Value="楷体" />
  23. <Setter Property="FontSize" Value="20" />
  24. <Setter Property="Background" Value="Transparent" />
  25. <!--<Setter Property="Foreground" Value="{StaticResource FontColor}" />-->
  26. <Setter Property="VerticalAlignment" Value="Center" />
  27. <Setter Property="HorizontalAlignment" Value="Center" />
  28. </Style>
  29. <Style x:Key="buttonStyle" TargetType="Button">
  30. <Setter Property="Background" Value="Transparent" />
  31. <Setter Property="FontSize" Value="16" />
  32. <Setter Property="Foreground" Value="Aqua" />
  33. <Setter Property="HorizontalAlignment" Value="Center" />
  34. <Setter Property="BorderThickness" Value="0" />
  35. </Style>
  36. </UserControl.Resources>
  37. <UserControl.DataContext>
  38. <vm:RecipeSettingsViewModel />
  39. </UserControl.DataContext>
  40. <Grid>
  41. <Grid.RowDefinitions>
  42. <RowDefinition Height="50" />
  43. <RowDefinition Height="30" />
  44. <RowDefinition />
  45. </Grid.RowDefinitions>
  46. <!--#region 操作按钮-->
  47. <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
  48. <pry:IcoButton
  49. Grid.Column="3"
  50. Width="140"
  51. Margin="10"
  52. HorizontalAlignment="Left"
  53. Command="{Binding NewMaterital}"
  54. Content="新建原料"
  55. FontSize="16"
  56. Foreground="Aqua"
  57. IcoText="&#xe626;"
  58. Style="{StaticResource IcoButtonStyle}" />
  59. <pry:IcoButton
  60. Grid.Column="3"
  61. Width="140"
  62. Margin="10"
  63. HorizontalAlignment="Left"
  64. Command="{Binding NewRecipe}"
  65. Content="新建配方"
  66. FontSize="16"
  67. Foreground="Aqua"
  68. IcoText="&#xe626;"
  69. Style="{StaticResource IcoButtonStyle}" />
  70. <pry:IcoButton
  71. Grid.Column="3"
  72. Width="140"
  73. Margin="10"
  74. HorizontalAlignment="Left"
  75. Command="{Binding SaveRecipe}"
  76. Content="保存配方"
  77. FontSize="17"
  78. Foreground="Aqua"
  79. IcoText="&#xe635;"
  80. IsEnabled="True"
  81. Style="{StaticResource IcoButtonStyle}" />
  82. </StackPanel>
  83. <!--#endregion-->
  84. <!--#region 表格标题栏设置-->
  85. <!--<Grid Grid.Row="1" Background="#dd2AB2E7">
  86. <Grid.ColumnDefinitions>
  87. <ColumnDefinition Width="0.3*" />
  88. <ColumnDefinition />
  89. <ColumnDefinition Width="0.7*" />
  90. <ColumnDefinition Width="0.7*" />
  91. <ColumnDefinition Width="0" />
  92. <ColumnDefinition Width="0.7*" />
  93. <ColumnDefinition Width="0.5*" />
  94. </Grid.ColumnDefinitions>
  95. <TextBlock
  96. Grid.Column="0"
  97. HorizontalAlignment="Center"
  98. VerticalAlignment="Center"
  99. FontSize="16"
  100. Foreground="{StaticResource TitleFontColor}"
  101. Text="序号" />
  102. <Grid Grid.Column="1">
  103. <TextBlock
  104. HorizontalAlignment="Center"
  105. VerticalAlignment="Center"
  106. FontSize="16"
  107. Foreground="{StaticResource TitleFontColor}"
  108. Text="配方名称" />
  109. <Border BorderBrush="{StaticResource TitleBorderColor}" BorderThickness="1,0,1,0" />
  110. </Grid>
  111. <TextBlock
  112. Grid.Column="2"
  113. HorizontalAlignment="Center"
  114. VerticalAlignment="Center"
  115. FontSize="16"
  116. Foreground="{StaticResource TitleFontColor}"
  117. Text="编码" />
  118. <Grid Grid.Column="3">
  119. <TextBlock
  120. HorizontalAlignment="Center"
  121. VerticalAlignment="Center"
  122. FontSize="16"
  123. Foreground="{StaticResource TitleFontColor}"
  124. Text="结束时间" />
  125. <Border BorderBrush="{StaticResource TitleBorderColor}" BorderThickness="1,0,1,0" />
  126. </Grid>
  127. <Grid Grid.Column="5">
  128. <TextBlock
  129. HorizontalAlignment="Center"
  130. VerticalAlignment="Center"
  131. FontSize="16"
  132. Foreground="{StaticResource TitleFontColor}"
  133. Text="制作状态" />
  134. <Border BorderBrush="{StaticResource TitleBorderColor}" BorderThickness="0,0,1,0" />
  135. </Grid>
  136. <TextBlock
  137. Grid.Column="6"
  138. HorizontalAlignment="Center"
  139. VerticalAlignment="Center"
  140. FontSize="16"
  141. Foreground="{StaticResource TitleFontColor}"
  142. Text="完成时间" />
  143. </Grid>-->
  144. <!--#endregion-->
  145. <ScrollViewer Grid.Row="2">
  146. <ListView
  147. Margin="5"
  148. VerticalAlignment="Top"
  149. Background="Transparent"
  150. BorderThickness="0"
  151. ItemsSource="{Binding Recipes}"
  152. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  153. <ListView.ItemsPanel>
  154. <ItemsPanelTemplate>
  155. <UniformGrid
  156. HorizontalAlignment="Left"
  157. VerticalAlignment="Top"
  158. Columns="8" />
  159. </ItemsPanelTemplate>
  160. </ListView.ItemsPanel>
  161. <ListView.ItemTemplate>
  162. <DataTemplate>
  163. <Border Margin="5" Background="LightSkyBlue">
  164. <Grid>
  165. <Grid.RowDefinitions>
  166. <RowDefinition />
  167. <RowDefinition Height="0.25*" />
  168. <RowDefinition Height="0.2*" />
  169. </Grid.RowDefinitions>
  170. <Image Source="/BPASmartClient.CustomResource;component/Image/AGV/炒锅.png" />
  171. <TextBlock
  172. Grid.Row="1"
  173. Margin="2,0,0,0"
  174. HorizontalAlignment="Center"
  175. VerticalAlignment="Center"
  176. Foreground="#dd000000"
  177. Text="{Binding RecipeName}" />
  178. <Grid
  179. Name="gr"
  180. Grid.Row="2"
  181. Height="30">
  182. <Grid.ColumnDefinitions>
  183. <ColumnDefinition />
  184. <ColumnDefinition />
  185. </Grid.ColumnDefinitions>
  186. <pry:IcoButton
  187. Width="{Binding ElementName=gr, Path=ActualWidth}"
  188. Height="{Binding ElementName=gr, Path=ActualHeight}"
  189. HorizontalAlignment="Center"
  190. VerticalAlignment="Center"
  191. BorderThickness="0"
  192. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
  193. CommandParameter="{Binding RecipCode}"
  194. Content="删除"
  195. EnterBackground="Red"
  196. FontStyle="Normal"
  197. Foreground="#dd000000"
  198. IcoText="&#xe68e;"
  199. Style="{StaticResource IcoButtonStyle}" />
  200. <pry:IcoButton
  201. Grid.Column="1"
  202. Width="{Binding ElementName=gr, Path=ActualWidth}"
  203. Height="{Binding ElementName=gr, Path=ActualHeight}"
  204. HorizontalAlignment="Center"
  205. VerticalAlignment="Center"
  206. BorderThickness="0"
  207. Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
  208. CommandParameter="{Binding RecipCode}"
  209. Content="编辑"
  210. EnterBackground="#FF2AB2E7"
  211. Foreground="#dd000000"
  212. IcoText="&#xe636;"
  213. Style="{StaticResource IcoButtonStyle}" />
  214. </Grid>
  215. </Grid>
  216. </Border>
  217. </DataTemplate>
  218. </ListView.ItemTemplate>
  219. </ListView>
  220. </ScrollViewer>
  221. <!--<UniformGrid
  222. Grid.Row="2"
  223. Height="200"
  224. VerticalAlignment="Top"
  225. Columns="10">
  226. <Border
  227. Margin="10"
  228. Background="LightSkyBlue"
  229. BorderThickness="1">
  230. <Grid>
  231. <Grid.RowDefinitions>
  232. <RowDefinition />
  233. <RowDefinition Height="0.25*" />
  234. <RowDefinition Height="0.2*" />
  235. </Grid.RowDefinitions>
  236. <Image Source="/BPASmartClient.CustomResource;component/Image/AGV/炒锅.png" />
  237. <TextBlock
  238. Grid.Row="1"
  239. Margin="2,0,0,0"
  240. HorizontalAlignment="Center"
  241. VerticalAlignment="Center"
  242. Foreground="#dd000000"
  243. Text="配方名称" />
  244. <Grid Name="gr" Grid.Row="2">
  245. <Grid.ColumnDefinitions>
  246. <ColumnDefinition />
  247. <ColumnDefinition />
  248. </Grid.ColumnDefinitions>
  249. <pry:IcoButton
  250. Width="{Binding ElementName=gr, Path=ActualWidth}"
  251. Height="{Binding ElementName=gr, Path=ActualHeight}"
  252. HorizontalAlignment="Center"
  253. VerticalAlignment="Center"
  254. BorderThickness="0"
  255. Content="删除"
  256. EnterBackground="Red"
  257. FontStyle="Normal"
  258. Foreground="#dd000000"
  259. IcoText="&#xe68e;"
  260. Style="{StaticResource IcoButtonStyle}" />
  261. <pry:IcoButton
  262. Grid.Column="1"
  263. Width="{Binding ElementName=gr, Path=ActualWidth}"
  264. Height="{Binding ElementName=gr, Path=ActualHeight}"
  265. HorizontalAlignment="Center"
  266. VerticalAlignment="Center"
  267. BorderThickness="0"
  268. Content="编辑"
  269. EnterBackground="#FF2AB2E7"
  270. Foreground="#dd000000"
  271. IcoText="&#xe68e;"
  272. Style="{StaticResource IcoButtonStyle}" />
  273. </Grid>
  274. </Grid>
  275. </Border>
  276. </UniformGrid>-->
  277. <!--#region 表格数据显示-->
  278. <!--<ScrollViewer
  279. Grid.Row="2"
  280. Visibility="Collapsed"
  281. HorizontalScrollBarVisibility="Hidden"
  282. VerticalScrollBarVisibility="Hidden">
  283. <ItemsControl ItemsSource="{Binding Recipes}">
  284. <ItemsControl.ItemTemplate>
  285. <DataTemplate>
  286. <RadioButton Background="Transparent" GroupName="all">
  287. <RadioButton.Template>
  288. <ControlTemplate TargetType="RadioButton">
  289. <Grid Name="gr" Height="30">
  290. <Grid.ColumnDefinitions>
  291. <ColumnDefinition Width="0.3*" />
  292. <ColumnDefinition />
  293. <ColumnDefinition Width="0.7*" />
  294. <ColumnDefinition Width="0.7*" />
  295. <ColumnDefinition Width="0" />
  296. <ColumnDefinition Width="0.7*" />
  297. <ColumnDefinition Width="0.5*" />
  298. </Grid.ColumnDefinitions>
  299. <TextBlock
  300. Grid.Column="0"
  301. Foreground="#ff00ccff"
  302. Style="{StaticResource TextBlockStyle}"
  303. Text="{Binding SerialNum}" />
  304. <Grid Grid.Column="1">
  305. <TextBlock
  306. Margin="5,0,0,0"
  307. HorizontalAlignment="Left"
  308. Foreground="#ff00ccff"
  309. Style="{StaticResource TextBlockStyle}"
  310. Text="{Binding RecipeName}" />
  311. </Grid>
  312. <TextBlock
  313. Grid.Column="2"
  314. Foreground="#ff00ccff"
  315. Style="{StaticResource TextBlockStyle}"
  316. Text="{Binding RecipCode}" />
  317. -->
  318. <!--<Grid Grid.Column="3">
  319. <Button
  320. Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  321. CommandParameter="{Binding RecipCode}"
  322. Content="编辑"
  323. Style="{StaticResource buttonStyle}" />
  324. </Grid>-->
  325. <!--
  326. <Grid Grid.Column="5">
  327. <Button
  328. Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  329. CommandParameter="{Binding RecipCode}"
  330. Content="详情"
  331. Style="{StaticResource buttonStyle}" />
  332. </Grid>
  333. <Grid Grid.Column="6">
  334. <Button
  335. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  336. CommandParameter="{Binding RecipCode}"
  337. Content="删除"
  338. Style="{StaticResource buttonStyle}" />
  339. </Grid>
  340. </Grid>
  341. <ControlTemplate.Triggers>
  342. <Trigger Property="IsChecked" Value="True">
  343. <Setter TargetName="gr" Property="Background" Value="#3300ccff" />
  344. </Trigger>
  345. <Trigger Property="IsMouseOver" Value="true">
  346. <Setter TargetName="gr" Property="Background" Value="#3300ccff" />
  347. </Trigger>
  348. </ControlTemplate.Triggers>
  349. </ControlTemplate>
  350. </RadioButton.Template>
  351. </RadioButton>
  352. </DataTemplate>
  353. </ItemsControl.ItemTemplate>
  354. </ItemsControl>
  355. </ScrollViewer>-->
  356. <!--#endregion-->
  357. </Grid>
  358. </UserControl>