Prechádzať zdrojové kódy

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

ZhouJieSheng 2 rokov pred
rodič
commit
c1963c2601

+ 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);