终端一体化运控平台
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

211 satır
11 KiB

  1. <UserControl x:Class="BPASmart.RecipeManagement.View.OrderManager"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmart.RecipeManagement.View"
  7. xmlns:vm ="clr-namespace:BPASmart.RecipeManagement.ViewModel"
  8. mc:Ignorable="d"
  9. d:DesignHeight="450" d:DesignWidth="800" Background="Transparent" Foreground="#FF2AB2E7">
  10. <UserControl.DataContext>
  11. <vm:OrderManagerViewModel/>
  12. </UserControl.DataContext>
  13. <UserControl.Resources>
  14. <Style TargetType="ListBoxItem">
  15. <Setter Property="Margin" Value="2"/>
  16. <Setter Property="FontSize" Value="22"/>
  17. <Setter Property="FontWeight" Value="Black"/>
  18. <Setter Property="Background" Value="Transparent"/>
  19. <Setter Property="FontFamily" Value="楷体"/>
  20. <Setter Property="Template">
  21. <Setter.Value>
  22. <ControlTemplate TargetType="ListBoxItem">
  23. <Border BorderBrush="Black" BorderThickness="0" Background="Transparent">
  24. <Grid HorizontalAlignment="Center" Margin="10 ">
  25. <Grid.RowDefinitions>
  26. <RowDefinition/>
  27. <RowDefinition/>
  28. <RowDefinition/>
  29. </Grid.RowDefinitions>
  30. <Grid.ColumnDefinitions>
  31. <ColumnDefinition />
  32. <ColumnDefinition />
  33. </Grid.ColumnDefinitions>
  34. <TextBlock
  35. Grid.Row="0"
  36. Margin="5,0,0,0"
  37. HorizontalAlignment="Right"
  38. VerticalAlignment="Center"
  39. Foreground="#aa2AB2E7"
  40. FontFamily="微软雅黑"
  41. FontWeight="Light"
  42. Text="配方:" />
  43. <TextBlock
  44. Grid.Row="1"
  45. Margin="5,0,0,0"
  46. HorizontalAlignment="Right"
  47. VerticalAlignment="Center"
  48. Foreground="#aa2AB2E7"
  49. FontFamily="微软雅黑"
  50. FontWeight="Light"
  51. Text="数量:" />
  52. <TextBlock
  53. Grid.Row="2"
  54. Margin="5,0,0,0"
  55. HorizontalAlignment="Right"
  56. VerticalAlignment="Center"
  57. Foreground="#aa2AB2E7"
  58. FontFamily="微软雅黑"
  59. FontWeight="Light"
  60. Text="已完成:" />
  61. <TextBlock
  62. Grid.Row="0"
  63. Grid.Column="1"
  64. Margin="5,0,0,0"
  65. HorizontalAlignment="Right"
  66. VerticalAlignment="Center"
  67. Foreground="#aa2AB2E7"
  68. FontFamily="微软雅黑"
  69. FontWeight="Light"
  70. Text="{Binding Name}" />
  71. <TextBlock
  72. Grid.Row="1"
  73. Grid.Column="1"
  74. Margin="5,0,0,0"
  75. HorizontalAlignment="Right"
  76. VerticalAlignment="Center"
  77. Foreground="#aa2AB2E7"
  78. FontFamily="微软雅黑"
  79. FontWeight="Light"
  80. Text="{Binding RecipeCount}" />
  81. <TextBlock
  82. Grid.Row="2"
  83. Grid.Column="1"
  84. Margin="5,0,0,0"
  85. HorizontalAlignment="Right"
  86. VerticalAlignment="Center"
  87. Foreground="#aa2AB2E7"
  88. FontFamily="微软雅黑"
  89. FontWeight="Light"
  90. Text="" />
  91. </Grid>
  92. </Border>
  93. </ControlTemplate>
  94. </Setter.Value>
  95. </Setter>
  96. </Style>
  97. <Style TargetType="ListViewItem" >
  98. <Setter Property="Margin" Value="10"/>
  99. <Setter Property="Background" Value="Transparent"/>
  100. <Setter Property="Template">
  101. <Setter.Value>
  102. <ControlTemplate TargetType="ListViewItem">
  103. <Border x:Name="mborder" Margin="10" Padding="2" BorderThickness="1" BorderBrush="Transparent" Opacity="0.7"
  104. >
  105. <Border>
  106. <Border.Background>
  107. <ImageBrush ImageSource="../image/边框效果2.png"/>
  108. </Border.Background>
  109. <Grid
  110. Background="Transparent"
  111. Name="tt"
  112. Height="250"
  113. Width="300"
  114. Margin="5">
  115. <Grid.RowDefinitions>
  116. <RowDefinition Height="30" />
  117. <RowDefinition Height="*" />
  118. <RowDefinition Height="4" />
  119. <RowDefinition Height="40" />
  120. </Grid.RowDefinitions>
  121. <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
  122. <TextBlock
  123. Grid.Row="0"
  124. Margin="2,5,0,0"
  125. HorizontalAlignment="Center"
  126. VerticalAlignment="Top"
  127. FontSize="18"
  128. Foreground="White"
  129. FontFamily="楷体"
  130. Text="下单时间: " />
  131. <TextBlock
  132. Grid.Row="0"
  133. Margin="2,5,0,0"
  134. HorizontalAlignment="Center"
  135. VerticalAlignment="Top"
  136. FontSize="18"
  137. Foreground="White"
  138. FontFamily="楷体"
  139. Text="{Binding OrderdateTime}" />
  140. </StackPanel>
  141. <ScrollViewer
  142. Grid.Row="1"
  143. Margin="20,10"
  144. VerticalAlignment="Top"
  145. Background="#11F53F62"
  146. HorizontalScrollBarVisibility="Hidden"
  147. VerticalScrollBarVisibility="Auto">
  148. <ListBox ItemsSource="{Binding Recipes}" FontFamily="楷体" BorderBrush="Transparent" Background="Transparent" >
  149. </ListBox>
  150. </ScrollViewer>
  151. <Image Grid.Row="2" Source="../image/直线.png" Stretch="Fill"/>
  152. <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
  153. <Button Content="执行订单" Width="100" Height="24" HorizontalAlignment="Right" Margin="10,0" Foreground="#ff2bd06f"
  154. BorderBrush="Transparent" Background="#332bd06f" Opacity="0.9" Style="{DynamicResource GreenButton}"
  155. Command="{Binding }"
  156. />
  157. <Button Content="删除订单" Width="100" Height="24" HorizontalAlignment="Right" Margin="10,0" Foreground="#FFF53F62"
  158. BorderBrush="Transparent" Background="#24F53F62" Opacity="0.9"
  159. Style="{DynamicResource DeleteButton}"
  160. Command="{Binding }"
  161. CommandParameter="{Binding}"/>
  162. </StackPanel>
  163. </Grid>
  164. </Border>
  165. </Border>
  166. <ControlTemplate.Triggers>
  167. <Trigger Property="IsMouseOver" Value="True">
  168. <Setter Property="BorderBrush" Value="#4169E1" TargetName="mborder"/>
  169. <Setter Property="Opacity" Value="1" TargetName="mborder"/>
  170. </Trigger>
  171. <Trigger Property="IsFocused" Value="True">
  172. </Trigger>
  173. </ControlTemplate.Triggers>
  174. </ControlTemplate>
  175. </Setter.Value>
  176. </Setter>
  177. </Style>
  178. </UserControl.Resources>
  179. <Border>
  180. <Border.Background>
  181. <ImageBrush ImageSource="../image/中间.png"/>
  182. </Border.Background>
  183. <Grid>
  184. <Grid.RowDefinitions>
  185. <RowDefinition Height="17"/>
  186. <RowDefinition Height="40"/>
  187. <RowDefinition Height="28"/>
  188. <RowDefinition />
  189. </Grid.RowDefinitions>
  190. <TextBlock Grid.Row="1" Text="订单列表" FontSize="28" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  191. <Button Grid.Row="2" Content="创建订单" Width="100" Height="28" HorizontalAlignment="Right" Margin="20,0" Style="{DynamicResource CommonButton}"
  192. Command="{Binding CreateOrderCommand}"/>
  193. <ListView Grid.Row="3" Margin="0" Background="Transparent" BorderBrush="Transparent"
  194. ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding orders}" >
  195. <ListBox.ItemsPanel>
  196. <ItemsPanelTemplate>
  197. <WrapPanel Margin="10"/>
  198. </ItemsPanelTemplate>
  199. </ListBox.ItemsPanel>
  200. </ListView>
  201. </Grid>
  202. </Border>
  203. </UserControl>