终端一体化运控平台
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

413 rader
18 KiB

  1. <Window
  2. x:Class="BPASmartClient.FoodStationTest.View.NewLocalRecipeView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmartClient.FoodStationTest.View"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:vm="clr-namespace:BPASmartClient.FoodStationTest.ViewModel"
  9. Title="NewRemoteRecipeView"
  10. Width="900"
  11. Height="700"
  12. AllowsTransparency="True"
  13. Background="{x:Null}"
  14. Topmost="True"
  15. WindowStartupLocation="CenterScreen"
  16. WindowStyle="None"
  17. mc:Ignorable="d">
  18. <Window.DataContext>
  19. <vm:NewLocalRecipeViewModel />
  20. </Window.DataContext>
  21. <Window.Resources>
  22. <ResourceDictionary>
  23. <ResourceDictionary.MergedDictionaries>
  24. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
  25. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
  26. <ResourceDictionary>
  27. <!--#region ListBox样式-->
  28. <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
  29. <Setter Property="OverridesDefaultStyle" Value="True" />
  30. <Setter Property="SnapsToDevicePixels" Value="True" />
  31. <Setter Property="BorderBrush" Value="{x:Null}" />
  32. <Setter Property="Foreground" Value="White" />
  33. <Setter Property="FontSize" Value="20" />
  34. <Setter Property="HorizontalContentAlignment" Value="Center" />
  35. <Setter Property="VerticalContentAlignment" Value="Center" />
  36. <Setter Property="Template">
  37. <Setter.Value>
  38. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  39. <Border x:Name="border" CornerRadius="8">
  40. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  41. </Border>
  42. </ControlTemplate>
  43. </Setter.Value>
  44. </Setter>
  45. </Style>
  46. <!--#endregion-->
  47. <Style x:Key="tbStyle" TargetType="TextBox">
  48. <Setter Property="BorderThickness" Value="0" />
  49. <Setter Property="Foreground" Value="DeepSkyBlue" />
  50. <Setter Property="Background" Value="Transparent" />
  51. <Setter Property="VerticalAlignment" Value="Center" />
  52. <Setter Property="CaretBrush" Value="Orange" />
  53. <Setter Property="FontFamily" Value="楷体" />
  54. <Setter Property="Margin" Value="5,0,0,0" />
  55. <Setter Property="FontSize" Value="18" />
  56. </Style>
  57. </ResourceDictionary>
  58. </ResourceDictionary.MergedDictionaries>
  59. </ResourceDictionary>
  60. </Window.Resources>
  61. <Border
  62. Name="br"
  63. BorderBrush="#0CADF5"
  64. BorderThickness="0">
  65. <Border.Background>
  66. <!--<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />-->
  67. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/弹框/z4.png" />
  68. <!--<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/弹窗2.png" />-->
  69. </Border.Background>
  70. <Grid>
  71. <Grid.RowDefinitions>
  72. <RowDefinition Height="50" />
  73. <RowDefinition Height="150" />
  74. <RowDefinition Height="10" />
  75. <RowDefinition />
  76. </Grid.RowDefinitions>
  77. <TextBlock
  78. HorizontalAlignment="Center"
  79. VerticalAlignment="Center"
  80. Foreground="DeepSkyBlue"
  81. Text="配方编辑" />
  82. <Button
  83. Name="Close"
  84. Width="50"
  85. HorizontalAlignment="Right"
  86. Content="&#xe679;"
  87. FontSize="25"
  88. Foreground="Red"
  89. Style="{StaticResource TitleBarStyle}" />
  90. <!--#region 信息录入-->
  91. <Grid Grid.Row="1">
  92. <Grid.ColumnDefinitions>
  93. <ColumnDefinition />
  94. <ColumnDefinition />
  95. </Grid.ColumnDefinitions>
  96. <Grid Grid.Column="0" Margin="5,0">
  97. <Grid.Background>
  98. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/弹框/ch.png" />
  99. </Grid.Background>
  100. <Grid.RowDefinitions>
  101. <RowDefinition />
  102. <RowDefinition />
  103. </Grid.RowDefinitions>
  104. <Grid.ColumnDefinitions>
  105. <ColumnDefinition />
  106. <ColumnDefinition />
  107. <ColumnDefinition />
  108. <ColumnDefinition />
  109. </Grid.ColumnDefinitions>
  110. <TextBlock
  111. Grid.Row="0"
  112. Grid.Column="0"
  113. HorizontalAlignment="Right"
  114. Background="Transparent"
  115. FontSize="18"
  116. Foreground="DeepSkyBlue"
  117. Text="配方名称:" />
  118. <TextBox
  119. Grid.Row="0"
  120. Grid.Column="1"
  121. Grid.ColumnSpan="3"
  122. Height="30"
  123. Margin="0,0,11,0"
  124. FontSize="16"
  125. Foreground="DeepSkyBlue"
  126. Text="{Binding RecipeName}" />
  127. <TextBlock
  128. Grid.Row="1"
  129. Grid.Column="0"
  130. HorizontalAlignment="Right"
  131. Background="Transparent"
  132. FontSize="18"
  133. Foreground="DeepSkyBlue"
  134. Text="托盘编号:" />
  135. <TextBox
  136. Grid.Row="1"
  137. Grid.Column="1"
  138. Width="100"
  139. Height="30"
  140. HorizontalAlignment="Left"
  141. FontSize="16"
  142. Foreground="DeepSkyBlue"
  143. Text="{Binding TrayNum}" />
  144. <TextBlock
  145. Grid.Row="1"
  146. Grid.Column="2"
  147. HorizontalAlignment="Right"
  148. Background="Transparent"
  149. FontSize="18"
  150. Foreground="DeepSkyBlue"
  151. Text="配方编码:" />
  152. <TextBox
  153. Grid.Row="1"
  154. Grid.Column="3"
  155. Width="100"
  156. Height="30"
  157. HorizontalAlignment="Left"
  158. FontSize="16"
  159. Foreground="DeepSkyBlue"
  160. Text="{Binding RecipeCode}" />
  161. </Grid>
  162. <Grid Grid.Column="1" Margin="5,0">
  163. <Grid.Background>
  164. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/弹框/ch.png" />
  165. </Grid.Background>
  166. <Grid.RowDefinitions>
  167. <RowDefinition />
  168. <RowDefinition />
  169. </Grid.RowDefinitions>
  170. <Grid.ColumnDefinitions>
  171. <ColumnDefinition />
  172. <ColumnDefinition />
  173. </Grid.ColumnDefinitions>
  174. <Button
  175. Grid.Row="0"
  176. Grid.Column="0"
  177. Grid.ColumnSpan="2"
  178. Height="35"
  179. Margin="20,0"
  180. Command="{Binding SaveCommand}"
  181. Content="保存配方"
  182. FontSize="16"
  183. Style="{StaticResource ImageButtonStyle}" />
  184. <Button
  185. Grid.Row="1"
  186. Grid.Column="0"
  187. Height="35"
  188. Margin="20,0"
  189. Command="{Binding AddCommand}"
  190. Content="添加小料"
  191. FontSize="16"
  192. Style="{StaticResource ImageButtonStyle}" />
  193. <Button
  194. Grid.Row="1"
  195. Grid.Column="1"
  196. Height="35"
  197. Margin="20,0"
  198. Command="{Binding AddFLCommand}"
  199. Content="添加粉料"
  200. FontSize="16"
  201. Style="{StaticResource ImageButtonStyle}" />
  202. </Grid>
  203. </Grid>
  204. <!--#endregion-->
  205. <!--#region 表格显示-->
  206. <Grid
  207. Grid.Row="3"
  208. Grid.RowSpan="2"
  209. Margin="5">
  210. <Grid.Background>
  211. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/弹框/bh.png" Stretch="Fill" />
  212. </Grid.Background>
  213. <Grid Margin="15,35,15,10">
  214. <Grid.RowDefinitions>
  215. <RowDefinition Height="40" />
  216. <RowDefinition />
  217. </Grid.RowDefinitions>
  218. <!--#region 表格标题栏设置-->
  219. <Grid
  220. Grid.Row="0"
  221. Margin="0,10,0,0"
  222. Background="#ff0C255F">
  223. <Grid.ColumnDefinitions>
  224. <ColumnDefinition />
  225. <ColumnDefinition Width="0.4*" />
  226. <ColumnDefinition Width="0.4*" />
  227. <ColumnDefinition Width="0.4*" />
  228. <ColumnDefinition Width="0.4*" />
  229. <ColumnDefinition Width="0.4*" />
  230. </Grid.ColumnDefinitions>
  231. <TextBlock
  232. HorizontalAlignment="Center"
  233. FontSize="16"
  234. Text="原料名称" />
  235. <TextBlock
  236. Grid.Column="1"
  237. HorizontalAlignment="Center"
  238. FontSize="16"
  239. Text="原料类型" />
  240. <TextBlock
  241. Grid.Column="2"
  242. HorizontalAlignment="Center"
  243. FontSize="16"
  244. Text="原料位置" />
  245. <TextBlock
  246. Grid.Column="3"
  247. HorizontalAlignment="Center"
  248. FontSize="16"
  249. Text="原料桶号" />
  250. <TextBlock
  251. Grid.Column="4"
  252. HorizontalAlignment="Center"
  253. FontSize="16"
  254. Text="重量(kg)" />
  255. <TextBlock
  256. Grid.Column="5"
  257. HorizontalAlignment="Center"
  258. FontSize="16"
  259. Text="功能操作" />
  260. <Border
  261. Grid.ColumnSpan="6"
  262. BorderBrush="#8800bfff"
  263. BorderThickness="1" />
  264. <Border
  265. Grid.Column="1"
  266. BorderBrush="#8800bfff"
  267. BorderThickness="1,0,1,0" />
  268. <Border
  269. Grid.Column="3"
  270. BorderBrush="#8800bfff"
  271. BorderThickness="1,0,1,0" />
  272. <Border
  273. Grid.Column="5"
  274. BorderBrush="#8800bfff"
  275. BorderThickness="1,0,1,0" />
  276. </Grid>
  277. <!-- 表格信息显示 -->
  278. <Grid Grid.Row="1">
  279. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
  280. <ItemsControl ItemsSource="{Binding AllRawMaterial}">
  281. <ItemsControl.ItemTemplate>
  282. <DataTemplate>
  283. <Grid Name="gr">
  284. <Grid.ColumnDefinitions>
  285. <ColumnDefinition />
  286. <ColumnDefinition Width="0.4*" />
  287. <ColumnDefinition Width="0.4*" />
  288. <ColumnDefinition Width="0.4*" />
  289. <ColumnDefinition Width="0.4*" />
  290. <ColumnDefinition Width="0.4*" />
  291. </Grid.ColumnDefinitions>
  292. <TextBlock
  293. Margin="5,0,0,0"
  294. FontFamily="楷体"
  295. FontSize="18"
  296. Foreground="DeepSkyBlue"
  297. Text="{Binding RawMaterialName}" />
  298. <TextBlock
  299. Grid.Column="1"
  300. Margin="5,0,0,0"
  301. FontFamily="楷体"
  302. FontSize="18"
  303. Foreground="DeepSkyBlue"
  304. Text="{Binding RawMaterialType}" />
  305. <TextBox
  306. Grid.Column="2"
  307. Style="{StaticResource tbStyle}"
  308. Text="{Binding RawMaterialLocation}" />
  309. <TextBox
  310. Grid.Column="3"
  311. Style="{StaticResource tbStyle}"
  312. Text="{Binding RawMaterialBarrelNum}" />
  313. <TextBox
  314. Grid.Column="4"
  315. Style="{StaticResource tbStyle}"
  316. Text="{Binding RawMaterialWeight}" />
  317. <Button
  318. Grid.Column="5"
  319. Height="25"
  320. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  321. CommandParameter="{Binding RawMaterialName}"
  322. Content="删除"
  323. FontSize="16"
  324. Style="{StaticResource ControlButtonStyle}" />
  325. <!--<Button
  326. Grid.Column="5"
  327. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  328. CommandParameter="{Binding RawMaterialLocation}"
  329. Content="删除"
  330. FontSize="16" />-->
  331. <Border
  332. Grid.ColumnSpan="6"
  333. BorderBrush="#8800bfff"
  334. BorderThickness="1,0,1,1" />
  335. <Border
  336. Grid.Column="1"
  337. BorderBrush="#8800bfff"
  338. BorderThickness="1,0,1,0" />
  339. <Border
  340. Grid.Column="3"
  341. BorderBrush="#8800bfff"
  342. BorderThickness="1,0,1,0" />
  343. <Border
  344. Grid.Column="5"
  345. BorderBrush="#8800bfff"
  346. BorderThickness="1,0,1,0" />
  347. </Grid>
  348. <DataTemplate.Triggers>
  349. <Trigger Property="IsMouseOver" Value="true">
  350. <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
  351. </Trigger>
  352. </DataTemplate.Triggers>
  353. </DataTemplate>
  354. </ItemsControl.ItemTemplate>
  355. </ItemsControl>
  356. </ScrollViewer>
  357. </Grid>
  358. </Grid>
  359. </Grid>
  360. <!--#endregion-->
  361. </Grid>
  362. </Border>
  363. </Window>