OperateMedicine.xaml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. <metro:Flyout
  2. x:Class="SHJX.Service.Main.Views.Sidebar.OperateMedicine"
  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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls"
  8. xmlns:prism="http://prismlibrary.com/"
  9. xmlns:pu="clr-namespace:Panuon.UI.Silver;assembly=Panuon.UI.Silver"
  10. d:DesignHeight="400"
  11. d:DesignWidth="300"
  12. prism:ViewModelLocator.AutoWireViewModel="True"
  13. Background="#6452A4"
  14. FontSize="15"
  15. Header="其他操作"
  16. Position="Right"
  17. mc:Ignorable="d">
  18. <!--#region 资源文件-->
  19. <metro:Flyout.Resources>
  20. <!--#region 刷新按钮样式-->
  21. <Style x:Key="FocusVisual">
  22. <Setter Property="Control.Template">
  23. <Setter.Value>
  24. <ControlTemplate>
  25. <Rectangle
  26. Margin="2"
  27. SnapsToDevicePixels="true"
  28. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  29. StrokeDashArray="1 2"
  30. StrokeThickness="1" />
  31. </ControlTemplate>
  32. </Setter.Value>
  33. </Setter>
  34. </Style>
  35. <SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD" />
  36. <SolidColorBrush x:Key="Button.Static.Border" Color="Transparent" />
  37. <SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD" />
  38. <SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1" />
  39. <SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6" />
  40. <SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B" />
  41. <SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4" />
  42. <SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5" />
  43. <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383" />
  44. <Style x:Key="ButtonStyle_User_Frush" TargetType="{x:Type Button}">
  45. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
  46. <Setter Property="Background" Value="{StaticResource Button.Static.Background}" />
  47. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}" />
  48. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  49. <Setter Property="BorderThickness" Value="1" />
  50. <Setter Property="HorizontalContentAlignment" Value="Center" />
  51. <Setter Property="VerticalContentAlignment" Value="Center" />
  52. <Setter Property="Padding" Value="1" />
  53. <Setter Property="Template">
  54. <Setter.Value>
  55. <ControlTemplate TargetType="{x:Type Button}">
  56. <Border
  57. x:Name="border"
  58. Background="{TemplateBinding Background}"
  59. BorderBrush="{TemplateBinding BorderBrush}"
  60. BorderThickness="{TemplateBinding BorderThickness}"
  61. SnapsToDevicePixels="true">
  62. <ContentPresenter
  63. x:Name="contentPresenter"
  64. Margin="{TemplateBinding Padding}"
  65. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  66. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  67. Focusable="False"
  68. RecognizesAccessKey="True"
  69. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  70. </Border>
  71. <ControlTemplate.Triggers>
  72. <Trigger Property="IsDefaulted" Value="true">
  73. <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
  74. </Trigger>
  75. <Trigger Property="IsMouseOver" Value="true">
  76. <Setter TargetName="border" Property="Background" Value="Transparent" />
  77. </Trigger>
  78. <Trigger Property="IsPressed" Value="true">
  79. <Setter TargetName="border" Property="Background" Value="Transparent" />
  80. </Trigger>
  81. <Trigger Property="IsEnabled" Value="false">
  82. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Disabled.Background}" />
  83. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Disabled.Border}" />
  84. <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{StaticResource Button.Disabled.Foreground}" />
  85. </Trigger>
  86. </ControlTemplate.Triggers>
  87. </ControlTemplate>
  88. </Setter.Value>
  89. </Setter>
  90. </Style>
  91. <!--#endregion-->
  92. <Style x:Key="BtnInfoStyle" TargetType="Button">
  93. <Setter Property="Width" Value="70" />
  94. <Setter Property="Height" Value="25" />
  95. <Setter Property="Foreground" Value="White" />
  96. <Setter Property="BorderThickness" Value="0" />
  97. <Setter Property="Background" Value="#1296db" />
  98. <Setter Property="Template">
  99. <Setter.Value>
  100. <ControlTemplate TargetType="Button">
  101. <Border
  102. x:Name="border"
  103. Background="{TemplateBinding Background}"
  104. BorderBrush="{TemplateBinding BorderBrush}"
  105. BorderThickness="{TemplateBinding BorderThickness}"
  106. CornerRadius="45"
  107. SnapsToDevicePixels="True">
  108. <TextBlock
  109. HorizontalAlignment="Center"
  110. VerticalAlignment="Center"
  111. FontSize="24"
  112. Foreground="{TemplateBinding Foreground}"
  113. Text="{TemplateBinding Content}" />
  114. </Border>
  115. <ControlTemplate.Triggers>
  116. <Trigger Property="IsMouseOver" Value="True">
  117. <Setter TargetName="border" Property="Background" Value="#87CEFA" />
  118. </Trigger>
  119. <Trigger Property="IsPressed" Value="True">
  120. <Setter TargetName="border" Property="Background" Value="#87CEFA" />
  121. </Trigger>
  122. </ControlTemplate.Triggers>
  123. </ControlTemplate>
  124. </Setter.Value>
  125. </Setter>
  126. </Style>
  127. </metro:Flyout.Resources>
  128. <!--#endregion-->
  129. <StackPanel>
  130. <Grid Margin="5">
  131. <UniformGrid Margin="40,0" Rows="5">
  132. <!--<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
  133. <TextBlock
  134. HorizontalAlignment="Center"
  135. VerticalAlignment="Center"
  136. FontSize="18"
  137. FontWeight="Bold"
  138. Foreground="White"
  139. Text="是否润洗:" />
  140. <CheckBox
  141. x:Name="CbWash"
  142. Height="50"
  143. HorizontalAlignment="Left"
  144. pu:CheckBoxHelper.BoxHeight="16"
  145. pu:CheckBoxHelper.BoxWidth="24"
  146. pu:CheckBoxHelper.CheckBoxStyle="Switch"
  147. pu:CheckBoxHelper.CheckedBackground="#6452A4"
  148. Cursor="Hand"
  149. IsChecked="{Binding WhetherWash, Mode=OneWayToSource}" />
  150. </StackPanel>-->
  151. <StackPanel VerticalAlignment="Center" Orientation="Horizontal">
  152. <TextBlock
  153. HorizontalAlignment="Center"
  154. VerticalAlignment="Center"
  155. FontSize="18"
  156. FontWeight="Bold"
  157. Foreground="White"
  158. Text="锁定屏幕:" />
  159. <CheckBox
  160. Height="50"
  161. HorizontalAlignment="Left"
  162. pu:CheckBoxHelper.BoxHeight="16"
  163. pu:CheckBoxHelper.BoxWidth="24"
  164. pu:CheckBoxHelper.CheckBoxStyle="Switch"
  165. pu:CheckBoxHelper.CheckedBackground="#6452A4"
  166. Command="{Binding LockDestCommand}"
  167. Cursor="Hand"
  168. IsChecked="{Binding WhetherLockMain, Mode=OneWayToSource}" />
  169. </StackPanel>
  170. <StackPanel
  171. HorizontalAlignment="Left"
  172. VerticalAlignment="Center"
  173. Orientation="Horizontal">
  174. <TextBlock
  175. HorizontalAlignment="Center"
  176. VerticalAlignment="Center"
  177. FontSize="18"
  178. FontWeight="Bold"
  179. Foreground="White"
  180. Text="通信端口:" />
  181. <TextBlock
  182. Margin="0,0,20,0"
  183. HorizontalAlignment="Center"
  184. VerticalAlignment="Center"
  185. FontSize="16"
  186. FontWeight="Black"
  187. Foreground="White"
  188. Text="{Binding ClientName}" />
  189. </StackPanel>
  190. <StackPanel
  191. HorizontalAlignment="Left"
  192. VerticalAlignment="Center"
  193. Orientation="Horizontal">
  194. <TextBlock
  195. HorizontalAlignment="Center"
  196. VerticalAlignment="Center"
  197. FontSize="18"
  198. FontWeight="Bold"
  199. Foreground="White"
  200. Text="连接状态:" />
  201. <pu:Badge
  202. Height="32"
  203. Margin="0,0,5,0"
  204. HorizontalAlignment="Center"
  205. VerticalAlignment="Center"
  206. Background="{Binding PortClientFill}"
  207. IsWaving="{Binding PortClientState}" />
  208. <Button
  209. Width="25"
  210. Height="25"
  211. HorizontalAlignment="Center"
  212. VerticalAlignment="Center"
  213. Background="Transparent"
  214. Command="{Binding FreshClientCommand}"
  215. Cursor="Hand"
  216. RenderTransformOrigin="0.5,0.5"
  217. Style="{DynamicResource ButtonStyle_User_Frush}">
  218. <Image
  219. Width="24"
  220. Height="24"
  221. HorizontalAlignment="Center"
  222. VerticalAlignment="Center"
  223. Source="/SHJX.Service.Resource;component/Assets/Photos/Cycle.png" />
  224. <Button.RenderTransform>
  225. <RotateTransform x:Name="clientTrans" Angle="0" />
  226. </Button.RenderTransform>
  227. <Button.Triggers>
  228. <EventTrigger RoutedEvent="Button.Click">
  229. <BeginStoryboard>
  230. <Storyboard>
  231. <DoubleAnimation
  232. RepeatBehavior="1x"
  233. Storyboard.TargetName="clientTrans"
  234. Storyboard.TargetProperty="Angle"
  235. From="0"
  236. To="-540"
  237. Duration="0:0:1" />
  238. </Storyboard>
  239. </BeginStoryboard>
  240. </EventTrigger>
  241. </Button.Triggers>
  242. </Button>
  243. </StackPanel>
  244. <StackPanel
  245. HorizontalAlignment="Left"
  246. VerticalAlignment="Center"
  247. Orientation="Horizontal">
  248. <TextBlock
  249. HorizontalAlignment="Center"
  250. VerticalAlignment="Center"
  251. FontSize="18"
  252. FontWeight="Bold"
  253. Foreground="White"
  254. Text="监测状态:" />
  255. <pu:Badge
  256. Height="32"
  257. Margin="0,0,5,0"
  258. HorizontalAlignment="Center"
  259. VerticalAlignment="Center"
  260. Background="{Binding CameraClientFill}"
  261. IsWaving="{Binding CameraClientState}" />
  262. <pu:Badge
  263. Height="32"
  264. Margin="0,0,5,0"
  265. HorizontalAlignment="Center"
  266. VerticalAlignment="Center"
  267. Background="{Binding CameraClientFill2}"
  268. IsWaving="{Binding CameraClientState2}" />
  269. <Button
  270. Width="25"
  271. Height="25"
  272. HorizontalAlignment="Center"
  273. VerticalAlignment="Center"
  274. Background="Transparent"
  275. Command="{Binding FreshCameraCommand}"
  276. Cursor="Hand"
  277. RenderTransformOrigin="0.5,0.5"
  278. Style="{DynamicResource ButtonStyle_User_Frush}">
  279. <Image
  280. Width="24"
  281. Height="24"
  282. HorizontalAlignment="Center"
  283. VerticalAlignment="Center"
  284. Source="/SHJX.Service.Resource;component/Assets/Photos/Cycle.png" />
  285. <Button.RenderTransform>
  286. <RotateTransform x:Name="cameraTrans" Angle="0" />
  287. </Button.RenderTransform>
  288. <Button.Triggers>
  289. <EventTrigger RoutedEvent="Button.Click">
  290. <BeginStoryboard>
  291. <Storyboard>
  292. <DoubleAnimation
  293. RepeatBehavior="1x"
  294. Storyboard.TargetName="cameraTrans"
  295. Storyboard.TargetProperty="Angle"
  296. From="0"
  297. To="-540"
  298. Duration="0:0:1" />
  299. </Storyboard>
  300. </BeginStoryboard>
  301. </EventTrigger>
  302. </Button.Triggers>
  303. </Button>
  304. </StackPanel>
  305. <StackPanel
  306. HorizontalAlignment="Left"
  307. VerticalAlignment="Center"
  308. Orientation="Horizontal">
  309. <TextBlock
  310. HorizontalAlignment="Center"
  311. VerticalAlignment="Center"
  312. FontSize="18"
  313. FontWeight="Bold"
  314. Foreground="White"
  315. Text="温度设置:" />
  316. <pu:Badge
  317. Height="32"
  318. Margin="0,0,5,0"
  319. HorizontalAlignment="Center"
  320. VerticalAlignment="Center"
  321. Background="{Binding TemperatureSettingFill}"
  322. IsWaving="{Binding TemperatureSettingState}" />
  323. <Button
  324. Width="25"
  325. Height="25"
  326. HorizontalAlignment="Center"
  327. VerticalAlignment="Center"
  328. Background="Transparent"
  329. Command="{Binding ReSettingTemperatureCommand}"
  330. Cursor="Hand"
  331. RenderTransformOrigin="0.5,0.5"
  332. Style="{DynamicResource ButtonStyle_User_Frush}">
  333. <Image
  334. Width="24"
  335. Height="24"
  336. HorizontalAlignment="Center"
  337. VerticalAlignment="Center"
  338. Source="/SHJX.Service.Resource;component/Assets/Photos/Cycle.png" />
  339. <Button.RenderTransform>
  340. <RotateTransform x:Name="temperatureTrans" Angle="0" />
  341. </Button.RenderTransform>
  342. <Button.Triggers>
  343. <EventTrigger RoutedEvent="Button.Click">
  344. <BeginStoryboard>
  345. <Storyboard>
  346. <DoubleAnimation
  347. RepeatBehavior="1x"
  348. Storyboard.TargetName="temperatureTrans"
  349. Storyboard.TargetProperty="Angle"
  350. From="0"
  351. To="-540"
  352. Duration="0:0:1" />
  353. </Storyboard>
  354. </BeginStoryboard>
  355. </EventTrigger>
  356. </Button.Triggers>
  357. </Button>
  358. </StackPanel>
  359. </UniformGrid>
  360. </Grid>
  361. </StackPanel>
  362. </metro:Flyout>