终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

247 line
11 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="16" />
  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. EnableColor="#FFB7B7B7"
  67. FontSize="17"
  68. Foreground="Aqua"
  69. IcoText="&#xe936;"
  70. IsEnabled="True"
  71. Style="{StaticResource IcoButtonStyle}" />
  72. </StackPanel>
  73. <!--#endregion-->
  74. <!--#region 表格标题栏设置-->
  75. <!--<Grid Grid.Row="1" Background="#dd2AB2E7">
  76. <Grid.ColumnDefinitions>
  77. <ColumnDefinition Width="0.3*" />
  78. <ColumnDefinition />
  79. <ColumnDefinition Width="0.7*" />
  80. <ColumnDefinition Width="0.7*" />
  81. <ColumnDefinition Width="0" />
  82. <ColumnDefinition Width="0.7*" />
  83. <ColumnDefinition Width="0.5*" />
  84. </Grid.ColumnDefinitions>
  85. <TextBlock
  86. Grid.Column="0"
  87. HorizontalAlignment="Center"
  88. VerticalAlignment="Center"
  89. FontSize="16"
  90. Foreground="{StaticResource TitleFontColor}"
  91. Text="序号" />
  92. <Grid Grid.Column="1">
  93. <TextBlock
  94. HorizontalAlignment="Center"
  95. VerticalAlignment="Center"
  96. FontSize="16"
  97. Foreground="{StaticResource TitleFontColor}"
  98. Text="配方名称" />
  99. <Border BorderBrush="{StaticResource TitleBorderColor}" BorderThickness="1,0,1,0" />
  100. </Grid>
  101. <TextBlock
  102. Grid.Column="2"
  103. HorizontalAlignment="Center"
  104. VerticalAlignment="Center"
  105. FontSize="16"
  106. Foreground="{StaticResource TitleFontColor}"
  107. Text="编码" />
  108. <Grid Grid.Column="3">
  109. <TextBlock
  110. HorizontalAlignment="Center"
  111. VerticalAlignment="Center"
  112. FontSize="16"
  113. Foreground="{StaticResource TitleFontColor}"
  114. Text="结束时间" />
  115. <Border BorderBrush="{StaticResource TitleBorderColor}" BorderThickness="1,0,1,0" />
  116. </Grid>
  117. <Grid Grid.Column="5">
  118. <TextBlock
  119. HorizontalAlignment="Center"
  120. VerticalAlignment="Center"
  121. FontSize="16"
  122. Foreground="{StaticResource TitleFontColor}"
  123. Text="制作状态" />
  124. <Border BorderBrush="{StaticResource TitleBorderColor}" BorderThickness="0,0,1,0" />
  125. </Grid>
  126. <TextBlock
  127. Grid.Column="6"
  128. HorizontalAlignment="Center"
  129. VerticalAlignment="Center"
  130. FontSize="16"
  131. Foreground="{StaticResource TitleFontColor}"
  132. Text="完成时间" />
  133. </Grid>-->
  134. <!--#endregion-->
  135. <!--#region 表格数据显示-->
  136. <ScrollViewer
  137. Grid.Row="2"
  138. HorizontalScrollBarVisibility="Hidden"
  139. VerticalScrollBarVisibility="Hidden">
  140. <ItemsControl ItemsSource="{Binding Recipes}">
  141. <ItemsControl.ItemTemplate>
  142. <DataTemplate>
  143. <RadioButton Background="Transparent" GroupName="all">
  144. <RadioButton.Template>
  145. <ControlTemplate TargetType="RadioButton">
  146. <Grid Name="gr" Height="30">
  147. <Grid.ColumnDefinitions>
  148. <ColumnDefinition Width="0.3*" />
  149. <ColumnDefinition />
  150. <ColumnDefinition Width="0.7*" />
  151. <ColumnDefinition Width="0.7*" />
  152. <ColumnDefinition Width="0" />
  153. <ColumnDefinition Width="0.7*" />
  154. <ColumnDefinition Width="0.5*" />
  155. </Grid.ColumnDefinitions>
  156. <TextBlock
  157. Grid.Column="0"
  158. Foreground="#ff00ccff"
  159. Style="{StaticResource TextBlockStyle}"
  160. Text="{Binding SerialNum}" />
  161. <Grid Grid.Column="1">
  162. <TextBlock
  163. Margin="5,0,0,0"
  164. HorizontalAlignment="Left"
  165. Foreground="#ff00ccff"
  166. Style="{StaticResource TextBlockStyle}"
  167. Text="{Binding RecipeName}" />
  168. </Grid>
  169. <TextBlock
  170. Grid.Column="2"
  171. Foreground="#ff00ccff"
  172. Style="{StaticResource TextBlockStyle}"
  173. Text="{Binding RecipCode}" />
  174. <!--<Grid Grid.Column="3">
  175. <Button
  176. Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  177. CommandParameter="{Binding RecipCode}"
  178. Content="编辑"
  179. Style="{StaticResource buttonStyle}" />
  180. </Grid>-->
  181. <Grid Grid.Column="5">
  182. <Button
  183. Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  184. CommandParameter="{Binding RecipCode}"
  185. Content="详情"
  186. Style="{StaticResource buttonStyle}" />
  187. </Grid>
  188. <Grid Grid.Column="6">
  189. <Button
  190. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  191. CommandParameter="{Binding RecipCode}"
  192. Content="删除"
  193. Style="{StaticResource buttonStyle}" />
  194. </Grid>
  195. </Grid>
  196. <ControlTemplate.Triggers>
  197. <Trigger Property="IsChecked" Value="True">
  198. <Setter TargetName="gr" Property="Background" Value="#3300ccff" />
  199. </Trigger>
  200. <Trigger Property="IsMouseOver" Value="true">
  201. <Setter TargetName="gr" Property="Background" Value="#3300ccff" />
  202. </Trigger>
  203. </ControlTemplate.Triggers>
  204. </ControlTemplate>
  205. </RadioButton.Template>
  206. </RadioButton>
  207. </DataTemplate>
  208. </ItemsControl.ItemTemplate>
  209. </ItemsControl>
  210. </ScrollViewer>
  211. <!--#endregion-->
  212. </Grid>
  213. </UserControl>