终端一体化运控平台
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

369 líneas
18 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.CustomResource.UserControls.MaterialStock"
  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.CustomResource.UserControls"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. d:DesignHeight="450"
  9. d:DesignWidth="800"
  10. mc:Ignorable="d">
  11. <UserControl.Resources>
  12. <PathGeometry x:Key="move" Figures="M 0,0 L 0,10" />
  13. </UserControl.Resources>
  14. <Border HorizontalAlignment="Center">
  15. <Viewbox HorizontalAlignment="Center" VerticalAlignment="Center">
  16. <Canvas
  17. Width="205"
  18. Height="245"
  19. Margin="5">
  20. <Polygon Canvas.Left="67" Points="0,80 20,40 205,40 185,80">
  21. <Polygon.RenderTransform>
  22. <SkewTransform AngleX="-40" />
  23. </Polygon.RenderTransform>
  24. <Polygon.Fill>
  25. <!--<LinearGradientBrush StartPoint="1,0" EndPoint="1,1">
  26. <GradientStop Color="LightGray" Offset="0"/>
  27. <GradientStop Color="WhiteSmoke" Offset="0.85"/>
  28. <GradientStop Color="LightGray" Offset="1"/>
  29. </LinearGradientBrush>-->
  30. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/不锈钢纹理2.jpeg" Stretch="Fill" />
  31. </Polygon.Fill>
  32. </Polygon>
  33. <Polygon
  34. Canvas.Left="67"
  35. Width="200"
  36. Height="70"
  37. Points="45,70 60,50 170,50 155,70"
  38. Stroke="Gray"
  39. StrokeThickness="2">
  40. <Polygon.RenderTransform>
  41. <SkewTransform AngleX="-40" />
  42. </Polygon.RenderTransform>
  43. </Polygon>
  44. <Polygon
  45. x:Name="stock"
  46. Canvas.Left="67"
  47. Width="0"
  48. Height="0"
  49. Points="45,70 60,50 170,50 155,70">
  50. <Polygon.Fill>
  51. <SolidColorBrush Color="DimGray" />
  52. </Polygon.Fill>
  53. <Polygon.RenderTransform>
  54. <SkewTransform AngleX="-40" />
  55. </Polygon.RenderTransform>
  56. </Polygon>
  57. <Polygon Panel.ZIndex="1" Points="-5,90 0,80 185,80 180,90">
  58. <Polygon.Fill>
  59. <LinearGradientBrush>
  60. <GradientStop Offset="0" Color="LightGray" />
  61. <GradientStop Offset="0.66" Color="White" />
  62. <GradientStop Offset="0.95" Color="LightGray" />
  63. </LinearGradientBrush>
  64. </Polygon.Fill>
  65. </Polygon>
  66. <Grid
  67. Canvas.Top="80"
  68. Width="185"
  69. Height="160">
  70. <Grid.Background>
  71. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/不锈钢纹理.jpg" Stretch="Fill" />
  72. </Grid.Background>
  73. <!--<Grid VerticalAlignment="Bottom" Height="20" Margin="5">
  74. <Grid.ColumnDefinitions>
  75. <ColumnDefinition/>
  76. <ColumnDefinition/>
  77. </Grid.ColumnDefinitions>
  78. <Button Width="60">
  79. <Button.Template>
  80. <ControlTemplate TargetType="{x:Type Button}">
  81. <Border x:Name="br" BorderThickness="2" BorderBrush="DimGray" CornerRadius="5" Background="Orange">
  82. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" >
  83. <TextBlock VerticalAlignment="Center" Text="&#xe79e;" FontFamily="/BPASmartClient.CustomResource;component/Fonts/new/#iconfont" Margin="0,0,5,0"/>
  84. <TextBlock Text="开盖" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14"/>
  85. </StackPanel>
  86. </Border>
  87. <ControlTemplate.Triggers>
  88. <Trigger Property="IsPressed" Value="True">
  89. <Setter Property="Background" Value="yellow" TargetName="br"/>
  90. </Trigger>
  91. </ControlTemplate.Triggers>
  92. </ControlTemplate>
  93. </Button.Template>
  94. </Button>
  95. <Button Width="60" Grid.Column="1">
  96. <Button.Template>
  97. <ControlTemplate TargetType="{x:Type Button}">
  98. <Border x:Name="br1" BorderThickness="2" BorderBrush="DimGray" CornerRadius="5" Background="yellowgreen">
  99. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" >
  100. <TextBlock VerticalAlignment="Center" Text="&#xe63f;" FontFamily="/BPASmartClient.CustomResource;component/Fonts/new/#iconfont" Margin="0,0,5,0"/>
  101. <TextBlock Text="出料" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14"/>
  102. </StackPanel>
  103. </Border>
  104. <ControlTemplate.Triggers>
  105. <Trigger Property="IsPressed" Value="True">
  106. <Setter Property="Background" Value="lawngreen" TargetName="br1"/>
  107. </Trigger>
  108. </ControlTemplate.Triggers>
  109. </ControlTemplate>
  110. </Button.Template>
  111. </Button>
  112. </Grid>-->
  113. </Grid>
  114. <Grid
  115. Canvas.Top="90"
  116. Width="185"
  117. Height="60">
  118. <Grid.Background>
  119. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/不锈钢纹理2.jpeg" />
  120. </Grid.Background>
  121. <Grid.RenderTransform>
  122. <TranslateTransform X="-5" />
  123. </Grid.RenderTransform>
  124. <TextBox
  125. x:Name="stockName"
  126. Width="58"
  127. Height="50"
  128. HorizontalAlignment="Left"
  129. HorizontalContentAlignment="Center"
  130. VerticalContentAlignment="Center"
  131. Background="Transparent"
  132. BorderThickness="0"
  133. FontSize="13"
  134. Foreground="DarkSlateGray" />
  135. <Border
  136. Width="80"
  137. Height="50"
  138. Margin="15,0,0,0"
  139. BorderBrush="DimGray "
  140. BorderThickness="2"
  141. CornerRadius="5">
  142. <StackPanel>
  143. <TextBlock
  144. Margin="0,2,0,5"
  145. HorizontalAlignment="Center"
  146. FontFamily="幼圆"
  147. FontSize="12"
  148. Text="剩余重量" />
  149. <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
  150. <TextBlock
  151. x:Name="stockWeight"
  152. HorizontalAlignment="Center"
  153. FontSize="16" />
  154. <TextBlock FontSize="16" Text="Kg" />
  155. </StackPanel>
  156. </StackPanel>
  157. </Border>
  158. </Grid>
  159. <Grid
  160. Canvas.Left="180"
  161. Canvas.Top="90"
  162. Width="40"
  163. Height="60">
  164. <Grid.Background>
  165. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/不锈钢纹理3.jpeg" Stretch="UniformToFill" />
  166. </Grid.Background>
  167. <Grid.RenderTransform>
  168. <TransformGroup>
  169. <ScaleTransform ScaleX="0.119" />
  170. <SkewTransform AngleY="-65.5" />
  171. </TransformGroup>
  172. </Grid.RenderTransform>
  173. <!--<Border VerticalAlignment="Top" Height="140" BorderThickness="10">
  174. <Border.Background>
  175. <SolidColorBrush Color="BlueViolet"/>
  176. </Border.Background>
  177. </Border>-->
  178. <!--<Grid VerticalAlignment="Bottom" Height="40" Margin="5">
  179. <Grid.ColumnDefinitions>
  180. <ColumnDefinition/>
  181. <ColumnDefinition/>
  182. </Grid.ColumnDefinitions>
  183. <Border Background="#FFAAAAAA" Margin="2"/>
  184. <Border Background="#FFAAAAAA" Margin="2" Grid.Column="1"/>
  185. </Grid>-->
  186. </Grid>
  187. <Path
  188. x:Name="arrow"
  189. Canvas.Left="113"
  190. Canvas.Top="175"
  191. Data="M -15,8 L 17,17 C 17,17 19,18 17,19 L 17,19 L -15,28 C -15,28 -17,28.2 -16,26 L -16,26 L -5,18 L -16,10 C -16,10 -17,8.5 -15,8 Z"
  192. Visibility="Collapsed">
  193. <Path.RenderTransform>
  194. <TransformGroup>
  195. <RotateTransform Angle="90" />
  196. <TranslateTransform Y="0" />
  197. </TransformGroup>
  198. </Path.RenderTransform>
  199. <Path.Fill>
  200. <LinearGradientBrush>
  201. <LinearGradientBrush.RelativeTransform>
  202. <RotateTransform Angle="-15" />
  203. </LinearGradientBrush.RelativeTransform>
  204. <GradientStop Offset="0" Color="LightGray" />
  205. <GradientStop Offset="0.4" Color="White" />
  206. <GradientStop Offset="1" Color="AntiqueWhite" />
  207. </LinearGradientBrush>
  208. </Path.Fill>
  209. </Path>
  210. <!--<Path Data="M 95,190 L 95,200" Stroke="Red"/>-->
  211. <Grid
  212. Canvas.Left="185"
  213. Canvas.Top="80"
  214. Width="185"
  215. Height="160">
  216. <Grid.Background>
  217. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/不锈钢纹理.jpg" />
  218. </Grid.Background>
  219. <Grid.RenderTransform>
  220. <TransformGroup>
  221. <ScaleTransform ScaleX="0.288" />
  222. <SkewTransform AngleY="-36.8" />
  223. </TransformGroup>
  224. </Grid.RenderTransform>
  225. <!--<Border VerticalAlignment="Top" Height="140" BorderThickness="10">
  226. <Border.Background>
  227. <DrawingBrush TileMode="Tile" ViewportUnits="Absolute" Viewport="1,0,25,1">
  228. <DrawingBrush.Drawing>
  229. <GeometryDrawing>
  230. <GeometryDrawing.Pen>
  231. <Pen Brush="#EEE"/>
  232. </GeometryDrawing.Pen>
  233. <GeometryDrawing.Geometry>
  234. <PathGeometry>
  235. <PathFigure>
  236. <LineSegment Point="10,0"/>
  237. <LineSegment Point="10,10"/>
  238. </PathFigure>
  239. </PathGeometry>
  240. </GeometryDrawing.Geometry>
  241. </GeometryDrawing>
  242. </DrawingBrush.Drawing>
  243. </DrawingBrush>
  244. </Border.Background>
  245. </Border>-->
  246. <!--<Grid VerticalAlignment="Bottom" Height="40" Margin="5">
  247. <Grid.ColumnDefinitions>
  248. <ColumnDefinition/>
  249. <ColumnDefinition/>
  250. </Grid.ColumnDefinitions>
  251. <Border Background="#FFAAAAAA" Margin="2"/>
  252. <Border Background="#FFAAAAAA" Margin="2" Grid.Column="1"/>
  253. </Grid>-->
  254. </Grid>
  255. <Border
  256. Canvas.Left="150"
  257. Canvas.Top="100"
  258. Width="18"
  259. Height="18"
  260. CornerRadius="10">
  261. <Border.Background>
  262. <RadialGradientBrush>
  263. <GradientStop x:Name="gsGreen" Offset="0.6" Color="Gray" />
  264. <GradientStop Color="White" />
  265. </RadialGradientBrush>
  266. </Border.Background>
  267. </Border>
  268. <Border
  269. Canvas.Left="150"
  270. Canvas.Top="125"
  271. Width="18"
  272. Height="18"
  273. CornerRadius="10">
  274. <Border.Background>
  275. <RadialGradientBrush>
  276. <GradientStop x:Name="gsRed1" Offset="0.6" Color="Gray" />
  277. <GradientStop Color="White" />
  278. </RadialGradientBrush>
  279. </Border.Background>
  280. </Border>
  281. </Canvas>
  282. </Viewbox>
  283. <VisualStateManager.VisualStateGroups>
  284. <VisualStateGroup Name="StockGroup">
  285. <VisualState Name="OpenState">
  286. <Storyboard>
  287. <DoubleAnimation
  288. Storyboard.TargetName="stock"
  289. Storyboard.TargetProperty="Width"
  290. From="0"
  291. To="200"
  292. Duration="00:0:1" />
  293. <DoubleAnimation
  294. Storyboard.TargetName="stock"
  295. Storyboard.TargetProperty="Height"
  296. From="0"
  297. To="70"
  298. Duration="00:0:1" />
  299. </Storyboard>
  300. </VisualState>
  301. <VisualState Name="CloseState">
  302. <Storyboard>
  303. <DoubleAnimation
  304. Storyboard.TargetName="stock"
  305. Storyboard.TargetProperty="Width"
  306. From="200"
  307. To="0"
  308. Duration="00:0:1" />
  309. <DoubleAnimation
  310. Storyboard.TargetName="stock"
  311. Storyboard.TargetProperty="Height"
  312. From="70"
  313. To="0"
  314. Duration="00:0:1" />
  315. </Storyboard>
  316. </VisualState>
  317. </VisualStateGroup>
  318. <VisualStateGroup Name="RunStateGroup">
  319. <VisualState Name="RunState">
  320. <Storyboard>
  321. <ColorAnimationUsingKeyFrames Storyboard.TargetName="gsGreen" Storyboard.TargetProperty="Color">
  322. <DiscreteColorKeyFrame KeyTime="0" Value="Green" />
  323. </ColorAnimationUsingKeyFrames>
  324. </Storyboard>
  325. </VisualState>
  326. <VisualState Name="Stop" />
  327. </VisualStateGroup>
  328. <VisualStateGroup x:Name="FaultStateGroup">
  329. <VisualState Name="FaultState">
  330. <Storyboard>
  331. <ColorAnimationUsingKeyFrames
  332. RepeatBehavior="Forever"
  333. Storyboard.TargetName="gsRed1"
  334. Storyboard.TargetProperty="Color">
  335. <DiscreteColorKeyFrame KeyTime="0:0:0.5" Value="Red" />
  336. <DiscreteColorKeyFrame KeyTime="0:0:1" Value="Gray" />
  337. </ColorAnimationUsingKeyFrames>
  338. </Storyboard>
  339. </VisualState>
  340. <VisualState Name="NormalState" />
  341. </VisualStateGroup>
  342. <VisualStateGroup x:Name="LayOffStateGroup">
  343. <VisualState Name="LayOffState">
  344. <Storyboard>
  345. <DoubleAnimationUsingPath
  346. PathGeometry="{StaticResource move}"
  347. RepeatBehavior="Forever"
  348. Source="Y"
  349. Storyboard.TargetName="arrow"
  350. Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(Y)"
  351. Duration="0:0:1" />
  352. </Storyboard>
  353. </VisualState>
  354. <VisualState Name="LayStopState" />
  355. </VisualStateGroup>
  356. </VisualStateManager.VisualStateGroups>
  357. </Border>
  358. </UserControl>