终端一体化运控平台
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

237 lignes
11 KiB

  1. <Window
  2. x:Class="BPASmartClient.DosingHKProject.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.DosingHKProject.View"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:vm="clr-namespace:BPASmartClient.DosingHKProject.ViewModel"
  9. Title="NewRemoteRecipeView"
  10. Width="700"
  11. Height="520"
  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. </ResourceDictionary>
  48. </ResourceDictionary.MergedDictionaries>
  49. </ResourceDictionary>
  50. </Window.Resources>
  51. <Border
  52. Name="br"
  53. BorderBrush="#0CADF5"
  54. BorderThickness="2">
  55. <Border.Background>
  56. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
  57. <!--<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/弹窗2.png" />-->
  58. </Border.Background>
  59. <Grid Margin="10">
  60. <Grid.RowDefinitions>
  61. <RowDefinition Height="40" />
  62. <RowDefinition Height="40" />
  63. <RowDefinition Height="40" />
  64. <RowDefinition />
  65. </Grid.RowDefinitions>
  66. <Grid Grid.Row="0">
  67. <Grid.ColumnDefinitions>
  68. <ColumnDefinition></ColumnDefinition>
  69. <ColumnDefinition></ColumnDefinition>
  70. </Grid.ColumnDefinitions>
  71. <StackPanel VerticalAlignment="Center" Grid.Column="0" Orientation="Horizontal">
  72. <TextBlock
  73. Width="100"
  74. Margin="10,0,10,0"
  75. Background="Transparent"
  76. FontSize="20"
  77. Foreground="#FF2AB2E7"
  78. Text="配方名称:" />
  79. <TextBox
  80. Width="120"
  81. Height="30"
  82. FontSize="16"
  83. Text="{Binding RecipeName}" />
  84. </StackPanel>
  85. <WrapPanel VerticalAlignment="Center" Grid.Column="1">
  86. </WrapPanel>
  87. </Grid>
  88. <Grid Grid.Row="1">
  89. <Grid.ColumnDefinitions>
  90. <ColumnDefinition Width="1*" />
  91. <ColumnDefinition Width="1*" />
  92. </Grid.ColumnDefinitions>
  93. <WrapPanel VerticalAlignment="Center" Grid.Column="0">
  94. <TextBlock
  95. Width="100"
  96. Margin="10,0,10,0"
  97. Background="Transparent"
  98. FontSize="20"
  99. Foreground="#FF2AB2E7"
  100. Text="配方编码:" />
  101. <TextBox
  102. Width="120"
  103. Height="30"
  104. FontSize="16"
  105. Text="{Binding RecipeCode}" />
  106. </WrapPanel>
  107. <WrapPanel HorizontalAlignment="Right" Orientation="Horizontal" Grid.Column="1">
  108. <Button
  109. Width="100"
  110. Height="40"
  111. Margin="5,0,5,0"
  112. Command="{Binding AddCommand}"
  113. Content="添加原料"
  114. FontSize="20"
  115. Style="{StaticResource ImageButtonStyle}" />
  116. <Button
  117. Width="100"
  118. Height="40"
  119. Margin="5,0,10,0"
  120. Command="{Binding SaveCommand}"
  121. Content="保存配方"
  122. FontSize="20"
  123. Style="{StaticResource ImageButtonStyle}" />
  124. <Button
  125. Name ="Close"
  126. Width="100"
  127. Height="40"
  128. Margin="5,0,5,0"
  129. Content="取消"
  130. FontSize="20"
  131. Style="{StaticResource ImageButtonStyle}" />
  132. </WrapPanel>
  133. </Grid>
  134. <!--#region 表格标题栏设置-->
  135. <Grid
  136. Grid.Row="2"
  137. Margin="0,10,0,0"
  138. Background="#ff0C255F">
  139. <Grid.ColumnDefinitions>
  140. <ColumnDefinition Width="1*"/>
  141. <ColumnDefinition Width="1*"/>
  142. <ColumnDefinition Width="1*"/>
  143. <ColumnDefinition Width="1*"/>
  144. <ColumnDefinition Width="1*"/>
  145. </Grid.ColumnDefinitions>
  146. <Grid Grid.Column="0">
  147. <TextBlock Text="原料名称" HorizontalAlignment="Center" />
  148. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  149. </Grid>
  150. <TextBlock Grid.Column="1" Text="原料位置" HorizontalAlignment="Center" />
  151. <Grid Grid.Column="2">
  152. <TextBlock Text="原料桶号" HorizontalAlignment="Center" />
  153. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  154. </Grid>
  155. <TextBlock Grid.Column="3" Text="原料重量" HorizontalAlignment="Center" />
  156. <Grid Grid.Column="4">
  157. <TextBlock Text="功能操作" HorizontalAlignment="Center" />
  158. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  159. </Grid>
  160. <Border Grid.ColumnSpan="10" BorderThickness="1,0,1,0" />
  161. </Grid>
  162. <Grid Grid.Row="3">
  163. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
  164. <ItemsControl ItemsSource="{Binding RawMaterial}">
  165. <ItemsControl.ItemTemplate>
  166. <DataTemplate>
  167. <Grid Name="gr">
  168. <Grid.ColumnDefinitions>
  169. <ColumnDefinition />
  170. <ColumnDefinition />
  171. <ColumnDefinition />
  172. <ColumnDefinition />
  173. <ColumnDefinition />
  174. </Grid.ColumnDefinitions>
  175. <Grid Grid.Column="0">
  176. <TextBox
  177. Text="{Binding RawMaterialName}" />
  178. <Border
  179. BorderThickness="1,0,1,0"
  180. Cursor="SizeWE" />
  181. </Grid>
  182. <TextBox
  183. Grid.Column="1"
  184. Text="{Binding RawMaterialLocation }" />
  185. <Grid Grid.Column="2">
  186. <TextBox
  187. Text="{Binding RawMaterialBarrelNum}" />
  188. <Border
  189. BorderThickness="1,0,1,0"
  190. Cursor="SizeWE" />
  191. </Grid>
  192. <TextBox
  193. Grid.Column="3"
  194. Text="{Binding RawMaterialWeight}" />
  195. <Grid Grid.Column="4">
  196. <Button
  197. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  198. CommandParameter="{Binding RawMaterialLocation}"
  199. Content="删除"
  200. FontSize="16" />
  201. <Border
  202. BorderThickness="1,0,1,0"
  203. Cursor="SizeWE" />
  204. </Grid>
  205. <Border
  206. Grid.ColumnSpan="10"
  207. BorderThickness="1,0,1,1" />
  208. </Grid>
  209. <DataTemplate.Triggers>
  210. <Trigger Property="IsMouseOver" Value="true">
  211. <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
  212. </Trigger>
  213. </DataTemplate.Triggers>
  214. </DataTemplate>
  215. </ItemsControl.ItemTemplate>
  216. </ItemsControl>
  217. </ScrollViewer>
  218. </Grid>
  219. </Grid>
  220. </Border>
  221. </Window>