终端一体化运控平台
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.
 
 
 

68 lines
2.7 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.CustomResource.UserControls.MotorBottle"
  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="500"
  9. d:DesignWidth="700"
  10. mc:Ignorable="d">
  11. <Grid Name="gr">
  12. <Viewbox >
  13. <Canvas Width="700" Height="500">
  14. <local:Bottle
  15. x:Name="bottle"
  16. Canvas.Left="608"
  17. Width="84"
  18. Height="257" HorizontalAlignment="Center" VerticalAlignment="Top" Canvas.Top="10" />
  19. <local:DosingSystem
  20. Height="386"
  21. Width="827"
  22. VerticalAlignment="Center" Canvas.Left="-66" Canvas.Top="186" HorizontalAlignment="Left" />
  23. <Ellipse
  24. Name="ep"
  25. Canvas.Left="630"
  26. Canvas.Top="339"
  27. Width="40"
  28. Height="40"
  29. Fill="Red" HorizontalAlignment="Center" VerticalAlignment="Top" />
  30. </Canvas>
  31. </Viewbox>
  32. <VisualStateManager.VisualStateGroups>
  33. <VisualStateGroup>
  34. <VisualState Name="Start">
  35. <Storyboard AutoReverse="True" x:Name="sb" RepeatBehavior="Forever">
  36. <DoubleAnimation
  37. Storyboard.TargetName="ep"
  38. Storyboard.TargetProperty="Opacity"
  39. From="0"
  40. To="1"
  41. Duration="0:0:1" />
  42. <ColorAnimation Storyboard.TargetName="ep" Storyboard.TargetProperty="(Ellipse.Fill).(SolidColorBrush.Color)" From="Green" To="Green"/>
  43. </Storyboard>
  44. </VisualState>
  45. <VisualState Name="Stop">
  46. <Storyboard>
  47. <DoubleAnimation
  48. Storyboard.TargetName="ep"
  49. Storyboard.TargetProperty="Opacity"
  50. To="1"
  51. Duration="0:0:1" />
  52. <ColorAnimation Storyboard.TargetName="ep" Storyboard.TargetProperty="(Ellipse.Fill).(SolidColorBrush.Color)" To="Red" From="Red"/>
  53. </Storyboard>
  54. </VisualState>
  55. </VisualStateGroup>
  56. </VisualStateManager.VisualStateGroups>
  57. </Grid>
  58. </UserControl>