Browse Source

其他-限制内嵌文档只能打开一次

ZhouJieSheng 2 years ago
parent
commit
c1963c2601
1 changed files with 6 additions and 0 deletions
  1. 6 0
      PDF Office/ViewModels/ViewContentViewModel.cs

+ 6 - 0
PDF Office/ViewModels/ViewContentViewModel.cs

@@ -854,6 +854,12 @@ namespace PDF_Office.ViewModels
             {
                 case "Guid":
                     //打开内嵌文档
+                    if(App.OpenedFileList.Contains(App.GuidPDFPath))
+                    {
+                        //如果已经打开时,则选中内嵌文档
+                        App.mainWindowViewModel.SelectItem(App.GuidPDFPath);
+                        return;
+                    }
                     if (File.Exists(App.GuidPDFPath))
                     {
                         App.mainWindowViewModel.AddTabItem(App.GuidPDFPath);