终端一体化运控平台
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

401 行
18 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.JXJFoodSmallStation.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.JXJFoodSmallStation.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.JXJFoodSmallStation.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 NewRecipe}"
  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 SaveRecipe}"
  65. Content="保存配方"
  66. FontSize="17"
  67. Foreground="Aqua"
  68. IcoText="&#xe635;"
  69. IsEnabled="True"
  70. Style="{StaticResource IcoButtonStyle}" />
  71. </StackPanel>
  72. <!--#endregion-->
  73. <!--#region 表格标题栏设置-->
  74. <!--<Grid Grid.Row="1" Background="#dd2AB2E7">
  75. <Grid.ColumnDefinitions>
  76. <ColumnDefinition Width="0.3*" />
  77. <ColumnDefinition />
  78. <ColumnDefinition Width="0.7*" />
  79. <ColumnDefinition Width="0.7*" />
  80. <ColumnDefinition Width="0" />
  81. <ColumnDefinition Width="0.7*" />
  82. <ColumnDefinition Width="0.5*" />
  83. </Grid.ColumnDefinitions>
  84. <TextBlock
  85. Grid.Column="0"
  86. HorizontalAlignment="Center"
  87. VerticalAlignment="Center"
  88. FontSize="16"
  89. Foreground="{StaticResource TitleFontColor}"
  90. Text="序号" />
  91. <Grid Grid.Column="1">
  92. <TextBlock
  93. HorizontalAlignment="Center"
  94. VerticalAlignment="Center"
  95. FontSize="16"
  96. Foreground="{StaticResource TitleFontColor}"
  97. Text="配方名称" />
  98. <Border BorderBrush="{StaticResource TitleBorderColor}" BorderThickness="1,0,1,0" />
  99. </Grid>
  100. <TextBlock
  101. Grid.Column="2"
  102. HorizontalAlignment="Center"
  103. VerticalAlignment="Center"
  104. FontSize="16"
  105. Foreground="{StaticResource TitleFontColor}"
  106. Text="编码" />
  107. <Grid Grid.Column="3">
  108. <TextBlock
  109. HorizontalAlignment="Center"
  110. VerticalAlignment="Center"
  111. FontSize="16"
  112. Foreground="{StaticResource TitleFontColor}"
  113. Text="结束时间" />
  114. <Border BorderBrush="{StaticResource TitleBorderColor}" BorderThickness="1,0,1,0" />
  115. </Grid>
  116. <Grid Grid.Column="5">
  117. <TextBlock
  118. HorizontalAlignment="Center"
  119. VerticalAlignment="Center"
  120. FontSize="16"
  121. Foreground="{StaticResource TitleFontColor}"
  122. Text="制作状态" />
  123. <Border BorderBrush="{StaticResource TitleBorderColor}" BorderThickness="0,0,1,0" />
  124. </Grid>
  125. <TextBlock
  126. Grid.Column="6"
  127. HorizontalAlignment="Center"
  128. VerticalAlignment="Center"
  129. FontSize="16"
  130. Foreground="{StaticResource TitleFontColor}"
  131. Text="完成时间" />
  132. </Grid>-->
  133. <!--#endregion-->
  134. <ScrollViewer Grid.Row="2">
  135. <ListView
  136. Margin="5"
  137. VerticalAlignment="Top"
  138. Background="Transparent"
  139. BorderThickness="0"
  140. ItemsSource="{Binding Recipes}"
  141. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  142. <ListView.ItemsPanel>
  143. <ItemsPanelTemplate>
  144. <UniformGrid
  145. HorizontalAlignment="Left"
  146. VerticalAlignment="Top"
  147. Columns="8" />
  148. </ItemsPanelTemplate>
  149. </ListView.ItemsPanel>
  150. <ListView.ItemTemplate>
  151. <DataTemplate>
  152. <Border Margin="5" Background="LightSkyBlue">
  153. <Grid>
  154. <Grid.RowDefinitions>
  155. <RowDefinition />
  156. <RowDefinition Height="0.25*" />
  157. <RowDefinition Height="0.2*" />
  158. </Grid.RowDefinitions>
  159. <Image Source="/BPASmartClient.CustomResource;component/Image/AGV/炒锅.png" />
  160. <TextBlock
  161. Grid.Row="1"
  162. Margin="2,0,0,0"
  163. HorizontalAlignment="Center"
  164. VerticalAlignment="Center"
  165. Foreground="#dd000000"
  166. Text="{Binding RecipeName}" />
  167. <Grid
  168. Name="gr"
  169. Grid.Row="2"
  170. Height="30">
  171. <Grid.ColumnDefinitions>
  172. <ColumnDefinition />
  173. <ColumnDefinition />
  174. </Grid.ColumnDefinitions>
  175. <pry:IcoButton
  176. Width="{Binding ElementName=gr, Path=ActualWidth}"
  177. Height="{Binding ElementName=gr, Path=ActualHeight}"
  178. HorizontalAlignment="Center"
  179. VerticalAlignment="Center"
  180. BorderThickness="0"
  181. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
  182. CommandParameter="{Binding RecipCode}"
  183. Content="删除"
  184. EnterBackground="Red"
  185. FontStyle="Normal"
  186. Foreground="#dd000000"
  187. IcoText="&#xe68e;"
  188. Style="{StaticResource IcoButtonStyle}" />
  189. <pry:IcoButton
  190. Grid.Column="1"
  191. Width="{Binding ElementName=gr, Path=ActualWidth}"
  192. Height="{Binding ElementName=gr, Path=ActualHeight}"
  193. HorizontalAlignment="Center"
  194. VerticalAlignment="Center"
  195. BorderThickness="0"
  196. Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
  197. CommandParameter="{Binding RecipCode}"
  198. Content="编辑"
  199. EnterBackground="#FF2AB2E7"
  200. Foreground="#dd000000"
  201. IcoText="&#xe636;"
  202. Style="{StaticResource IcoButtonStyle}" />
  203. </Grid>
  204. </Grid>
  205. </Border>
  206. </DataTemplate>
  207. </ListView.ItemTemplate>
  208. </ListView>
  209. </ScrollViewer>
  210. <!--<UniformGrid
  211. Grid.Row="2"
  212. Height="200"
  213. VerticalAlignment="Top"
  214. Columns="10">
  215. <Border
  216. Margin="10"
  217. Background="LightSkyBlue"
  218. BorderThickness="1">
  219. <Grid>
  220. <Grid.RowDefinitions>
  221. <RowDefinition />
  222. <RowDefinition Height="0.25*" />
  223. <RowDefinition Height="0.2*" />
  224. </Grid.RowDefinitions>
  225. <Image Source="/BPASmartClient.CustomResource;component/Image/AGV/炒锅.png" />
  226. <TextBlock
  227. Grid.Row="1"
  228. Margin="2,0,0,0"
  229. HorizontalAlignment="Center"
  230. VerticalAlignment="Center"
  231. Foreground="#dd000000"
  232. Text="配方名称" />
  233. <Grid Name="gr" Grid.Row="2">
  234. <Grid.ColumnDefinitions>
  235. <ColumnDefinition />
  236. <ColumnDefinition />
  237. </Grid.ColumnDefinitions>
  238. <pry:IcoButton
  239. Width="{Binding ElementName=gr, Path=ActualWidth}"
  240. Height="{Binding ElementName=gr, Path=ActualHeight}"
  241. HorizontalAlignment="Center"
  242. VerticalAlignment="Center"
  243. BorderThickness="0"
  244. Content="删除"
  245. EnterBackground="Red"
  246. FontStyle="Normal"
  247. Foreground="#dd000000"
  248. IcoText="&#xe68e;"
  249. Style="{StaticResource IcoButtonStyle}" />
  250. <pry:IcoButton
  251. Grid.Column="1"
  252. Width="{Binding ElementName=gr, Path=ActualWidth}"
  253. Height="{Binding ElementName=gr, Path=ActualHeight}"
  254. HorizontalAlignment="Center"
  255. VerticalAlignment="Center"
  256. BorderThickness="0"
  257. Content="编辑"
  258. EnterBackground="#FF2AB2E7"
  259. Foreground="#dd000000"
  260. IcoText="&#xe68e;"
  261. Style="{StaticResource IcoButtonStyle}" />
  262. </Grid>
  263. </Grid>
  264. </Border>
  265. </UniformGrid>-->
  266. <!--#region 表格数据显示-->
  267. <!--<ScrollViewer
  268. Grid.Row="2"
  269. Visibility="Collapsed"
  270. HorizontalScrollBarVisibility="Hidden"
  271. VerticalScrollBarVisibility="Hidden">
  272. <ItemsControl ItemsSource="{Binding Recipes}">
  273. <ItemsControl.ItemTemplate>
  274. <DataTemplate>
  275. <RadioButton Background="Transparent" GroupName="all">
  276. <RadioButton.Template>
  277. <ControlTemplate TargetType="RadioButton">
  278. <Grid Name="gr" Height="30">
  279. <Grid.ColumnDefinitions>
  280. <ColumnDefinition Width="0.3*" />
  281. <ColumnDefinition />
  282. <ColumnDefinition Width="0.7*" />
  283. <ColumnDefinition Width="0.7*" />
  284. <ColumnDefinition Width="0" />
  285. <ColumnDefinition Width="0.7*" />
  286. <ColumnDefinition Width="0.5*" />
  287. </Grid.ColumnDefinitions>
  288. <TextBlock
  289. Grid.Column="0"
  290. Foreground="#ff00ccff"
  291. Style="{StaticResource TextBlockStyle}"
  292. Text="{Binding SerialNum}" />
  293. <Grid Grid.Column="1">
  294. <TextBlock
  295. Margin="5,0,0,0"
  296. HorizontalAlignment="Left"
  297. Foreground="#ff00ccff"
  298. Style="{StaticResource TextBlockStyle}"
  299. Text="{Binding RecipeName}" />
  300. </Grid>
  301. <TextBlock
  302. Grid.Column="2"
  303. Foreground="#ff00ccff"
  304. Style="{StaticResource TextBlockStyle}"
  305. Text="{Binding RecipCode}" />
  306. -->
  307. <!--<Grid Grid.Column="3">
  308. <Button
  309. Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  310. CommandParameter="{Binding RecipCode}"
  311. Content="编辑"
  312. Style="{StaticResource buttonStyle}" />
  313. </Grid>-->
  314. <!--
  315. <Grid Grid.Column="5">
  316. <Button
  317. Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  318. CommandParameter="{Binding RecipCode}"
  319. Content="详情"
  320. Style="{StaticResource buttonStyle}" />
  321. </Grid>
  322. <Grid Grid.Column="6">
  323. <Button
  324. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  325. CommandParameter="{Binding RecipCode}"
  326. Content="删除"
  327. Style="{StaticResource buttonStyle}" />
  328. </Grid>
  329. </Grid>
  330. <ControlTemplate.Triggers>
  331. <Trigger Property="IsChecked" Value="True">
  332. <Setter TargetName="gr" Property="Background" Value="#3300ccff" />
  333. </Trigger>
  334. <Trigger Property="IsMouseOver" Value="true">
  335. <Setter TargetName="gr" Property="Background" Value="#3300ccff" />
  336. </Trigger>
  337. </ControlTemplate.Triggers>
  338. </ControlTemplate>
  339. </RadioButton.Template>
  340. </RadioButton>
  341. </DataTemplate>
  342. </ItemsControl.ItemTemplate>
  343. </ItemsControl>
  344. </ScrollViewer>-->
  345. <!--#endregion-->
  346. </Grid>
  347. </UserControl>