星火微课系统客户端
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

ScreenRecordingToolbarWindow.xaml 25KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  1. <Window
  2. x:Class="XHWK.WKTool.ScreenRecordingToolbarWindow"
  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. Title="ScreenRecordingToolbarWindow"
  8. Width="423"
  9. Height="58"
  10. Margin="0"
  11. AllowsTransparency="True"
  12. Left="0"
  13. ShowInTaskbar="False"
  14. Top="0"
  15. Topmost="True"
  16. WindowStyle="None"
  17. mc:Ignorable="d">
  18. <Window.Background>
  19. <SolidColorBrush Opacity="0" Color="#292C2E" />
  20. </Window.Background>
  21. <Grid>
  22. <Grid
  23. x:Name="GridSrToobar"
  24. MouseLeave="gridToobarTwo_MouseLeave"
  25. Visibility="Visible">
  26. <Grid.ColumnDefinitions>
  27. <ColumnDefinition Width="56*" />
  28. <ColumnDefinition Width="361*" />
  29. </Grid.ColumnDefinitions>
  30. <Border
  31. Grid.ColumnSpan="2"
  32. Background="White"
  33. BorderBrush="#FF638AFF"
  34. BorderThickness="3"
  35. CornerRadius="29" />
  36. <!-- 开始暂停 -->
  37. <Grid Grid.Column="0">
  38. <Button
  39. x:Name="BtnRecordingScreen"
  40. Click="BtnRecordingScreen_Click"
  41. Cursor="Hand"
  42. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
  43. ToolTip="开始"
  44. Visibility="Visible">
  45. <Button.Template>
  46. <ControlTemplate TargetType="{x:Type Button}">
  47. <Image x:Name="BtnImages" Source="/SkinImages/SR/SR_Start.png" />
  48. <ControlTemplate.Triggers>
  49. <Trigger Property="IsMouseOver" Value="True">
  50. <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Start_MI.png" />
  51. </Trigger>
  52. <Trigger Property="IsPressed" Value="True">
  53. <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Start.png" />
  54. </Trigger>
  55. <Trigger Property="IsEnabled" Value="False">
  56. <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Start.png" />
  57. </Trigger>
  58. </ControlTemplate.Triggers>
  59. </ControlTemplate>
  60. </Button.Template>
  61. </Button>
  62. <Button
  63. x:Name="BtnRecordingScreenPause"
  64. Click="BtnRecordingScreen_Click"
  65. Cursor="Hand"
  66. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
  67. ToolTip="暂停"
  68. Visibility="Collapsed">
  69. <Button.Template>
  70. <ControlTemplate TargetType="{x:Type Button}">
  71. <Image x:Name="BtnImages" Source="/SkinImages/SR/SR_Pause.png" />
  72. <ControlTemplate.Triggers>
  73. <Trigger Property="IsMouseOver" Value="True">
  74. <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Pause_MI.png" />
  75. </Trigger>
  76. <Trigger Property="IsPressed" Value="True">
  77. <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Pause.png" />
  78. </Trigger>
  79. <Trigger Property="IsEnabled" Value="False">
  80. <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Pause.png" />
  81. </Trigger>
  82. </ControlTemplate.Triggers>
  83. </ControlTemplate>
  84. </Button.Template>
  85. </Button>
  86. </Grid>
  87. <!-- 其他按钮 -->
  88. <Grid Grid.Column="1">
  89. <Grid.RowDefinitions>
  90. <RowDefinition Height="10*" />
  91. <RowDefinition Height="38*" />
  92. <RowDefinition Height="10*" />
  93. </Grid.RowDefinitions>
  94. <Grid.ColumnDefinitions>
  95. <ColumnDefinition Width="10*" />
  96. <ColumnDefinition Width="38*" />
  97. <ColumnDefinition Width="28*" />
  98. <ColumnDefinition Width="92*" />
  99. <ColumnDefinition Width="28*" />
  100. <ColumnDefinition Width="38*" />
  101. <ColumnDefinition Width="4*" />
  102. <ColumnDefinition Width="38*" />
  103. <ColumnDefinition Width="28*" />
  104. <ColumnDefinition Width="38*" />
  105. <ColumnDefinition Width="17*" />
  106. </Grid.ColumnDefinitions>
  107. <Grid Grid.Row="1" Grid.Column="1">
  108. <!-- 停止 -->
  109. <Button
  110. x:Name="BtnStopRecordingScreen"
  111. Click="BtnStopRecordingScreen_Click"
  112. Cursor="Hand"
  113. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
  114. ToolTip="停止">
  115. <Button.Template>
  116. <ControlTemplate TargetType="{x:Type Button}">
  117. <Image x:Name="BtnImages" Source="/SkinImages/SR/SR_Stop.png" />
  118. <ControlTemplate.Triggers>
  119. <Trigger Property="IsMouseOver" Value="True">
  120. <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Stop_MI.png" />
  121. </Trigger>
  122. <Trigger Property="IsPressed" Value="True">
  123. <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Stop.png" />
  124. </Trigger>
  125. <Trigger Property="IsEnabled" Value="False">
  126. <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Stop_N.png" />
  127. </Trigger>
  128. </ControlTemplate.Triggers>
  129. </ControlTemplate>
  130. </Button.Template>
  131. </Button>
  132. </Grid>
  133. <Grid Grid.Row="1" Grid.Column="2">
  134. <Grid.RowDefinitions>
  135. <RowDefinition Height="9*" />
  136. <RowDefinition Height="20*" />
  137. <RowDefinition Height="9*" />
  138. </Grid.RowDefinitions>
  139. <Label
  140. Grid.Row="1"
  141. Width="2"
  142. Margin="0"
  143. Padding="5"
  144. Background="#FF638AFF" />
  145. </Grid>
  146. <Grid
  147. Grid.Row="0"
  148. Grid.RowSpan="3"
  149. Grid.Column="3">
  150. <Label
  151. x:Name="TxbTime"
  152. Grid.Column="1"
  153. Padding="0"
  154. HorizontalContentAlignment="Center"
  155. VerticalContentAlignment="Center"
  156. Content="00:00"
  157. FontFamily="/星火微课;component/Resources/#Quartz"
  158. FontSize="36"
  159. Foreground="#FF3F6FFF"
  160. Visibility="Visible" />
  161. </Grid>
  162. <Grid Grid.Row="1" Grid.Column="4">
  163. <Grid.RowDefinitions>
  164. <RowDefinition Height="9*" />
  165. <RowDefinition Height="20*" />
  166. <RowDefinition Height="9*" />
  167. </Grid.RowDefinitions>
  168. <Label
  169. Grid.Row="1"
  170. Width="2"
  171. Margin="0"
  172. Padding="5"
  173. Background="#FF638AFF" />
  174. </Grid>
  175. <Grid Grid.Row="1" Grid.Column="5">
  176. <!-- 蓝笔 -->
  177. <Button
  178. x:Name="BtnPenBlue"
  179. Click="BtnBrush_Click"
  180. Cursor="Hand"
  181. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
  182. ToolTip="批注">
  183. <Button.Template>
  184. <ControlTemplate TargetType="{x:Type Button}">
  185. <Image x:Name="BtnImages" Source="/SkinImages/SR/SR_PenBlue.png" />
  186. <ControlTemplate.Triggers>
  187. <Trigger Property="IsMouseOver" Value="True">
  188. <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_PenBlue_MI.png" />
  189. </Trigger>
  190. <Trigger Property="IsPressed" Value="True">
  191. <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_PenBlue_CL.png" />
  192. </Trigger>
  193. <Trigger Property="IsEnabled" Value="False">
  194. <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_PenBlue_N.png" />
  195. </Trigger>
  196. </ControlTemplate.Triggers>
  197. </ControlTemplate>
  198. </Button.Template>
  199. </Button>
  200. <!-- 选中 -->
  201. <Button
  202. x:Name="BtnPenBlue_CL"
  203. Click="BtnBrush_Click"
  204. Cursor="Hand"
  205. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
  206. ToolTip="批注"
  207. Visibility="Collapsed">
  208. <Button.Template>
  209. <ControlTemplate TargetType="{x:Type Button}">
  210. <Image x:Name="BtnImages" Source="/SkinImages/SR/SR_PenBlue_CL.png" />
  211. </ControlTemplate>
  212. </Button.Template>
  213. </Button>
  214. </Grid>
  215. <Grid Grid.Row="1" Grid.Column="7">
  216. <!-- 红笔 -->
  217. <Button
  218. x:Name="BtnPenRed"
  219. Click="BtnBlackPenTwo_Click"
  220. Cursor="Hand"
  221. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
  222. ToolTip="批注">
  223. <Button.Template>
  224. <ControlTemplate TargetType="{x:Type Button}">
  225. <Image x:Name="BtnImages" Source="/SkinImages/SR/SR_PenRed.png" />
  226. <ControlTemplate.Triggers>
  227. <Trigger Property="IsMouseOver" Value="True">
  228. <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_PenRed_MI.png" />
  229. </Trigger>
  230. <Trigger Property="IsPressed" Value="True">
  231. <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_PenRed_CL.png" />
  232. </Trigger>
  233. <Trigger Property="IsEnabled" Value="False">
  234. <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_PenRed_N.png" />
  235. </Trigger>
  236. </ControlTemplate.Triggers>
  237. </ControlTemplate>
  238. </Button.Template>
  239. </Button>
  240. <!-- 选中 -->
  241. <Button
  242. x:Name="BtnPenRed_CL"
  243. Click="BtnBlackPenTwo_Click"
  244. Cursor="Hand"
  245. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
  246. ToolTip="批注"
  247. Visibility="Collapsed">
  248. <Button.Template>
  249. <ControlTemplate TargetType="{x:Type Button}">
  250. <Image x:Name="BtnImages" Source="/SkinImages/SR/SR_PenRed_CL.png" />
  251. </ControlTemplate>
  252. </Button.Template>
  253. </Button>
  254. </Grid>
  255. <Grid Grid.Row="1" Grid.Column="8">
  256. <Grid.RowDefinitions>
  257. <RowDefinition Height="9*" />
  258. <RowDefinition Height="20*" />
  259. <RowDefinition Height="9*" />
  260. </Grid.RowDefinitions>
  261. <Label
  262. Grid.Row="1"
  263. Width="2"
  264. Margin="0"
  265. Padding="5"
  266. Background="#FF638AFF" />
  267. </Grid>
  268. <Grid Grid.Row="1" Grid.Column="9">
  269. <!-- 返回 -->
  270. <Button
  271. x:Name="BtnReturn"
  272. Click="BtnReturn_Click"
  273. Cursor="Hand"
  274. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
  275. ToolTip="返回">
  276. <Button.Template>
  277. <ControlTemplate TargetType="{x:Type Button}">
  278. <Image x:Name="BtnImages" Source="/SkinImages/SR/SR_Out.png" />
  279. <ControlTemplate.Triggers>
  280. <Trigger Property="IsMouseOver" Value="True">
  281. <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Out_MI.png" />
  282. </Trigger>
  283. <Trigger Property="IsEnabled" Value="False">
  284. <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Out_N.png" />
  285. </Trigger>
  286. </ControlTemplate.Triggers>
  287. </ControlTemplate>
  288. </Button.Template>
  289. </Button>
  290. </Grid>
  291. </Grid>
  292. </Grid>
  293. <Viewbox Visibility="Collapsed">
  294. <StackPanel>
  295. <Viewbox Visibility="Collapsed">
  296. <Grid x:Name="gridToobar" MouseLeftButtonDown="Grid_MouseLeftButtonDown">
  297. <Image x:Name="imgCanvas" Visibility="Collapsed" />
  298. <InkCanvas
  299. x:Name="blackboard_canvas"
  300. Grid.RowSpan="2"
  301. Background="Transparent"
  302. Visibility="Collapsed" />
  303. <!-- 画笔工具栏 -->
  304. <Grid x:Name="gridToolbar" Visibility="Collapsed">
  305. <Image HorizontalAlignment="Right" Source="./Images/Toobar22.png" />
  306. <StackPanel
  307. Margin="0,5,10,0"
  308. HorizontalAlignment="Right"
  309. Orientation="Vertical">
  310. <Button
  311. x:Name="btnToolbarDown"
  312. Margin="0,5,0,0"
  313. Click="BtnToolbarDown_Click"
  314. Cursor="Hand"
  315. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  316. <Image Source="./Images/Toobar5.png" />
  317. </Button>
  318. <Button
  319. x:Name="btnEraser"
  320. Margin="0,5,0,0"
  321. Click="BtnEraser_Click"
  322. Cursor="Hand"
  323. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  324. <Image Source="./Images/Toobar12.png" />
  325. </Button>
  326. <Button
  327. x:Name="btnPen"
  328. Margin="0,5,0,0"
  329. Click="BtnPen_Click"
  330. Cursor="Hand"
  331. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  332. <Image Source="./Images/Toobar9.png" />
  333. </Button>
  334. <Button
  335. Margin="0,5,0,0"
  336. Cursor="Hand"
  337. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  338. <Image Source="./Images/Toobar16.png" />
  339. </Button>
  340. <Button
  341. x:Name="btnRectangle"
  342. Margin="0,5,0,0"
  343. Click="BtnRectangle_Click"
  344. Cursor="Hand"
  345. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  346. <Image Source="./Images/Toobar3.png" />
  347. </Button>
  348. <Button
  349. x:Name="btnRound"
  350. Margin="0,5,0,0"
  351. Click="BtnRound_Click"
  352. Cursor="Hand"
  353. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  354. <Image Source="./Images/Toobar23.png" />
  355. </Button>
  356. <Button
  357. x:Name="btnThickness"
  358. Margin="0,5,0,0"
  359. Click="BtnThickness_Click"
  360. Cursor="Hand"
  361. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  362. <Image Source="./Images/Toobar1.png" />
  363. </Button>
  364. <Button
  365. x:Name="btnColour"
  366. Margin="0,5,0,0"
  367. Click="BtnColour_Click"
  368. Cursor="Hand"
  369. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  370. <Image Source="./Images/Toobar18.png" />
  371. </Button>
  372. </StackPanel>
  373. </Grid>
  374. <!-- 字体颜色 -->
  375. <Grid x:Name="gridColour" Visibility="Collapsed">
  376. <Image
  377. Margin="0,200,62,0"
  378. HorizontalAlignment="Right"
  379. Source="./Images/Toobar20.png" />
  380. <StackPanel
  381. Margin="0,215,68,0"
  382. HorizontalAlignment="Right"
  383. Orientation="Vertical">
  384. <Button
  385. x:Name="btnWhite"
  386. Width="15"
  387. Height="15"
  388. Margin="0,0,0,0"
  389. Background="#FFFFFF"
  390. Click="BtnWhite_Click"
  391. Cursor="Hand"
  392. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
  393. <Button
  394. x:Name="btnRed"
  395. Width="15"
  396. Height="15"
  397. Margin="0,8,0,0"
  398. Background="#FF0000"
  399. Click="BtnRed_Click"
  400. Cursor="Hand"
  401. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
  402. <Button
  403. x:Name="btnGray"
  404. Width="15"
  405. Height="15"
  406. Margin="0,8,0,0"
  407. Background="#A7A9AC"
  408. Click="BtnGray_Click"
  409. Cursor="Hand"
  410. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
  411. <Button
  412. x:Name="btnCyanBlue"
  413. Width="15"
  414. Height="15"
  415. Margin="0,8,0,0"
  416. Background="#63D600"
  417. Click="BtnCyanBlue_Click"
  418. Cursor="Hand"
  419. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
  420. <Button
  421. x:Name="btnYellow"
  422. Width="15"
  423. Height="15"
  424. Margin="0,8,0,0"
  425. Background="#FFBC00"
  426. Click="BtnYellow_Click"
  427. Cursor="Hand"
  428. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
  429. <Button
  430. x:Name="btnBlue"
  431. Width="15"
  432. Height="15"
  433. Margin="0,8,0,0"
  434. Background="#00B4FC"
  435. Click="BtnBlue_Click"
  436. Cursor="Hand"
  437. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
  438. </StackPanel>
  439. </Grid>
  440. <!-- 字体粗细 -->
  441. <Grid x:Name="gridThickness" Visibility="Collapsed">
  442. <Image
  443. Margin="0,200,62,0"
  444. HorizontalAlignment="Right"
  445. Source="./Images/Toobar21.png" />
  446. <StackPanel
  447. Margin="0,260,62,0"
  448. HorizontalAlignment="Right"
  449. Orientation="Vertical">
  450. <Button
  451. x:Name="btnFine"
  452. Width="20"
  453. Height="3"
  454. Margin="0,0,0,0"
  455. Background="#FFFFFF"
  456. Click="BtnFine_Click"
  457. Cursor="Hand"
  458. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
  459. <Button
  460. x:Name="btnIn"
  461. Width="20"
  462. Height="5"
  463. Margin="0,10,0,0"
  464. Background="#FFFFFF"
  465. Click="BtnIn_Click"
  466. Cursor="Hand"
  467. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
  468. <Button
  469. x:Name="btnCrude"
  470. Width="20"
  471. Height="10"
  472. Margin="0,10,0,0"
  473. Background="#FFFFFF"
  474. Click="BtnCrude_Click"
  475. Cursor="Hand"
  476. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
  477. </StackPanel>
  478. </Grid>
  479. </Grid>
  480. </Viewbox>
  481. </StackPanel>
  482. </Viewbox>
  483. </Grid>
  484. </Window>