MainContentViewModel.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708
  1. using ComPDFKitViewer.PdfViewer;
  2. using Microsoft.Win32;
  3. using PDF_Master.CustomControl;
  4. using PDF_Master.EventAggregators;
  5. using PDF_Master.Views;
  6. using Prism.Commands;
  7. using Prism.Events;
  8. using Prism.Ioc;
  9. using Prism.Mvvm;
  10. using Prism.Regions;
  11. using Prism.Services.Dialogs;
  12. using System;
  13. using System.Collections.Generic;
  14. using System.Diagnostics;
  15. using System.Linq;
  16. using System.Text;
  17. using System.Threading.Tasks;
  18. using System.Windows;
  19. using PDF_Master.Model;
  20. using System.ComponentModel;
  21. using PDF_Master.Helper;
  22. using PDFSettings.Settings;
  23. using System.Drawing;
  24. using System.IO;
  25. using System.Drawing.Imaging;
  26. using ComPDFKit.PDFDocument;
  27. using static PDF_Master.Model.Dialog.ToolsDialogs.SaftyDialogs.DeleteSafetySettintgsModel;
  28. using PDF_Master.Model.Dialog.ToolsDialogs.SaftyDialogs;
  29. using PDF_Master.Properties;
  30. namespace PDF_Master.ViewModels
  31. {
  32. public class MainContentViewModel : BindableBase, INavigationAware
  33. {
  34. #region 文案
  35. private string T_rename;
  36. public string T_Rename
  37. {
  38. get { return T_rename; }
  39. set
  40. {
  41. SetProperty(ref T_rename, value);
  42. }
  43. }
  44. private string T_floder;
  45. public string T_Floder
  46. {
  47. get { return T_floder; }
  48. set
  49. {
  50. SetProperty(ref T_floder, value);
  51. }
  52. }
  53. private string T_close;
  54. public string T_Close
  55. {
  56. get { return T_close; }
  57. set
  58. {
  59. SetProperty(ref T_close, value);
  60. }
  61. }
  62. private string T_closeAll;
  63. public string T_CloseAll
  64. {
  65. get { return T_closeAll; }
  66. set
  67. {
  68. SetProperty(ref T_closeAll, value);
  69. }
  70. }
  71. private void InitString()
  72. {
  73. FileName = App.MainPageLoader.GetString("MultipleTabs_Default");
  74. T_Rename = App.MainPageLoader.GetString("MultipleTabs_Rename");
  75. T_Floder = App.MainPageLoader.GetString("MultipleTabs_ Folder");
  76. T_Close = App.MainPageLoader.GetString("MultipleTabs_ Close");
  77. T_CloseAll = App.MainPageLoader.GetString("MultipleTabs_ CloseAll");
  78. }
  79. #endregion
  80. /// <summary>
  81. /// 是否处于阅读模式
  82. /// </summary>
  83. public bool IsBookMode = false;
  84. private string fileName = "Home";
  85. public string FileName
  86. {
  87. get { return fileName; }
  88. set
  89. {
  90. SetProperty(ref fileName, value);
  91. if (IsReNameTextShow == Visibility.Visible)
  92. {
  93. dorenameFile();
  94. }
  95. }
  96. }
  97. private string filePath;
  98. public string FilePath
  99. {
  100. get { return filePath; }
  101. set
  102. {
  103. SetProperty(ref filePath, value);
  104. if (!string.IsNullOrEmpty(filePath))
  105. {
  106. FileName = System.IO.Path.GetFileName(filePath);
  107. }
  108. }
  109. }
  110. private Visibility fileChanged = Visibility.Collapsed;
  111. public Visibility FileChanged
  112. {
  113. get { return fileChanged; }
  114. set { SetProperty(ref fileChanged, value); }
  115. }
  116. private bool isNewDocument = false;
  117. public CPDFViewer PDFViewer { get; set; }
  118. public DelegateCommand<object> CloseTab { get; set; }
  119. public DelegateCommand UnLoaded { get; set; }
  120. public DelegateCommand ShowInFolderCommand { get; set; }
  121. public DelegateCommand RenameCommand { get; set; }
  122. public ViewContentViewModel viewContentViewModel { get; set; }
  123. public MainWindowViewModel mainWindowViewModel { get; set; }
  124. public HomeContentViewModel homeContentViewModel { get; set; }
  125. private string regionName;
  126. public string MainContentRegionName
  127. {
  128. get { return regionName; }
  129. set { SetProperty(ref regionName, value); }
  130. }
  131. private bool isReNameEnable = false;
  132. /// <summary>
  133. /// 是否能够重命名
  134. /// </summary>
  135. public bool IsReNameEnable
  136. {
  137. get { return isReNameEnable; }
  138. set
  139. {
  140. SetProperty(ref isReNameEnable, value);
  141. }
  142. }
  143. private bool isShowInFolderEnable = false;
  144. /// <summary>
  145. /// 是否能够显示文件浏览器
  146. /// </summary>
  147. public bool IsShowInFolderEnable
  148. {
  149. get { return isShowInFolderEnable; }
  150. set
  151. {
  152. SetProperty(ref isShowInFolderEnable, value);
  153. }
  154. }
  155. private Visibility isRenameTextShow = Visibility.Collapsed;
  156. public Visibility IsReNameTextShow
  157. {
  158. get { return isRenameTextShow; }
  159. set
  160. {
  161. SetProperty(ref isRenameTextShow, value);
  162. }
  163. }
  164. public IRegionManager toolregion;
  165. public IEventAggregator eventer;
  166. public IContainerProvider container;
  167. public IDialogService dialogs;
  168. public MainContentViewModel(IRegionManager regionManager, IEventAggregator eventAggregator, IContainerProvider containerProvider, IDialogService dialogService)
  169. {
  170. toolregion = regionManager;
  171. eventer = eventAggregator;
  172. container = containerProvider;
  173. dialogs = dialogService;
  174. CloseTab = new DelegateCommand<object>(CloseTabItem);
  175. ShowInFolderCommand = new DelegateCommand(showInFolder);
  176. RenameCommand = new DelegateCommand(rename);
  177. UnLoaded = new DelegateCommand(unload);
  178. MainContentRegionName = Guid.NewGuid().ToString();
  179. InitString();
  180. }
  181. //关闭页签
  182. private void unload()
  183. {
  184. if (PDFViewer != null)
  185. {
  186. PDFViewer.CloseDocument();
  187. }
  188. }
  189. /// <summary>
  190. /// 执行重命名操作
  191. /// </summary>
  192. private void dorenameFile()
  193. {
  194. var folder = PDFViewer.Document.FilePath.Substring(0, PDFViewer.Document.FilePath.LastIndexOf("\\"));
  195. ////File.Replace(PDFViewer.Document.FilePath,Path.Combine(folder,FileName),Path.Combine(folder,"back.bak"),true);
  196. ///TODO:会被占用 无法操作
  197. IsReNameTextShow = Visibility.Collapsed;
  198. }
  199. /// <summary>
  200. /// 显示重命名文本框
  201. /// </summary>
  202. private void rename()
  203. {
  204. IsReNameTextShow = Visibility.Visible;
  205. }
  206. private void showInFolder()
  207. {
  208. if (!string.IsNullOrEmpty(PDFViewer.Document.FilePath))
  209. {
  210. CommonHelper.ShowFileBrowser(PDFViewer.Document.FilePath);
  211. }
  212. }
  213. private void CloseTabItem(object item)
  214. {
  215. if (item == null)
  216. {
  217. App.mainWindowViewModel?.CloseTabItem(mainWindowViewModel.SelectedItem);
  218. }
  219. else
  220. {
  221. App.mainWindowViewModel?.CloseTabItem(item);
  222. App.OpenedFileList.Remove(FilePath);
  223. }
  224. }
  225. /// <summary>
  226. /// 打开指定路径的PDF文件
  227. /// </summary>
  228. /// <param name="filePath"></param>
  229. public void OpenFile(string filePath)
  230. {
  231. var result = LoadFileFormPath(filePath);
  232. if (!result)
  233. {
  234. return;
  235. }
  236. FilePath = filePath;
  237. NavigateToViewContent();
  238. //检查是否是新文档
  239. OpenFileInfo isnew = SettingHelper.GetFileInfo(filePath);
  240. if (isnew == null)
  241. {
  242. isNewDocument = true;
  243. if (App.OpenedFileList.Contains(filePath) == false)
  244. {
  245. App.OpenedFileList.Add(filePath);
  246. }
  247. }
  248. //打开文件后,不管是新文件还是旧文件都需要更新排序
  249. SettingHelper.SortRecentOpenFiles(filePath);
  250. }
  251. /// <summary>
  252. /// 创建PDFviewer对象后导航到ViewContent
  253. /// </summary>
  254. private void NavigateToViewContent()
  255. {
  256. NavigationParameters parameters = new NavigationParameters {
  257. { ParameterNames.MainViewModel, this },
  258. { ParameterNames.PDFViewer,PDFViewer}
  259. };
  260. toolregion.RequestNavigate(MainContentRegionName, "ViewContent", parameters);
  261. IsReNameEnable = true;
  262. if (!string.IsNullOrEmpty(PDFViewer.Document.FilePath))
  263. {
  264. IsShowInFolderEnable = true;
  265. }
  266. }
  267. /// <summary>
  268. /// 从文件路径创建PDFViewer对象,已包含文档解密逻辑
  269. /// </summary>
  270. /// <param name="path"></param>
  271. /// <returns></returns>
  272. private bool LoadFileFormPath(string path)
  273. {
  274. PDFViewer = new CPDFViewer();
  275. PDFViewer.InitDocument(path);
  276. PDFViewer.UndoManager.PropertyChanged += UndoManager_PropertyChanged;
  277. if (PDFViewer.Document == null)
  278. {
  279. //MessageBoxEx.Show(App.MainPageLoader.GetString("Main_OpenFileFailedWarning"));
  280. return false;
  281. }
  282. else
  283. {
  284. //解密逻辑调整到显示阅读页后,测试确认没问题后,删除下面的注释部分代码
  285. //VerifyPasswordResult result = SecurityHelper.VerifyPasswordByPasswordKind(PDFViewer.Document, EnumPasswordKind.StatusOpenPassword, dialogs);
  286. //if (result.IsDiscryptied)
  287. //{
  288. // if (result.Password != null)
  289. // {
  290. // string filePath = PDFViewer.Document.FilePath;
  291. // PDFViewer.Document.UnlockWithPassword(result.Password);
  292. // PDFViewer.Tag = result.Password;
  293. // }
  294. // ///TODO:
  295. // ///此处填入需要执行的代码
  296. //}
  297. //if (result.IsDiscryptied == false)
  298. //{
  299. // //未成功解密文档时,释放Document对象,返回
  300. // PDFViewer.Document.Release();
  301. // return false;
  302. //}
  303. }
  304. //PDFViewer.Load();
  305. //PDFViewer.SetFormFieldHighlight(Settings.Default.AppProperties.InitialVIew.HighlightLink);
  306. //PDFViewer.SetBackgroundBrush(new System.Windows.Media.SolidColorBrush(Settings.Default.AppProperties.InitialVIew.BackGround));
  307. if (App.mainWindowViewModel != null)
  308. {
  309. App.mainWindowViewModel.CurrentPDFViewer = PDFViewer;
  310. }
  311. return true;
  312. }
  313. /// <summary>
  314. /// 创建文件,路径为空时表示创建空白文档
  315. /// 否则表示从图片路径创建PDf
  316. /// </summary>
  317. /// <param name="imagePath"></param>
  318. /// <returns></returns>
  319. public bool CreateFile(string imagePath = null)
  320. {
  321. PDFViewer = new CPDFViewer();
  322. PDFViewer.CreateDocument();
  323. PDFViewer.UndoManager.PropertyChanged += UndoManager_PropertyChanged;
  324. if (PDFViewer.Document == null)
  325. {
  326. AlertsMessage alertsMessage = new AlertsMessage();
  327. alertsMessage.ShowDialog("", "创建文件失败.", "OK");
  328. return false;
  329. }
  330. if (string.IsNullOrEmpty(imagePath))
  331. {
  332. FileName = "Blank Page.pdf";
  333. //默认插入595*842 大小的页面
  334. PDFViewer.Document.InsertPage(0, 595, 842, null);
  335. }
  336. else
  337. {
  338. FileName = imagePath.Substring(imagePath.LastIndexOf("\\") + 1, imagePath.LastIndexOf(".") - imagePath.LastIndexOf("\\") - 1) + ".pdf";
  339. Bitmap pic = new Bitmap(imagePath);
  340. int width = pic.Size.Width;
  341. int height = pic.Size.Height;
  342. string ex = System.IO.Path.GetExtension(imagePath);
  343. //其他格式或者名称中含空格的图片 在本地先转存一下
  344. if ((ex != ".jpg" && ex != ".jpeg") || !Uri.IsWellFormedUriString(imagePath, UriKind.Absolute))
  345. {
  346. //将其他格式图片转换成jpg
  347. string folderPath = Path.GetTempPath();
  348. if (File.Exists(folderPath))
  349. {
  350. File.Delete(folderPath);
  351. }
  352. DirectoryInfo tempfolder = new DirectoryInfo(folderPath);
  353. if (!tempfolder.Exists)
  354. {
  355. tempfolder.Create();
  356. }
  357. string targetPath = System.IO.Path.Combine(folderPath, Guid.NewGuid().ToString());
  358. imagePath = targetPath;
  359. pic.Save(targetPath, ImageFormat.Jpeg);
  360. }
  361. pic.Dispose();
  362. var result = PDFViewer.Document.InsertPage(0, width, height, imagePath);
  363. if (!result)
  364. {
  365. AlertsMessage alertsMessage = new AlertsMessage();
  366. alertsMessage.ShowDialog("", "创建文件失败.", "OK");
  367. return false;
  368. }
  369. }
  370. //设置背景色
  371. PDFViewer.SetBackgroundBrush(new System.Windows.Media.SolidColorBrush(Settings.Default.AppProperties.InitialVIew.BackGround));
  372. PDFViewer.Load();
  373. PDFViewer.UndoManager.CanSave = true;
  374. FileChanged = Visibility.Visible;
  375. PDFViewer.SetFormFieldHighlight(Settings.Default.AppProperties.InitialVIew.HighlightLink);
  376. NavigateToViewContent();
  377. return true;
  378. }
  379. /// <summary>
  380. /// 从office文件转换成PDF
  381. /// </summary>
  382. /// <param name="sourcepath"></param>
  383. /// <returns></returns>
  384. public async Task<bool> CreateFileFromOffice(string sourcepath, Microsoft.Office.Interop.Word.WdPaperSize paperSize = Microsoft.Office.Interop.Word.WdPaperSize.wdPaperA4, double margin = 0)
  385. {
  386. try
  387. {
  388. //生成存放临时pdf的临时文件夹
  389. string folderPath = Path.GetTempPath();
  390. if (File.Exists(folderPath))
  391. {
  392. File.Delete(folderPath);
  393. }
  394. DirectoryInfo tempfolder = new DirectoryInfo(folderPath);
  395. if (!tempfolder.Exists)
  396. {
  397. tempfolder.Create();
  398. }
  399. string targetPath = System.IO.Path.Combine(folderPath, Guid.NewGuid().ToString() + ".pdf");
  400. string ex = System.IO.Path.GetExtension(sourcepath).ToLower();
  401. await Task.Delay(10);
  402. switch (ex)
  403. {
  404. case ".doc":
  405. case ".docx":
  406. case "docm":
  407. case ".dot":
  408. case ".dotx":
  409. case ".dotm":
  410. case ".txt":
  411. case ".html":
  412. await Task.Run(() =>
  413. {
  414. Microsoft.Office.Interop.Word.Application word = new Microsoft.Office.Interop.Word.Application();
  415. Microsoft.Office.Interop.Word.Document document = null;
  416. word.Visible = false;
  417. word.ShowWindowsInTaskbar = true;
  418. document = word.Documents.Open(sourcepath);
  419. var page = document.PageSetup;
  420. page.PaperSize = paperSize;
  421. if (margin > 0)
  422. {
  423. page.LeftMargin = page.TopMargin = page.RightMargin = page.BottomMargin = (float)margin;
  424. }
  425. document?.ExportAsFixedFormat(targetPath, Microsoft.Office.Interop.Word.WdExportFormat.wdExportFormatPDF);
  426. document?.Close(false);
  427. if (word != null)
  428. {
  429. word.NormalTemplate.Saved = true;
  430. word.Quit();
  431. }
  432. });
  433. break;
  434. case ".xls":
  435. case ".xlsx":
  436. case ".xlsm":
  437. case ".xlsb":
  438. case ".xlam":
  439. case ".xltx":
  440. case ".xlt":
  441. await Task.Run(() =>
  442. {
  443. Microsoft.Office.Interop.Excel.Application excele = new Microsoft.Office.Interop.Excel.Application();
  444. Microsoft.Office.Interop.Excel.Workbook workbook = null;
  445. excele.Visible = false;
  446. try
  447. {
  448. workbook = excele.Workbooks.Open(sourcepath);
  449. }
  450. catch (Exception e)
  451. {
  452. workbook = excele.Workbooks.Open(sourcepath, 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "t", false, false, 0, true, 1, Microsoft.Office.Interop.Excel.XlCorruptLoad.xlRepairFile);
  453. }
  454. workbook?.ExportAsFixedFormat(Microsoft.Office.Interop.Excel.XlFixedFormatType.xlTypePDF, targetPath);
  455. workbook?.Close();
  456. excele?.Quit();
  457. });
  458. break;
  459. case ".ppt":
  460. case ".pptx":
  461. case ".pptm":
  462. case ".pptsx":
  463. case ".pps":
  464. case ".pptsm":
  465. case ".pot":
  466. case ".potm":
  467. await Task.Run(() =>
  468. {
  469. Microsoft.Office.Interop.PowerPoint.Application ppt = new Microsoft.Office.Interop.PowerPoint.Application();
  470. Microsoft.Office.Interop.PowerPoint.Presentation presentation = null;
  471. ppt.Visible = Microsoft.Office.Core.MsoTriState.msoCTrue;
  472. presentation = ppt.Presentations.Open(sourcepath);
  473. presentation.ExportAsFixedFormat(targetPath, Microsoft.Office.Interop.PowerPoint.PpFixedFormatType.ppFixedFormatTypePDF);
  474. presentation?.Close();
  475. ppt?.Quit();
  476. });
  477. break;
  478. }
  479. PDFViewer = new CPDFViewer();
  480. PDFViewer.CreateDocument();
  481. if (PDFViewer.Document == null)
  482. {
  483. AlertsMessage alertsMessage = new AlertsMessage();
  484. alertsMessage.ShowDialog("", "创建PDF失败", "OK");
  485. return false;
  486. }
  487. FileName = sourcepath.Substring(sourcepath.LastIndexOf("\\") + 1, sourcepath.LastIndexOf(".") - sourcepath.LastIndexOf("\\") - 1) + ".pdf";
  488. var tempdoc = CPDFDocument.InitWithFilePath(targetPath);
  489. if (tempdoc == null)
  490. {
  491. AlertsMessage alertsMessage = new AlertsMessage();
  492. alertsMessage.ShowDialog("", "创建PDF失败", "OK");
  493. return false;
  494. }
  495. PDFViewer.Document.ImportPages(tempdoc, "");
  496. PDFViewer.SetBackgroundBrush(new System.Windows.Media.SolidColorBrush(Settings.Default.AppProperties.InitialVIew.BackGround));
  497. PDFViewer.Load();
  498. PDFViewer.UndoManager.CanSave = true;
  499. FileChanged = Visibility.Visible;
  500. PDFViewer.SetFormFieldHighlight(Settings.Default.AppProperties.InitialVIew.HighlightLink);
  501. await System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
  502. {
  503. NavigateToViewContent();
  504. }));
  505. return true;
  506. }
  507. catch (Exception ex)
  508. {
  509. string str = "没有安装";
  510. //判断是否有安装office软件
  511. var officeType = Type.GetTypeFromProgID("Word.Application");
  512. if (officeType == null)
  513. {
  514. str += "Word;";
  515. }
  516. officeType = Type.GetTypeFromProgID("Excel.Application");
  517. if (officeType == null)
  518. {
  519. str += "Excel;";
  520. }
  521. officeType = Type.GetTypeFromProgID("Powerpoint.Application");
  522. if (officeType == null)
  523. {
  524. str += "Excel;";
  525. }
  526. AlertsMessage alertsMessage = new AlertsMessage();
  527. if (str != "没有安装")
  528. {
  529. alertsMessage.ShowDialog("", "没有安装Office", "OK");
  530. }
  531. else
  532. {
  533. alertsMessage.ShowDialog("", "创建PDF失败", "OK");
  534. }
  535. return false;
  536. }
  537. }
  538. private void UndoManager_PropertyChanged(object sender, PropertyChangedEventArgs e)
  539. {
  540. if (e.PropertyName == "CanSave")
  541. {
  542. if (PDFViewer.UndoManager.CanSave)
  543. {
  544. FileChanged = Visibility.Visible;
  545. }
  546. else
  547. {
  548. FileChanged = Visibility.Collapsed;
  549. }
  550. if (!string.IsNullOrEmpty(PDFViewer.Document.FileName))
  551. {
  552. FileName = PDFViewer.Document.FileName;
  553. }
  554. }
  555. }
  556. #region Navigation
  557. public async void OnNavigatedTo(NavigationContext navigationContext)
  558. {
  559. mainWindowViewModel = App.mainWindowViewModel;
  560. //因为是异步打开多个文件,需要先显示Home界面
  561. NavigationParameters parameters = new NavigationParameters();
  562. parameters.Add(ParameterNames.MainViewModel, this);
  563. if (toolregion.Regions.ContainsRegionWithName(MainContentRegionName))
  564. {
  565. toolregion.RequestNavigate(MainContentRegionName, "HomeContent", parameters);
  566. }
  567. //常规加载首页的情况
  568. if (navigationContext.Parameters.Count <= 0)
  569. {
  570. return;
  571. }
  572. //一次打开多个文件的情况
  573. var filepath = navigationContext.Parameters[ParameterNames.FilePath].ToString();
  574. if (filepath != null)
  575. {
  576. bool result = true;
  577. if (System.IO.Path.GetExtension(filepath.ToString()).ToLower() == ".pdf")
  578. {
  579. OpenFile(filepath.ToString());
  580. }
  581. else if (Properties.Resources.imageex.Contains(System.IO.Path.GetExtension(filepath).ToLower()))
  582. {
  583. //图片转PDF
  584. result = CreateFile(filepath);
  585. }
  586. else
  587. {
  588. result = await CreateFileFromOffice(filepath);
  589. }
  590. if (!result)
  591. {
  592. mainWindowViewModel.CloseTabItem(mainWindowViewModel.SelectedItem);
  593. return;
  594. }
  595. if (!App.OpenedFileList.Contains(filepath))
  596. {
  597. //更新已打开的文件记录
  598. App.OpenedFileList.Add(filepath);
  599. }
  600. }
  601. }
  602. public bool IsNavigationTarget(NavigationContext navigationContext)
  603. {
  604. return false;
  605. }
  606. public void OnNavigatedFrom(NavigationContext navigationContext)
  607. {
  608. }
  609. #endregion Navigation
  610. }
  611. }