星火微课系统客户端
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

ScreenRecordingToolbarWindow.xaml.cs 22KB

před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
  1. using Common.system;
  2. using System;
  3. using System.Configuration;
  4. using System.IO;
  5. using System.Threading;
  6. using System.Windows;
  7. using System.Windows.Forms;
  8. using System.Windows.Ink;
  9. using System.Windows.Media;
  10. using System.Windows.Media.Imaging;
  11. using System.Windows.Threading;
  12. using XHWK.Model;
  13. namespace XHWK.WKTool
  14. {
  15. /// <summary>
  16. /// 录屏工具栏
  17. /// </summary>
  18. public partial class ScreenRecordingToolbarWindow : Window
  19. {
  20. #region 初始变量
  21. /// <summary>
  22. /// 视频保存名称
  23. /// </summary>
  24. string VideoSavePathName;
  25. /// <summary>
  26. /// 是否首次录屏
  27. /// </summary>
  28. bool IsFirstRS = true;
  29. /// <summary>
  30. /// 是否暂停
  31. /// </summary>
  32. bool IsSuspend = true;
  33. /// <summary>
  34. /// 视频信息
  35. /// </summary>
  36. Model_Video VideoInfo = null;
  37. //声明一个 DrawingAttributes 类型的变量
  38. DrawingAttributes drawingAttributes;
  39. private DispatcherTimer t = null;
  40. /// <summary>
  41. /// 计时器状态
  42. /// </summary>
  43. private enum State
  44. {
  45. Start,
  46. Pause,
  47. End
  48. }
  49. /// <summary>
  50. /// 状态
  51. /// </summary>
  52. private State _state = State.End;
  53. /// <summary>
  54. /// 计时用
  55. /// </summary>
  56. private TimeSpan _timeSpan = new TimeSpan(0, 0, 0, 0, 0);
  57. KeyboardHookCommon k_hook;
  58. #endregion
  59. #region 初始化
  60. /// <summary>
  61. /// 录屏工具栏
  62. /// </summary>
  63. public ScreenRecordingToolbarWindow()
  64. {
  65. InitializeComponent();
  66. }
  67. /// <summary>
  68. /// 初始化
  69. /// </summary>
  70. public void Initialize()
  71. {
  72. k_hook = new KeyboardHookCommon();
  73. k_hook.KeyDownEvent += K_hook_KeyDownEvent;
  74. //创建 DrawingAttributes 类的一个实例
  75. drawingAttributes = new DrawingAttributes();
  76. //将 InkCanvas 的 DefaultDrawingAttributes 属性的值赋成创建的 DrawingAttributes 类的对象的引用
  77. //InkCanvas 通过 DefaultDrawingAttributes 属性来获取墨迹的各种设置,该属性的类型为 DrawingAttributes 型
  78. blackboard_canvas.DefaultDrawingAttributes = drawingAttributes;
  79. drawingAttributes.FitToCurve = true;
  80. //隐藏画笔工具栏
  81. //BtnToolbarDown_Click(null, null);
  82. gridToolbar.Visibility = Visibility.Hidden;
  83. gridColour.Visibility = Visibility.Hidden;
  84. gridThickness.Visibility = Visibility.Hidden;
  85. ImgRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar26.png"));
  86. if (t == null)
  87. {
  88. t = new DispatcherTimer();
  89. t.Tick += OnTimer;
  90. t.Interval = new TimeSpan(0, 0, 0, 1);
  91. t.IsEnabled = true;
  92. t.Start();
  93. }
  94. t.Interval = new TimeSpan(0, 0, 0, 1);
  95. //Stack();
  96. //ImgRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar25.png"));
  97. //BtnRecordingScreen_Click(null, null);
  98. }
  99. private void K_hook_KeyDownEvent(object sender, System.Windows.Forms.KeyEventArgs e)
  100. {
  101. if (e.KeyValue == (int)System.Windows.Forms.Keys.F5 && (int)Control.ModifierKeys == (int)Keys.Control)
  102. {
  103. //开始,暂停
  104. BtnRecordingScreen_Click(null, null);
  105. }
  106. if (e.KeyValue == (int)Keys.S && (int)Control.ModifierKeys == (int)Keys.Control)
  107. {
  108. //结束
  109. BtnStopRecordingScreen_Click(null, null);
  110. }
  111. }
  112. #endregion
  113. #region 事件
  114. /// <summary>
  115. /// 时钟回调
  116. /// </summary>
  117. /// <param name="sender"></param>
  118. /// <param name="e"></param>
  119. private void OnTimer(object sender, EventArgs e)
  120. {
  121. switch (_state)
  122. {
  123. case State.Start:
  124. {
  125. _timeSpan += new TimeSpan(0, 0, 0, 1);
  126. }
  127. break;
  128. case State.Pause:
  129. {
  130. }
  131. break;
  132. case State.End:
  133. {
  134. _timeSpan = new TimeSpan();
  135. //_timeSpan = new TimeSpan(0, 23, 12, 45, 54);
  136. }
  137. break;
  138. }
  139. string time = string.Format("{0:D2}:{1:D2}",/* _timeSpan.Hours,*/ _timeSpan.Minutes, _timeSpan.Seconds);
  140. //char[] times = time.ToCharArray();
  141. txbTime.Text = time;
  142. }
  143. /// <summary>
  144. /// 开始
  145. /// </summary>
  146. /// <param name="sender"></param>
  147. /// <param name="e"></param>
  148. private void Stack()
  149. {
  150. _state = State.Start;
  151. }
  152. /// <summary>
  153. /// 暂停
  154. /// </summary>
  155. private void TimeOut()
  156. {
  157. _state = State.Pause;
  158. }
  159. /// <summary>
  160. /// 结束
  161. /// </summary>
  162. /// <param name="sender"></param>
  163. /// <param name="e"></param>
  164. private void End()
  165. {
  166. _state = State.End;
  167. }
  168. #region 录屏
  169. /// <summary>
  170. /// 设置录屏文件地址
  171. /// </summary>
  172. void SetUpVideoPathName()
  173. {
  174. //FileToolsCommon.DeleteDirectory(APP.WKData.WkPath + "temp/");
  175. FileToolsCommon.CreateDirectory(APP.WKData.WkPath);
  176. FileToolsCommon.DeleteDirectory(APP.WKData.WkPath + "tempsr/");
  177. VideoSavePathName = APP.WKData.WkPath + APP.WKData.WkName + "_录屏." + ((Enum_VideoType)int.Parse(FileToolsCommon.GetConfigValue("VideoType"))).ToString();
  178. int num = 1;
  179. while(FileToolsCommon.IsExistFile(VideoSavePathName))
  180. {
  181. VideoSavePathName = APP.WKData.WkPath + APP.WKData.WkName + "_录屏_"+ num + "." + ((Enum_VideoType)int.Parse(FileToolsCommon.GetConfigValue("VideoType"))).ToString();
  182. num++;
  183. }
  184. }
  185. /// <summary>
  186. /// 开始或暂停录制
  187. /// </summary>
  188. /// <param name="sender"></param>
  189. /// <param name="e"></param>
  190. private void BtnRecordingScreen_Click(object sender, RoutedEventArgs e)
  191. {
  192. if (IsSuspend)
  193. {
  194. if (IsFirstRS)
  195. {
  196. VideoInfo = new Model_Video();
  197. VideoInfo.VideoType = (Enum_VideoType)int.Parse(FileToolsCommon.GetConfigValue("VideoType"));
  198. VideoInfo.WkType = Enum_WKVidetype.RecordingScreen;
  199. SetUpVideoPathName();
  200. IsFirstRS = false;
  201. k_hook.Start();//安装键盘钩子
  202. }
  203. IsSuspend = false;
  204. //#region 录像倒计时
  205. //if (APP.W_CountdownWindow == null)
  206. //{
  207. // APP.W_CountdownWindow = new CountdownWindow();
  208. // //APP.W_CountdownWindow.Topmost = true;
  209. //}
  210. //else
  211. //{
  212. // APP.W_CountdownWindow.Initialize();
  213. // //APP.W_CountdownWindow.Topmost = true;
  214. //}
  215. //APP.W_CountdownWindow.Show();
  216. //#endregion
  217. ImgRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar25.png"));
  218. txbTime.Visibility = Visibility.Visible;
  219. try
  220. {
  221. if (APP.W_CountdownWindow == null)
  222. {
  223. APP.W_CountdownWindow = new CountdownWindow();
  224. APP.W_CountdownWindow.Initialize(true, 1800);
  225. //APP.W_CountdownWindow.Topmost = true;
  226. }
  227. else
  228. {
  229. APP.W_CountdownWindow.Initialize(true, 1800);
  230. //APP.W_CountdownWindow.Topmost = true;
  231. }
  232. APP.W_CountdownWindow.Show();
  233. new Thread(new ThreadStart(new Action(() =>
  234. {
  235. Thread.Sleep(1000);
  236. APP.FFmpeg.StartRecordingVideo(VideoSavePathName);
  237. Thread.Sleep(1800);
  238. Dispatcher.Invoke(() =>
  239. {
  240. Stack();
  241. });
  242. }))).Start();
  243. }
  244. catch (Exception ex)
  245. {
  246. MessageWindow.Show(ex.Message);
  247. }
  248. }
  249. else
  250. {
  251. TimeOut();
  252. IsSuspend = true;
  253. ImgRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/microLessonSystem_14.png"));
  254. #region 2秒内不可点击
  255. new Thread(new ThreadStart(new Action(() =>
  256. {
  257. Dispatcher.Invoke(() =>
  258. {
  259. BtnRecordingScreen.IsEnabled = false;
  260. BtnStopRecordingScreen.IsEnabled = false;
  261. });
  262. Thread.Sleep(2000);
  263. Dispatcher.Invoke(() =>
  264. {
  265. BtnRecordingScreen.IsEnabled = true;
  266. BtnStopRecordingScreen.IsEnabled = true;
  267. });
  268. }))).Start();
  269. #endregion
  270. try
  271. {
  272. APP.FFmpeg.SuspendFFmpeg();
  273. }
  274. catch (Exception ex)
  275. {
  276. MessageWindow.Show(ex.Message);
  277. }
  278. }
  279. }
  280. /// <summary>
  281. /// 停止录像
  282. /// </summary>
  283. /// <param name="sender"></param>
  284. /// <param name="e"></param>
  285. private void BtnStopRecordingScreen_Click(object sender, RoutedEventArgs e)
  286. {
  287. k_hook.Stop();
  288. IsSuspend = true;
  289. txbTime.Text = "00:00";
  290. End();
  291. ImgRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar25.png"));
  292. if (gridToolbar.Visibility==Visibility.Visible)
  293. {
  294. gridToolbar.Visibility = Visibility.Hidden;
  295. gridColour.Visibility = Visibility.Hidden;
  296. gridThickness.Visibility = Visibility.Hidden;
  297. APP.W_PracticeWindow.Hide();
  298. }
  299. if (APP.W_XHMicroLessonSystemWindow == null)
  300. {
  301. APP.W_XHMicroLessonSystemWindow = new XHMicroLessonSystemWindow();
  302. }
  303. APP.W_XHMicroLessonSystemWindow.Show();
  304. if (!IsFirstRS)
  305. {
  306. try
  307. {
  308. try
  309. {
  310. APP.FFmpeg.StopFFmpeg(VideoSavePathName);
  311. }
  312. catch (Exception ex)
  313. {
  314. LogHelper.WriteErrLog("【停止录屏】(BtnStopRecordingScreen_Click)" + ex.Message, ex);
  315. }
  316. IsFirstRS = true;
  317. //生成缩略图
  318. string ThumbnailPath = FileToolsCommon.GetDirectoryName(VideoSavePathName) + "ThumbnailPath/";
  319. FileToolsCommon.CreateDirectory(ThumbnailPath);
  320. //缩略图存储位置
  321. string ThumbnailPathName = ThumbnailPath + FileToolsCommon.GetIOFileNameNoExtension(VideoSavePathName) + ".JPG";
  322. new Thread(new ThreadStart(new Action(() =>
  323. {
  324. while (!FileToolsCommon.IsExistFile(VideoSavePathName))
  325. {
  326. Thread.Sleep(100);
  327. }
  328. FileToolsCommon.DeleteFile(ThumbnailPathName);
  329. //VideoInfo.VideoSize = FileToolsCommon.GetFileSizeByMB(VideoSavePathName).ToString() + " MB";
  330. VideoInfo.RSTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
  331. VideoInfo.VideoPath = VideoSavePathName;
  332. VideoInfo.ThumbnailPath = ThumbnailPathName;
  333. APP.FFmpeg.GenerateThumbnails(VideoSavePathName, ThumbnailPathName);
  334. VideoInfo.FileGuid = Guid.NewGuid().ToString();
  335. VideoInfo.IsUpload = false;
  336. VideoInfo.Uploaded = 0;
  337. VideoInfo.Savefolder = APP.UserInfo.Schoolid + "/resource";
  338. APP.VideoList.Add(VideoInfo);
  339. //保存数据
  340. APP.SaveWkData();
  341. }))).Start();
  342. Click_stopRecordingScreen();
  343. }
  344. catch (Exception ex)
  345. {
  346. LogHelper.WriteErrLog("【停止录屏】(BtnStopRecordingScreen_Click)" + ex.Message, ex);
  347. }
  348. }
  349. Hide();
  350. }
  351. #endregion
  352. #region 画笔相关
  353. /// <summary>
  354. /// 画笔工具栏关闭事件
  355. /// </summary>
  356. /// <param name="sender"></param>
  357. /// <param name="e"></param>
  358. private void BtnToolbarDown_Click(object sender, RoutedEventArgs e)
  359. {
  360. gridToolbar.Visibility = Visibility.Hidden;
  361. gridColour.Visibility = Visibility.Hidden;
  362. gridThickness.Visibility = Visibility.Hidden;
  363. APP.W_PracticeWindow.Hide();
  364. }
  365. /// <summary>
  366. /// 画笔点击事件
  367. /// </summary>
  368. /// <param name="sender"></param>
  369. /// <param name="e"></param>
  370. private void BtnBrush_Click(object sender, RoutedEventArgs e)
  371. {
  372. string time = GetTimeStamp();
  373. string tempPath = AppDomain.CurrentDomain.BaseDirectory + "temp\\";
  374. if (!Directory.Exists(tempPath))
  375. {
  376. Directory.CreateDirectory(tempPath);
  377. }
  378. string imagePath = Path.Combine(tempPath, time + ".jpg");
  379. //ImageHelper.GetScreenshot(new System.Drawing.Rectangle(0, 0, 0, 0), imagePath);
  380. if (gridToolbar.Visibility == Visibility.Visible)
  381. {
  382. gridToolbar.Visibility = Visibility.Hidden;
  383. }
  384. else
  385. {
  386. gridToolbar.Visibility = Visibility.Visible;
  387. try
  388. {
  389. if (APP.W_PracticeWindow == null)
  390. {
  391. APP.W_PracticeWindow = new PracticeWindow();
  392. //APP.W_PracticeWindow.Topmost = true;
  393. APP.W_PracticeWindow.Width = pwidth;
  394. APP.W_PracticeWindow.Height = pHeight;
  395. APP.W_PracticeWindow.Left = 0;
  396. APP.W_PracticeWindow.Top = 0;
  397. //practiceWin.Owner = this;
  398. }
  399. APP.W_PracticeWindow.Initialize(imagePath);
  400. APP.W_PracticeWindow.Show();
  401. }
  402. catch (Exception ex)
  403. {
  404. LogHelper.WriteErrLog("【批注(PracticeWindow)" + ex.Message, ex);
  405. }
  406. }
  407. //imgCanvas.Source = new BitmapImage(new Uri(imagePath));
  408. }
  409. /// <summary>
  410. /// 屏幕宽
  411. /// </summary>
  412. internal double pwidth = SystemParameters.PrimaryScreenWidth;
  413. /// <summary>
  414. /// 屏幕高
  415. /// </summary>
  416. internal double pHeight = SystemParameters.PrimaryScreenHeight;
  417. /// <summary>
  418. /// 获取时间戳
  419. /// </summary>
  420. /// <returns></returns>
  421. public string GetTimeStamp()
  422. {
  423. TimeSpan ts = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0);
  424. return Convert.ToInt64(ts.TotalMilliseconds).ToString();
  425. }
  426. /// <summary>
  427. /// 画笔粗细事件
  428. /// </summary>
  429. /// <param name="sender"></param>
  430. /// <param name="e"></param>
  431. private void BtnThickness_Click(object sender, RoutedEventArgs e)
  432. {
  433. gridThickness.Visibility = Visibility.Visible;
  434. gridColour.Visibility = Visibility.Collapsed;
  435. }
  436. /// <summary>
  437. /// 画笔颜色事件
  438. /// </summary>
  439. /// <param name="sender"></param>
  440. /// <param name="e"></param>
  441. private void BtnColour_Click(object sender, RoutedEventArgs e)
  442. {
  443. gridColour.Visibility = Visibility.Visible;
  444. gridThickness.Visibility = Visibility.Collapsed;
  445. }
  446. /// <summary>
  447. /// 白色
  448. /// </summary>
  449. /// <param name="sender"></param>
  450. /// <param name="e"></param>
  451. private void BtnWhite_Click(object sender, RoutedEventArgs e)
  452. {
  453. //drawingAttributes.Color = Colors.White;
  454. APP.W_PracticeWindow.White();
  455. gridColour.Visibility = Visibility.Collapsed;
  456. gridThickness.Visibility = Visibility.Collapsed;
  457. }
  458. /// <summary>
  459. /// 红色
  460. /// </summary>
  461. /// <param name="sender"></param>
  462. /// <param name="e"></param>
  463. private void BtnRed_Click(object sender, RoutedEventArgs e)
  464. {
  465. //drawingAttributes.Color = Colors.Red;
  466. APP.W_PracticeWindow.Red();
  467. gridColour.Visibility = Visibility.Collapsed;
  468. gridThickness.Visibility = Visibility.Collapsed;
  469. }
  470. /// <summary>
  471. /// 黄色
  472. /// </summary>
  473. /// <param name="sender"></param>
  474. /// <param name="e"></param>
  475. private void BtnYellow_Click(object sender, RoutedEventArgs e)
  476. {
  477. //drawingAttributes.Color = Colors.Gold;
  478. APP.W_PracticeWindow.Yellow();
  479. gridColour.Visibility = Visibility.Collapsed;
  480. gridThickness.Visibility = Visibility.Collapsed;
  481. }
  482. /// <summary>
  483. /// 青色
  484. /// </summary>
  485. /// <param name="sender"></param>
  486. /// <param name="e"></param>
  487. private void BtnCyanBlue_Click(object sender, RoutedEventArgs e)
  488. {
  489. //drawingAttributes.Color = Colors.LimeGreen;
  490. APP.W_PracticeWindow.CyanBlue();
  491. gridColour.Visibility = Visibility.Collapsed;
  492. gridThickness.Visibility = Visibility.Collapsed;
  493. }
  494. /// <summary>
  495. /// 灰色
  496. /// </summary>
  497. /// <param name="sender"></param>
  498. /// <param name="e"></param>
  499. private void BtnGray_Click(object sender, RoutedEventArgs e)
  500. {
  501. //drawingAttributes.Color = Colors.Gray;
  502. APP.W_PracticeWindow.Gray();
  503. gridColour.Visibility = Visibility.Collapsed;
  504. gridThickness.Visibility = Visibility.Collapsed;
  505. }
  506. /// <summary>
  507. /// 蓝色
  508. /// </summary>
  509. /// <param name="sender"></param>
  510. /// <param name="e"></param>
  511. private void BtnBlue_Click(object sender, RoutedEventArgs e)
  512. {
  513. //drawingAttributes.Color = Colors.DeepSkyBlue;
  514. APP.W_PracticeWindow.Blue();
  515. gridColour.Visibility = Visibility.Collapsed;
  516. gridThickness.Visibility = Visibility.Collapsed;
  517. }
  518. /// <summary>
  519. /// 画笔 细
  520. /// </summary>
  521. /// <param name="sender"></param>
  522. /// <param name="e"></param>
  523. private void BtnFine_Click(object sender, RoutedEventArgs e)
  524. {
  525. APP.W_PracticeWindow.Fine();
  526. gridColour.Visibility = Visibility.Collapsed;
  527. gridThickness.Visibility = Visibility.Collapsed;
  528. }
  529. /// <summary>
  530. /// 画笔 中
  531. /// </summary>
  532. /// <param name="sender"></param>
  533. /// <param name="e"></param>
  534. private void BtnIn_Click(object sender, RoutedEventArgs e)
  535. {
  536. APP.W_PracticeWindow.In();
  537. gridColour.Visibility = Visibility.Collapsed;
  538. gridThickness.Visibility = Visibility.Collapsed;
  539. }
  540. /// <summary>
  541. /// 画笔粗
  542. /// </summary>
  543. /// <param name="sender"></param>
  544. /// <param name="e"></param>
  545. private void BtnCrude_Click(object sender, RoutedEventArgs e)
  546. {
  547. APP.W_PracticeWindow.Crude();
  548. gridColour.Visibility = Visibility.Collapsed;
  549. gridThickness.Visibility = Visibility.Collapsed;
  550. }
  551. /// <summary>
  552. /// 橡皮
  553. /// </summary>
  554. /// <param name="sender"></param>
  555. /// <param name="e"></param>
  556. private void BtnEraser_Click(object sender, RoutedEventArgs e)
  557. {
  558. APP.W_PracticeWindow.Eraser();
  559. }
  560. /// <summary>
  561. /// 🖊
  562. /// </summary>
  563. /// <param name="sender"></param>
  564. /// <param name="e"></param>
  565. private void BtnPen_Click(object sender, RoutedEventArgs e)
  566. {
  567. APP.W_PracticeWindow.Pen();
  568. }
  569. /// <summary>
  570. /// ⚪
  571. /// </summary>
  572. /// <param name="sender"></param>
  573. /// <param name="e"></param>
  574. private void BtnRound_Click(object sender, RoutedEventArgs e)
  575. {
  576. APP.W_PracticeWindow.Round();
  577. }
  578. /// <summary>
  579. /// 矩形
  580. /// </summary>
  581. /// <param name="sender"></param>
  582. /// <param name="e"></param>
  583. private void BtnRectangle_Click(object sender, RoutedEventArgs e)
  584. {
  585. APP.W_PracticeWindow.Rectangle();
  586. }
  587. #endregion
  588. #endregion
  589. /// <summary>
  590. /// 停止录屏
  591. /// </summary>
  592. public delegate void StopRecordingScreen();
  593. /// <summary>
  594. /// 停止录屏
  595. /// </summary>
  596. public event StopRecordingScreen Click_stopRecordingScreen;
  597. /// <summary>
  598. /// 黑笔
  599. /// </summary>
  600. /// <param name="sender"></param>
  601. /// <param name="e"></param>
  602. private void BtnBlackPen_Click(object sender, RoutedEventArgs e)
  603. {
  604. }
  605. /// <summary>
  606. /// 移动工具栏
  607. /// </summary>
  608. /// <param name="sender"></param>
  609. /// <param name="e"></param>
  610. private void Grid_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
  611. {
  612. DragMove();
  613. }
  614. }
  615. }