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

330 lines
13 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.CustomResource.UserControls.Cylinder"
  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="100"
  9. d:DesignWidth="389"
  10. mc:Ignorable="d">
  11. <UserControl.Resources>
  12. <SolidColorBrush x:Key="scb" Color="#FFB1B1B9" />
  13. <SolidColorBrush x:Key="scbs" Color="#FF6d6666" />
  14. <SineEase x:Key="SineEaseOut" EasingMode="EaseOut" />
  15. <Storyboard x:Key="AnimateRound" RepeatBehavior="Forever">
  16. <DoubleAnimation
  17. EasingFunction="{StaticResource SineEaseOut}"
  18. Storyboard.TargetName="Scale"
  19. Storyboard.TargetProperty="ScaleX"
  20. To="2"
  21. Duration="0:0:01" />
  22. <DoubleAnimation
  23. EasingFunction="{StaticResource SineEaseOut}"
  24. Storyboard.TargetName="Scale"
  25. Storyboard.TargetProperty="ScaleY"
  26. To="2"
  27. Duration="0:0:01" />
  28. <DoubleAnimation
  29. EasingFunction="{StaticResource SineEaseOut}"
  30. Storyboard.TargetProperty="Opacity"
  31. To="0"
  32. Duration="0:0:01" />
  33. </Storyboard>
  34. <Style x:Key="toggleButtonStyle" TargetType="ToggleButton">
  35. <Setter Property="Template">
  36. <Setter.Value>
  37. <ControlTemplate TargetType="ToggleButton">
  38. <Grid>
  39. <Ellipse
  40. Name="el"
  41. Width="{TemplateBinding Width}"
  42. Height="{TemplateBinding Height}"
  43. Fill="Red"
  44. RenderTransformOrigin="0.5,0.5">
  45. <Ellipse.OpacityMask>
  46. <RadialGradientBrush>
  47. <GradientStop Offset="0" Color="Transparent" />
  48. <GradientStop Offset="1" Color="Black" />
  49. </RadialGradientBrush>
  50. </Ellipse.OpacityMask>
  51. <Ellipse.RenderTransform>
  52. <ScaleTransform x:Name="Scale" />
  53. </Ellipse.RenderTransform>
  54. <!--<Ellipse.Triggers>
  55. <EventTrigger RoutedEvent="Loaded">
  56. <BeginStoryboard Storyboard="{StaticResource AnimateRound}" />
  57. </EventTrigger>
  58. </Ellipse.Triggers>-->
  59. </Ellipse>
  60. </Grid>
  61. <ControlTemplate.Triggers>
  62. <Trigger Property="IsChecked" Value="True">
  63. <Setter TargetName="el" Property="Fill" Value="Green" />
  64. </Trigger>
  65. <!--<Trigger Property="IsChecked" Value="False">
  66. <Setter TargetName="el" Property="Fill" Value="red" />
  67. </Trigger>-->
  68. </ControlTemplate.Triggers>
  69. </ControlTemplate>
  70. </Setter.Value>
  71. </Setter>
  72. </Style>
  73. </UserControl.Resources>
  74. <Grid Name="cav">
  75. <Viewbox Width="auto" Height="auto">
  76. <Canvas
  77. Name="cv"
  78. Width="389"
  79. Height="100">
  80. <Path
  81. Data="M2 30 L2 70"
  82. Stroke="{StaticResource scb}"
  83. StrokeThickness="4" />
  84. <Path
  85. Data="M6 30 L6 70"
  86. Stroke="{StaticResource scbs}"
  87. StrokeThickness="4" />
  88. <Path
  89. Data="M10 30 L10 70"
  90. Stroke="{StaticResource scb}"
  91. StrokeThickness="4" />
  92. <Path
  93. Data="M14 30 L14 70"
  94. Stroke="{StaticResource scbs}"
  95. StrokeThickness="4" />
  96. <Path
  97. Data="M18 30 L18 70"
  98. Stroke="{StaticResource scb}"
  99. StrokeThickness="4" />
  100. <Path
  101. Data="M22 30 L22 70"
  102. Stroke="{StaticResource scbs}"
  103. StrokeThickness="4" />
  104. <Path
  105. Data="M26 30 L26 70"
  106. Stroke="{StaticResource scb}"
  107. StrokeThickness="4" />
  108. <Path
  109. Data="M30 30 L30 70"
  110. Stroke="{StaticResource scbs}"
  111. StrokeThickness="4" />
  112. <Path
  113. Data="M34 30 L34 70"
  114. Stroke="{StaticResource scb}"
  115. StrokeThickness="4" />
  116. <Path
  117. Data="M38 30 L38 70"
  118. Stroke="{StaticResource scbs}"
  119. StrokeThickness="4" />
  120. <Path
  121. Data="M42 30 L42 70"
  122. Stroke="{StaticResource scb}"
  123. StrokeThickness="4" />
  124. <Path
  125. Data="M46 30 L46 70"
  126. Stroke="{StaticResource scbs}"
  127. StrokeThickness="4" />
  128. <Path
  129. Data="M50 30 L50 70"
  130. Stroke="{StaticResource scb}"
  131. StrokeThickness="4" />
  132. <Path
  133. Data="M54 30 L54 70"
  134. Stroke="{StaticResource scbs}"
  135. StrokeThickness="4" />
  136. <Path
  137. Data="M58 30 L58 70"
  138. Stroke="{StaticResource scb}"
  139. StrokeThickness="4" />
  140. <Path
  141. Data="M62 30 L62 70"
  142. Stroke="{StaticResource scbs}"
  143. StrokeThickness="4" />
  144. <Path
  145. Data="M64 30 L64 70"
  146. Stroke="{StaticResource scb}"
  147. StrokeThickness="4" />
  148. <Path
  149. Data="M68 30 L68 70"
  150. Stroke="{StaticResource scbs}"
  151. StrokeThickness="4" />
  152. <Path
  153. Data="M72 30 L72 70"
  154. Stroke="{StaticResource scb}"
  155. StrokeThickness="4" />
  156. <Path
  157. Data="M76 30 L76 70"
  158. Stroke="{StaticResource scbs}"
  159. StrokeThickness="4" />
  160. <Path
  161. Data="M80 30 L80 70"
  162. Stroke="{StaticResource scb}"
  163. StrokeThickness="4" />
  164. <Path
  165. Data="M84 30 L84 70"
  166. Stroke="{StaticResource scbs}"
  167. StrokeThickness="4" />
  168. <Path
  169. Data="M88 30 L88 70"
  170. Stroke="{StaticResource scb}"
  171. StrokeThickness="4" />
  172. <Path
  173. Data="M92 30 L92 70"
  174. Stroke="{StaticResource scbs}"
  175. StrokeThickness="4" />
  176. <Path
  177. Data="M102 30 L102 70"
  178. Stroke="{StaticResource scbs}"
  179. StrokeThickness="16" />
  180. <Path
  181. Data="M50 20 L50 80"
  182. Stroke="{StaticResource scb}"
  183. StrokeThickness="20" />
  184. <Path
  185. Data="M42,25 L58,25 60,30 60,45 58,50 60,55 60,70 58,75 42,75 40,70 40,55 42,50 40,45 40,30 42,25"
  186. Stroke="{StaticResource scbs}"
  187. StrokeThickness="1" />
  188. <Path
  189. Data="M42 50 L58 50"
  190. Stroke="{StaticResource scbs}"
  191. StrokeThickness="1" />
  192. <Path Data="M110 0 L110,100 160,100 175,80 300 ,80 315,100 365,100 365,0 315,0 300,20 175,20 160,0 110,0">
  193. <Path.Fill>
  194. <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
  195. <GradientStop Color="#FF1EDEDA" />
  196. <GradientStop Offset="1" Color="#FF1EDEDA" />
  197. <GradientStop Offset="0.5" Color="#FFDDEAE9" />
  198. </LinearGradientBrush>
  199. </Path.Fill>
  200. </Path>
  201. <Path
  202. Data="M110 30 L160,30 A2,5 0 1 1 160,70 L110,70"
  203. Stroke="{StaticResource scb}"
  204. StrokeThickness="2" />
  205. <Path
  206. Data="M160 0 L160,30"
  207. Stroke="{StaticResource scb}"
  208. StrokeThickness="2" />
  209. <Path
  210. Data="M160 70 L160,100"
  211. Stroke="{StaticResource scb}"
  212. StrokeThickness="2" />
  213. <Path
  214. Data="M175 20 L175,80"
  215. Stroke="{StaticResource scb}"
  216. StrokeThickness="2" />
  217. <Path
  218. Data="M179 20 L179,80"
  219. Stroke="{StaticResource scb}"
  220. StrokeThickness="2" />
  221. <Path
  222. Data="M183 20 L183,80"
  223. Stroke="{StaticResource scb}"
  224. StrokeThickness="2" />
  225. <Path
  226. Data="M187 20 L187,80"
  227. Stroke="{StaticResource scb}"
  228. StrokeThickness="2" />
  229. <Path
  230. Data="M365 30 L315,30 A2,5 0 1 0 315,70 L365,70"
  231. Stroke="{StaticResource scb}"
  232. StrokeThickness="2" />
  233. <Path
  234. Data="M315 0 L315,30"
  235. Stroke="{StaticResource scb}"
  236. StrokeThickness="2" />
  237. <Path
  238. Data="M315 70 L315,100"
  239. Stroke="{StaticResource scb}"
  240. StrokeThickness="2" />
  241. <Path
  242. Data="M300 20 L300,80"
  243. Stroke="{StaticResource scb}"
  244. StrokeThickness="2" />
  245. <Path
  246. Data="M296 20 L296,80"
  247. Stroke="{StaticResource scb}"
  248. StrokeThickness="2" />
  249. <Path
  250. Data="M292 20 L292,80"
  251. Stroke="{StaticResource scb}"
  252. StrokeThickness="2" />
  253. <Path
  254. Data="M288 20 L288,80"
  255. Stroke="{StaticResource scb}"
  256. StrokeThickness="2" />
  257. <Path
  258. Data="M367 20 L367 80"
  259. Stroke="{StaticResource scb}"
  260. StrokeThickness="4" />
  261. <Path
  262. Data="M371 20 L371 80"
  263. Stroke="{StaticResource scbs}"
  264. StrokeThickness="4" />
  265. <Path
  266. Data="M375 20 L375 80"
  267. Stroke="{StaticResource scb}"
  268. StrokeThickness="4" />
  269. <Path
  270. Data="M379 20 L379 80"
  271. Stroke="{StaticResource scbs}"
  272. StrokeThickness="4" />
  273. <Path
  274. Data="M383 20 L383 80"
  275. Stroke="{StaticResource scb}"
  276. StrokeThickness="4" />
  277. <Path
  278. Data="M387 20 L387 80"
  279. Stroke="{StaticResource scbs}"
  280. StrokeThickness="4" />
  281. <ToggleButton
  282. Name="LeftTog"
  283. Width="30"
  284. Height="30"
  285. Margin="120,35,0,0"
  286. HorizontalAlignment="Left"
  287. IsEnabled="False"
  288. Style="{StaticResource toggleButtonStyle}" />
  289. <ToggleButton
  290. Name="RightTog"
  291. Width="30"
  292. Height="30"
  293. Margin="325,35,0,0"
  294. HorizontalAlignment="Left"
  295. IsEnabled="False"
  296. Style="{StaticResource toggleButtonStyle}" />
  297. <!--<Ellipse
  298. Width="30"
  299. Height="30"
  300. Margin="120,35,0,0"
  301. HorizontalAlignment="Left"
  302. Fill="Red" />-->
  303. <!--<Ellipse
  304. Width="30"
  305. Height="30"
  306. Margin="325,35,0,0"
  307. HorizontalAlignment="Left"
  308. Fill="Red" />-->
  309. </Canvas>
  310. </Viewbox>
  311. </Grid>
  312. </UserControl>