终端一体化运控平台
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

190 lines
9.3 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.DosingHKProject.View.RecipeReceiveView"
  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.DosingHKProject.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.DosingHKProject.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:RecipeReceiveViewModel />
  39. </UserControl.DataContext>
  40. <Grid>
  41. <Grid.RowDefinitions>
  42. <RowDefinition Height="50"/>
  43. <RowDefinition />
  44. </Grid.RowDefinitions>
  45. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
  46. <pry:IcoButton
  47. Width="140"
  48. Margin="10"
  49. HorizontalAlignment="Right"
  50. Command="{Binding NewRecipe}"
  51. Content="自定义配方"
  52. FontSize="16"
  53. Foreground="Aqua"
  54. IcoText="&#xe626;"
  55. Style="{StaticResource IcoButtonStyle}" />
  56. <pry:IcoButton
  57. Width="140"
  58. Margin="10"
  59. HorizontalAlignment="Right"
  60. Command="{Binding NewSimulateRecipe}"
  61. Content="新建模拟配方"
  62. FontSize="16"
  63. Foreground="Aqua"
  64. IcoText="&#xe626;"
  65. Style="{StaticResource IcoButtonStyle}" />
  66. <pry:IcoButton
  67. Width="140"
  68. Margin="10"
  69. HorizontalAlignment="Right"
  70. Command="{Binding ClearAllRecipe}"
  71. Content="清除所有配方"
  72. FontSize="16"
  73. Foreground="Aqua"
  74. IcoText="&#xe635;"
  75. IsEnabled="True"
  76. Style="{StaticResource IcoButtonStyle}" />
  77. </StackPanel>
  78. <ScrollViewer Grid.Row="1">
  79. <ListView
  80. Margin="5"
  81. VerticalAlignment="Top"
  82. Background="Transparent"
  83. BorderThickness="0"
  84. ItemsSource="{Binding Recipes}"
  85. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  86. <ListView.ItemsPanel>
  87. <ItemsPanelTemplate>
  88. <UniformGrid
  89. HorizontalAlignment="Left"
  90. VerticalAlignment="Top"
  91. Columns="8" />
  92. </ItemsPanelTemplate>
  93. </ListView.ItemsPanel>
  94. <ListView.ItemTemplate>
  95. <DataTemplate>
  96. <Border Margin="5" Background="LightSkyBlue">
  97. <Grid>
  98. <Grid.RowDefinitions>
  99. <RowDefinition />
  100. <RowDefinition Height="0.25*" />
  101. <RowDefinition Height="0.2*" />
  102. </Grid.RowDefinitions>
  103. <Image Source="/BPASmartClient.CustomResource;component/Image/AGV/炒锅.png" />
  104. <WrapPanel Grid.Row="1">
  105. <TextBlock
  106. Margin="2,0,0,0"
  107. Foreground="#dd000000"
  108. Text="名称:" />
  109. <TextBlock
  110. Margin="2,0,0,0"
  111. Foreground="#dd000000"
  112. Text="{Binding RecipeName}" />
  113. <TextBlock
  114. Margin="5,0,0,0"
  115. Foreground="#dd000000"
  116. Text="编号:" />
  117. <TextBlock
  118. Margin="2,0,0,0"
  119. Foreground="#dd000000"
  120. Text="{Binding RecipeCode}" />
  121. </WrapPanel>
  122. <Grid
  123. Name="gr"
  124. Grid.Row="2"
  125. Height="30">
  126. <Grid.ColumnDefinitions>
  127. <ColumnDefinition />
  128. <ColumnDefinition />
  129. <ColumnDefinition />
  130. </Grid.ColumnDefinitions>
  131. <pry:IcoButton
  132. Grid.Column="0"
  133. Height="{Binding ElementName=gr, Path=ActualHeight}"
  134. HorizontalAlignment="Center"
  135. VerticalAlignment="Center"
  136. BorderThickness="0"
  137. Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
  138. CommandParameter="{Binding RecipeCode}"
  139. Content="编辑"
  140. EnterBackground="#FF2AB2E7"
  141. Foreground="#dd000000"
  142. IcoText="&#xe636;"
  143. Style="{StaticResource IcoButtonStyle}" />
  144. <pry:IcoButton
  145. Grid.Column="1"
  146. Height="{Binding ElementName=gr, Path=ActualHeight}"
  147. HorizontalAlignment="Center"
  148. VerticalAlignment="Center"
  149. BorderThickness="0"
  150. Command="{Binding DataContext.IssueRecipe, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
  151. CommandParameter="{Binding RecipeCode}"
  152. Content="下发"
  153. EnterBackground="#FF2AB2E7"
  154. Foreground="#dd000000"
  155. IcoText="&#xe636;"
  156. Style="{StaticResource IcoButtonStyle}" />
  157. <pry:IcoButton
  158. Grid.Column="2"
  159. Height="{Binding ElementName=gr, Path=ActualHeight}"
  160. HorizontalAlignment="Center"
  161. VerticalAlignment="Center"
  162. BorderThickness="0"
  163. Command="{Binding DataContext.RemoveRecipe, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
  164. CommandParameter="{Binding RecipeCode}"
  165. Content="删除"
  166. EnterBackground="#FF2AB2E7"
  167. Foreground="#dd000000"
  168. IcoText="&#xe636;"
  169. Style="{StaticResource IcoButtonStyle}" />
  170. </Grid>
  171. </Grid>
  172. </Border>
  173. </DataTemplate>
  174. </ListView.ItemTemplate>
  175. </ListView>
  176. </ScrollViewer>
  177. </Grid>
  178. </UserControl>