Browse Source

compdfkit(win) - 导入注释刷新外观,最近文档固定只展示SampleFile

weixiangjie 1 year ago
parent
commit
7c28de208b

+ 1 - 0
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationList/PDFAnnotationListControl/CPDFAnnotationListControl.xaml.cs

@@ -126,6 +126,7 @@ namespace Compdfkit_Tools.PDFControl
             pdfViewer.Document.ImportAnnotationFromXFDFPath(selectedPath,tempPath);
                 
             LoadAnnotationList();
+            pdfViewer.ReloadDocument();
             pdfViewer.UndoManager.CanSave = true;
         }
 

+ 1 - 1
Demo/Examples/Compdfkit_Tools/Common/HomePage/RecentFilesControl.xaml

@@ -113,7 +113,7 @@
                             <TextBlock Text="{Binding FilePath}" TextTrimming="CharacterEllipsis" Foreground="#666" FontFamily="Microsoft YaHei" FontSize="12" LineHeight="16"/>
                         </StackPanel>
 
-                        <TextBlock Grid.Column="2" Margin="20,0,0,0" VerticalAlignment="Center" Text="{Binding OpenDate}" TextTrimming="CharacterEllipsis" Foreground="#666" FontFamily="Microsoft YaHei" FontSize="14" LineHeight="20"/>
+                        <TextBlock Visibility="Hidden" Grid.Column="2" Margin="20,0,0,0" VerticalAlignment="Center" Text="{Binding OpenDate}" TextTrimming="CharacterEllipsis" Foreground="#666" FontFamily="Microsoft YaHei" FontSize="14" LineHeight="20"/>
 
                         <TextBlock Grid.Column="3" Margin="20,0,0,0" VerticalAlignment="Center" Text="{Binding FileSize}" TextTrimming="CharacterEllipsis" Foreground="#666" FontFamily="Microsoft YaHei" FontSize="14" LineHeight="20"/>
                     </Grid>

+ 10 - 10
Demo/Examples/PDFViewer/App.xaml.cs

@@ -48,6 +48,7 @@ namespace PDFViewer
             Thread.CurrentThread.CurrentCulture = new CultureInfo(CurrentCulture);
             base.OnStartup(e);
             LicenseVerify();
+            HistoryFile(@"TestFile\ComPDFKit_Sample_File_Windows.pdf");
             FileHistoryHelper<PDFFileInfo>.Instance.LoadHistory();
         }
         
@@ -59,16 +60,7 @@ namespace PDFViewer
             LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify("license_key_windows.txt", true);
             return (verifyResult != LicenseErrorCode.E_LICENSE_SUCCESS);
         }
-    }
-
-    public class FilePathList : List<string>
-    {
-        public new void Add(string item)
-        {
-            base.Add(item);
-            HistoryFile(item);
-        }
-
+        
         private void HistoryFile(string item)
         {
             PDFFileInfo fileInfo = new PDFFileInfo();
@@ -80,6 +72,14 @@ namespace PDFViewer
             FileHistoryHelper<PDFFileInfo>.Instance.SaveHistory();
         }
     }
+
+    public class FilePathList : List<string>
+    {
+        public new void Add(string item)
+        {
+            base.Add(item);
+        }
+    }
     
     public class ResourceConverter : IValueConverter
     {