星火直播PC
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

ToolbarWindow.xaml.cs 25KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.ObjectModel;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Shapes;
  15. using XHZB.Model;
  16. using Common.ZB;
  17. using XHZB.Desktop.Utils;
  18. using Common.system;
  19. using System.Windows.Media.Animation;
  20. using System.Threading;
  21. namespace XHZB.Desktop
  22. {
  23. /// <summary>
  24. /// ToolbarWindow.xaml 的交互逻辑
  25. /// </summary>
  26. public partial class ToolbarWindow : Window
  27. {
  28. #region 字段
  29. /// <summary>
  30. /// 屏幕宽
  31. /// </summary>
  32. internal double pwidth = SystemParameters.PrimaryScreenWidth;
  33. /// <summary>
  34. /// 屏幕高
  35. /// </summary>
  36. internal double pHeight = SystemParameters.PrimaryScreenHeight;
  37. /// <summary>
  38. /// 工具栏数据
  39. /// </summary>
  40. internal ToolbarModel pageData = new ToolbarModel();
  41. /// <summary>
  42. /// 是否已打开课堂工具二级列表
  43. /// </summary>
  44. private bool heibanshow = false;
  45. #endregion
  46. #region 初始化
  47. public ToolbarWindow()
  48. {
  49. InitializeComponent();
  50. heiban_btn.Click += Heiban_btn_Click;
  51. pizhu_btn.Click += Pizhu_btn_Click;
  52. Topmost = true;
  53. Left = pwidth - 300;
  54. Top = (pHeight - 568) / 2;
  55. pageData.menuList.Add(new ToolbarMenu()
  56. {
  57. Name = "个人空间",
  58. Pic = "../Images/ToolBar/我的备课@2x.png"
  59. });
  60. pageData.menuList.Add(new ToolbarMenu()
  61. {
  62. Name = "直播",
  63. Pic = "../Images/ToolBar/直播@2x.png"
  64. });
  65. pageData.menuList.Add(new ToolbarMenu()
  66. {
  67. Name = "抢答点名",
  68. Pic = "../Images/ToolBar/抢答@2x.png"
  69. });
  70. pageData.menuList.Add(new ToolbarMenu()
  71. {
  72. Name = "课堂工具",
  73. Pic = "../Images/ToolBar/黑板01@2x.png"
  74. });
  75. pageData.menuList.Add(new ToolbarMenu()
  76. {
  77. Name = "本节考勤",
  78. Pic = "../Images/ToolBar/本节考勤01@2x.png"
  79. });
  80. pageData.menuList.Add(new ToolbarMenu()
  81. {
  82. Name = "结束课堂",
  83. Pic = "../Images/ToolBar/下课@2x.png"
  84. });
  85. DataContext = pageData;
  86. }
  87. #endregion
  88. #region 事件
  89. /// <summary>
  90. /// 模块点击
  91. /// </summary>
  92. /// <param name="sender"></param>
  93. /// <param name="e"></param>
  94. private void toolbar_item_Click(object sender, RoutedEventArgs e)
  95. {
  96. int clickindex = 0;
  97. List<Button> buttons = VTHelper.FindChilds<Button>(toolbar_list, "toolbar_item");
  98. for (int i = 0; i < buttons.Count; i++)
  99. {
  100. if (buttons[i] == sender)
  101. {
  102. clickindex = i;
  103. break;
  104. }
  105. }
  106. ToolbarMenu item = pageData.menuList[clickindex];
  107. if (clickindex == 0)//个人空间
  108. {
  109. try
  110. {
  111. //HideLevel2();
  112. if (APP.W_UserCenterWindow != null && !APP.W_UserCenterWindow.IsFocused)
  113. {
  114. APP.W_UserCenterWindow.Focus();
  115. }
  116. else
  117. {
  118. APP.W_UserCenterWindow = new UserCenterWindow();
  119. APP.W_UserCenterWindow.Show();
  120. APP.W_UserCenterWindow.Closed += UserCenterWindow_Closed;
  121. }
  122. //IsOpenUserCenterWindow = true;
  123. }
  124. catch (Exception ex)
  125. {
  126. //IsOpenUserCenterWindow = false;
  127. //userCenterWindow = null;
  128. LogHelper.WriteErrLog("【个人空间(toolbar_item_Click)" + ex.Message, ex);
  129. }
  130. }
  131. else if (clickindex == 1)//直播
  132. {
  133. //HideLevel2();
  134. pageData.tongping = !pageData.tongping;
  135. if (pageData.tongping)
  136. {
  137. //tongpingBegin();
  138. pageData.menuList[1].Pic = "../Images/ToolBar/img_shared_1.gif";
  139. pageData.menuList[1].Name = "正在直播";
  140. }
  141. else
  142. {
  143. //tongpingEnd();
  144. pageData.menuList[1].Pic = "../Images/ToolBar/直播@2x.png";
  145. pageData.menuList[1].Name = "直播";
  146. }
  147. }
  148. else if (clickindex == 2)//抢答点名
  149. {
  150. //HideLevel2();
  151. try
  152. {
  153. //#region 关闭冲突页面
  154. //if (IsOpenRollCallWindow)
  155. //{
  156. // return;
  157. //}
  158. //else
  159. //{
  160. // CloseOrHideWindowPage();
  161. //}
  162. //#endregion 关闭冲突页面
  163. if (APP.W_RollCallWindow == null)
  164. {
  165. APP.W_RollCallWindow = new RollCallWindow();
  166. //APP.W_RollCallWindow.click_closeClick += RollCallWindow_click_closeClick;
  167. }
  168. else
  169. {
  170. //APP.W_RollCallWindow.Initialize();
  171. }
  172. APP.W_RollCallWindow.Owner = this;
  173. //ZSocketServer.getInstance().addWin(rollCallWindow);
  174. //IsOpenRollCallWindow = true;
  175. APP.W_RollCallWindow.Show();
  176. }
  177. catch (Exception ex)
  178. {
  179. //IsOpenRollCallWindow = false;
  180. //rollCallWindow = null;
  181. LogHelper.WriteErrLog("【抢答点名(toolbar_item_Click)" + ex.Message, ex);
  182. }
  183. }
  184. else if (clickindex == 3)//课堂工具。
  185. {
  186. try
  187. {
  188. heibanshow = !heibanshow;
  189. List<DependencyObject> list = new List<DependencyObject>
  190. {
  191. heiban_btn,
  192. pizhu_btn
  193. };
  194. //if (tangceshow)
  195. //{
  196. // tangceshow = !tangceshow;
  197. // List<DependencyObject> lists = new List<DependencyObject>
  198. // {
  199. // import_word_btn,
  200. // jietu_btn
  201. // };
  202. // hideOrShow(tangceshow, tangceTool, lists);
  203. //}
  204. hideOrShow(heibanshow, ketangTool, list);
  205. }
  206. catch (Exception ex)
  207. {
  208. LogHelper.WriteErrLog("【课堂工具(toolbar_item_Click)" + ex.Message, ex);
  209. }
  210. }
  211. else if (clickindex == 4)//本节考勤
  212. {
  213. //HideLevel2();
  214. try
  215. {
  216. showKaoqin();
  217. }
  218. catch (Exception ex)
  219. {
  220. LogHelper.WriteErrLog("【考勤(toolbar_item_Click)" + ex.Message, ex);
  221. }
  222. }
  223. else if (clickindex == 5)//结束课堂。
  224. {
  225. if (MessageWindow.Show("是否结束课堂?", "提示", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
  226. {
  227. closeAction();
  228. }
  229. }
  230. }
  231. /// <summary>
  232. /// 个人空间关闭
  233. /// </summary>
  234. /// <param name="sender"></param>
  235. /// <param name="e"></param>
  236. private void UserCenterWindow_Closed(object sender, EventArgs e)
  237. {
  238. APP.W_UserCenterWindow = null;
  239. //IsOpenUserCenterWindow = false;
  240. }
  241. /// <summary>
  242. /// 考勤
  243. /// </summary>
  244. private void showKaoqin()
  245. {
  246. //if (
  247. // attendanceWindow != null &&
  248. // !attendanceWindow.IsFocused
  249. // )
  250. //{
  251. // attendanceWindow.Focus();
  252. //}
  253. //else
  254. //{
  255. try
  256. {
  257. #region 关闭冲突页面
  258. //if (IsOpenAttendanceWindow)
  259. //{
  260. // return;
  261. //}
  262. //else
  263. //{
  264. // CloseOrHideWindowPage();
  265. //}
  266. #endregion 关闭冲突页面
  267. if (APP.W_AttendanceWindow == null)
  268. {
  269. APP.W_AttendanceWindow = new AttendanceWindow
  270. {
  271. Owner = this
  272. };
  273. //APP.W_AttendanceWindow.Closed += AttendanceWindow_Closed;
  274. }
  275. else
  276. {
  277. //APP.W_AttendanceWindow.Initialize();
  278. }
  279. //IsOpenAttendanceWindow = true;
  280. APP.W_AttendanceWindow.Show();
  281. }
  282. catch (Exception ex)
  283. {
  284. //IsOpenAttendanceWindow = false;
  285. //attendanceWindow = null;
  286. LogHelper.WriteErrLog("【考勤(toolbar_item_Click)" + ex.Message, ex);
  287. }
  288. //}
  289. }
  290. /// <summary>
  291. /// 黑板
  292. /// </summary>
  293. /// <param name="sender"></param>
  294. /// <param name="e"></param>
  295. private void Heiban_btn_Click(object sender, RoutedEventArgs e)
  296. {
  297. try
  298. {
  299. heibanshow = !heibanshow;
  300. #region 关闭冲突页面
  301. //CloseOrHideWindowPage();
  302. #endregion 关闭冲突页面
  303. List<DependencyObject> list = new List<DependencyObject>
  304. {
  305. heiban_btn,
  306. pizhu_btn
  307. };
  308. hideOrShow(heibanshow, ketangTool, list);
  309. if (APP.W_ZBlackboardWindow == null)
  310. {
  311. APP.W_ZBlackboardWindow = new ZBlackboardWindow
  312. {
  313. Topmost = true,
  314. Width = pwidth,
  315. Height = pHeight,
  316. Left = 0,
  317. Top = 0,
  318. Owner = this
  319. };
  320. //APP.W_ZBlackboardWindow.click_closeClick += BlackboardWin2_click_closeClick;
  321. }
  322. //ZSocketServer.getInstance().addWin(blackboardWin2);
  323. APP.W_ZBlackboardWindow.ShowDialog();
  324. }
  325. catch (Exception ex)
  326. {
  327. LogHelper.WriteErrLog("【黑板(Heiban_btn_Click)" + ex.Message, ex);
  328. }
  329. }
  330. /// <summary>
  331. /// 批注
  332. /// </summary>
  333. /// <param name="sender"></param>
  334. /// <param name="e"></param>
  335. private void Pizhu_btn_Click(object sender, RoutedEventArgs e)
  336. {
  337. try
  338. {
  339. heibanshow = !heibanshow;
  340. #region 关闭冲突页面
  341. //CloseOrHideWindowPage();
  342. #endregion 关闭冲突页面
  343. List<DependencyObject> list = new List<DependencyObject>
  344. {
  345. heiban_btn,
  346. pizhu_btn
  347. };
  348. hideOrShow(heibanshow, ketangTool, list);
  349. if (APP.W_PracticeWindow == null)
  350. {
  351. APP.W_PracticeWindow = new PracticeWindow();
  352. APP.W_PracticeWindow.click_closeClick += PracticeWin_click_closeClick;
  353. APP.W_PracticeWindow.Topmost = true;//zhangxueyang
  354. APP.W_PracticeWindow.Width = pwidth;
  355. APP.W_PracticeWindow.Height = pHeight;
  356. APP.W_PracticeWindow.Left = 0;
  357. APP.W_PracticeWindow.Top = 0;
  358. APP.W_PracticeWindow.Unloaded += PracticeWin_Unloaded;
  359. }
  360. APP.W_PracticeWindow.Owner = this;//zhangxueyang
  361. Hide();
  362. addimage();
  363. //ZSocketServer.getInstance().addWin(practiceWin);
  364. APP.W_PracticeWindow.ShowDialog();
  365. }
  366. catch (Exception ex)
  367. {
  368. LogHelper.WriteErrLog("【批注(Pizhu_btn_Click)" + ex.Message, ex);
  369. }
  370. }
  371. /// <summary>
  372. /// 添加截图到批注
  373. /// </summary>
  374. private void addimage()
  375. {
  376. string ImagePath = ImageHelper.GetTempImagePath();
  377. ImageHelper.GetScreenshot(new System.Drawing.Rectangle(0, 0, 0, 0), ImagePath,false,out BitmapImage bitmapImage,-1);
  378. APP.W_PracticeWindow.addImage(ImagePath);
  379. }
  380. /// <summary>
  381. /// 批注关闭
  382. /// </summary>
  383. private void PracticeWin_click_closeClick()
  384. {
  385. APP.W_PracticeWindow = null;
  386. }
  387. /// <summary>
  388. /// 批注关闭时显示工具栏
  389. /// </summary>
  390. /// <param name="sender"></param>
  391. /// <param name="e"></param>
  392. private void PracticeWin_Unloaded(object sender, RoutedEventArgs e)
  393. {
  394. Show();
  395. }
  396. /// <summary>
  397. /// 结束课堂
  398. /// </summary>
  399. private void closeAction()
  400. {
  401. //MyApp.myloading.Show();//加载等待
  402. try
  403. {
  404. //#region 加载通知栏图标
  405. //System.Windows.Forms.NotifyIcon ico = new System.Windows.Forms.NotifyIcon
  406. //{
  407. // Icon = new System.Drawing.Icon(FileToolsCommon.GetFileAbsolutePath("favicon256.ico")),
  408. // //this.Icon.DoubleClick += Icon_DoubleClick;//双击恢复 暂无
  409. // Visible = true
  410. //};
  411. //#endregion 加载通知栏图标
  412. //WindowState = WindowState.Minimized;
  413. //#region 关闭已打开窗口
  414. //pageData.tongping = !pageData.tongping;
  415. ////停止屏幕共享
  416. //if (pageData.tongping)
  417. //{
  418. // tongpingEnd();
  419. // pageData.menuList[1].Pic = "../Images/MainInterface/屏幕共享@2x.png";
  420. // pageData.menuList[1].Name = "屏幕共享";
  421. // gridAnimated.Visibility = Visibility.Collapsed;
  422. //}
  423. //if (blackboardWin2 != null)
  424. //{
  425. // blackboardWin2.Close();
  426. //}
  427. //if (rollCallWindow != null)
  428. //{
  429. // rollCallWindow.Close();
  430. //}
  431. //if (classroomExamWindow != null)
  432. //{
  433. // classroomExamWindow.Close();
  434. //}
  435. //if (classReportWindow != null)
  436. //{
  437. // classReportWindow.Close();
  438. //}
  439. //if (practiceWin != null)
  440. //{
  441. // practiceWin.Close();
  442. //}
  443. //if (classroomQuestionsWindow != null)
  444. //{
  445. // classroomQuestionsWindow.Close();
  446. //}
  447. //if (jietuWindow != null)
  448. //{
  449. // jietuWindow.Close();
  450. //}
  451. //if (attendanceWindow != null)
  452. //{
  453. // attendanceWindow.Close();
  454. //}
  455. //if (userCenterWindow != null)
  456. //{
  457. // userCenterWindow.Close();
  458. //}
  459. //#endregion 关闭已打开窗口
  460. //new Thread(o =>
  461. //{
  462. // StopNginx();
  463. // string msg = ZSocketMsgManger.classEnd();
  464. // ZSocketServer.getInstance().SendMessage(msg);
  465. // #region 清除没有上线人数的课堂数据
  466. // /*
  467. // * 上传本地数据库数据
  468. // * 判断该节课是否有人上线 若没人在线删除本节课数据。
  469. // * 可能存在多节课 1.多节课都没人上线,删除所有数据不上传。 2.多节课有上线的有没上线的情况,删除没有上线人数课的数据,将其余数据上传。
  470. // *
  471. // *
  472. // *
  473. // */
  474. // List<ClassData> classDataList = new List<ClassData>();
  475. // classDataList = ZSqliteManger.queryClassData();//取所有数据
  476. // if (classDataList.Count > 0)
  477. // {
  478. // for (int i = 0; i < classDataList.Count; i++)
  479. // {
  480. // if ("startclass".Equals(classDataList[i].api))//获取每节课的课堂id
  481. // {
  482. // List<ClassData> classroomidDataList = new List<ClassData>();
  483. // classroomidDataList = ZSqliteManger.queryClassRoomidData(classDataList[i].roomid);//取该节课的所有数据
  484. // for (int j = 0; j < classroomidDataList.Count; j++)
  485. // {
  486. // if ("sign".Equals(classroomidDataList[j].api))//若存在上线学生跳出循环
  487. // {
  488. // break;
  489. // }
  490. // if (j + 1 == classroomidDataList.Count)//若遍历完所有数据仍没有上线学生,删除该课堂id下所有数据
  491. // {
  492. // ZSqliteManger.clearClassData(classroomidDataList[j].roomid);
  493. // if (classroomidDataList[j].roomid == ZCommonData.roomid)
  494. // {
  495. // try
  496. // {
  497. // string path = ZConfig.classRoomImagePath();
  498. // if (Directory.Exists(path))
  499. // {
  500. // Directory.Delete(path, true);
  501. // }
  502. // }
  503. // catch (Exception ex)
  504. // {
  505. // LogHelper.WriteErrLog("ToolbarWindow(删除无效课堂文件夹报错:)" + ex.Message, ex);
  506. // }
  507. // }
  508. // }
  509. // }
  510. // }
  511. // }
  512. // classDataList = new List<ClassData>();
  513. // classDataList = ZSqliteManger.queryClassData();//取所有数据
  514. // }
  515. // #endregion
  516. // if (classDataList.Count > 0)
  517. // {
  518. // bool isRoomid = false;
  519. // for (int i = 0; i < classDataList.Count; i++)
  520. // {
  521. // if (classDataList[i].roomid == ZCommonData.roomid)
  522. // {
  523. // isRoomid = true;
  524. // }
  525. // }
  526. // if (isRoomid)
  527. // {
  528. // Dictionary<string, object> stopclass = new Dictionary<string, object>
  529. // {
  530. // { "roomid", ZCommonData.roomid },
  531. // { "endtime", ZNumUtil.unixTime() }
  532. // };
  533. // ZCommonData.askid = ZNumUtil.randomNum();
  534. // ZSqliteManger.insertClassData(new ClassData()
  535. // {
  536. // unix = ZNumUtil.unixTime(),
  537. // roomid = ZCommonData.roomid,
  538. // api = "stopclass",
  539. // json = ZJsonHelper.ToJson(stopclass),
  540. // askid = ZCommonData.askid
  541. // });
  542. // }
  543. // }
  544. // ZSocketServer.getInstance().Dispose();
  545. // if (classDataList.Count > 0)
  546. // {
  547. // MyApp.ZipFile();
  548. // }
  549. Dispatcher.Invoke(new Action(() =>
  550. {
  551. System.Environment.Exit(0);
  552. }));
  553. //}).Start();
  554. }
  555. catch (Exception ex)
  556. {
  557. LogHelper.WriteErrLog("【ToolbarWindow】(closeAction)" + ex.Message, ex);
  558. }
  559. }
  560. /// <summary>
  561. /// 二级工具栏打开隐藏
  562. /// </summary>
  563. /// <param name="toolShow"></param>
  564. /// <param name="target"></param>
  565. /// <param name="contentList"></param>
  566. private void hideOrShow(bool toolShow, DependencyObject target, List<DependencyObject> contentList)
  567. {
  568. Storyboard story = new Storyboard();
  569. DoubleAnimation da = new DoubleAnimation();
  570. if (toolShow)
  571. {
  572. da.From = 0;
  573. da.To = 173;
  574. }
  575. else
  576. {
  577. da.From = 173.0;
  578. da.To = 0.0;
  579. }
  580. //可选属性:是否往返播放
  581. da.AutoReverse = false;
  582. //da.RepeatBehavior = RepeatBehavior.Forever;
  583. //da.RepeatBehavior = new RepeatBehavior(2);
  584. da.Duration = new Duration(TimeSpan.FromSeconds(0.3));
  585. Storyboard.SetTarget(da, target);
  586. Storyboard.SetTargetProperty(da, new PropertyPath("Width"));
  587. story.Children.Add(da);
  588. foreach (DependencyObject item in contentList)
  589. {
  590. DoubleAnimation da2 = new DoubleAnimation();
  591. if (toolShow)
  592. {
  593. da2.From = 0;
  594. da2.To = 1.0;
  595. }
  596. else
  597. {
  598. da2.From = 1.0;
  599. da2.To = 0.0;
  600. }
  601. da2.Duration = new Duration(TimeSpan.FromSeconds(0.1));
  602. Storyboard.SetTarget(da2, item);
  603. Storyboard.SetTargetProperty(da2, new PropertyPath("Opacity"));
  604. story.Children.Add(da2);
  605. }
  606. story.Begin();
  607. }
  608. private void toolbar_win_Closed(object sender, EventArgs e)
  609. {
  610. }
  611. private void toolbar_win_ContentRendered(object sender, EventArgs e)
  612. {
  613. }
  614. private void toolbar_win_Loaded(object sender, RoutedEventArgs e)
  615. {
  616. }
  617. private void Window_MouseLeftButtonDown_1(object sender, MouseButtonEventArgs e)
  618. {
  619. }
  620. private void Rectangle_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
  621. {
  622. }
  623. /// <summary>
  624. /// 工具栏移动事件
  625. /// </summary>
  626. /// <param name="sender"></param>
  627. /// <param name="e"></param>
  628. private void Rectangle_MouseMove(object sender, MouseEventArgs e)
  629. {
  630. if (e.LeftButton == MouseButtonState.Pressed)
  631. {
  632. DragMove();
  633. }
  634. }
  635. #endregion
  636. }
  637. /// <summary>
  638. /// 工具栏模型
  639. /// </summary>
  640. public class ToolbarModel : NotifyModel
  641. {
  642. public ObservableCollection<ToolbarMenu> menuList { get; set; }
  643. internal bool _tongping = false;
  644. public bool tongping
  645. {
  646. get => _tongping;
  647. set { _tongping = value; OnPropertyChanged("tongping"); }
  648. }
  649. internal bool _IsOpen = true;
  650. public bool IsOpen
  651. {
  652. get => _IsOpen;
  653. set { _IsOpen = value; OnPropertyChanged("IsOpen"); }
  654. }
  655. public ToolbarModel()
  656. {
  657. menuList = new ObservableCollection<ToolbarMenu>();
  658. }
  659. }
  660. /// <summary>
  661. /// 工具栏菜单模型
  662. /// </summary>
  663. public class ToolbarMenu : NotifyModel
  664. {
  665. internal string _name;
  666. public string Name
  667. {
  668. get => _name;
  669. set { _name = value; OnPropertyChanged("Name"); }
  670. }
  671. internal string _Pic;
  672. public string Pic
  673. {
  674. get => _Pic;
  675. set { _Pic = value; OnPropertyChanged("Pic"); }
  676. }
  677. }
  678. }