Explorar o código

compdfkit(windows)- 解除x86 x64忽略

liuaoran hai 1 ano
pai
achega
f6aa04183d

+ 1 - 3
.gitignore

@@ -20,9 +20,7 @@ mono_crash.*
 [Dd]ebug/
 [Dd]ebugPublic/
 [Rr]elease/
-[Rr]eleases/
-x64/
-x86/
+[Rr]eleases/ 
 [Ww][Ii][Nn]32/
 [Aa][Rr][Mm]/
 [Aa][Rr][Mm]64/

+ 1 - 1
Demo/Examples/Examlpes.sln

@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio Version 17
 VisualStudioVersion = 17.5.33516.290
 MinimumVisualStudioVersion = 10.0.40219.1
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SDKLicense", "SDKLicense", "{43ED4BF9-5941-4F32-A9DC-016E94A0E74E}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "License", "License", "{43ED4BF9-5941-4F32-A9DC-016E94A0E74E}"
 	ProjectSection(SolutionItems) = preProject
 		license_key_win.xml = license_key_win.xml
 	EndProjectSection

+ 27 - 39
Demo/Examples/Forms/MainWindow.xaml.cs

@@ -34,6 +34,7 @@ namespace Forms
     /// </summary>
     public partial class MainWindow : Window, INotifyPropertyChanged
     {
+        #region property
         private PDFViewControl passwordViewer;
         private PDFViewControl pdfViewControl;
         private CPDFSearchControl searchControl = null;
@@ -80,11 +81,13 @@ namespace Forms
         }
 
         public event PropertyChangedEventHandler PropertyChanged;
+        #endregion
 
         protected void OnPropertyChanged([CallerMemberName] string name = null)
         {
             PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
         }
+
         public MainWindow()
         {
             InitializeComponent();
@@ -92,13 +95,16 @@ namespace Forms
             DataContext = this;
         }
 
+        #region Usercontrol loaded unload initialize
         private void MainWindow_Loaded(object sender, RoutedEventArgs e)
         {
             BotaSideTool.AddBOTAContent(BOTATools.Thumbnail | BOTATools.Outline | BOTATools.Bookmark | BOTATools.Search);
             fromPropertyControl = new FromPropertyControl();
             LoadDefaultDocument();
         }
+        #endregion
 
+        #region Open and close document
         private void LoadDocument()
         {
             pdfViewControl.PDFView?.Load();
@@ -131,12 +137,22 @@ namespace Forms
             BotaSideTool.InitWithPDFViewer(pdfViewControl.PDFView);
             BotaSideTool.SelectBotaTool(BOTATools.Thumbnail);
         }
+        private void LoadDefaultDocument()
+        {
+            string defaultFilePath = "Form_Widgets_Test.pdf";
+            pdfViewControl = new PDFViewControl();
+            pdfViewControl.PDFView.InitDocument(defaultFilePath);
+            LoadDocument();
+        }
+        #endregion
+
 
         private void UndoManager_PropertyChanged(object sender, PropertyChangedEventArgs e)
         {
             OnPropertyChanged(e.PropertyName);
         }
 
+        #region Context menu
         private void PDFView_AnnotCommandHandler(object sender, AnnotCommandArgs e)
         {
             if (e != null && e.CommandType == CommandType.Context)
@@ -290,6 +306,9 @@ namespace Forms
             }
         }
 
+        #endregion
+
+        #region Password
         private void PasswordUI_Confirmed(object sender, string e)
         {
             if (passwordViewer != null && passwordViewer.PDFView != null && passwordViewer.PDFView.Document != null)
@@ -322,6 +341,8 @@ namespace Forms
             PopupBorder.Visibility = Visibility.Collapsed;
             PasswordUI.Visibility = Visibility.Collapsed;
         }
+        #endregion
+
 
         private void PdfViewer_InfoChanged(object sender, KeyValuePair<string, object> e)
         {
@@ -361,24 +382,7 @@ namespace Forms
             return standardZoom / 100;
         }
 
-        private void LoadDefaultDocument()
-        {
-            string defaultFilePath = "Form_Widgets_Test.pdf";
-            pdfViewControl = new PDFViewControl();
-            pdfViewControl.PDFView.InitDocument(defaultFilePath);
-            LoadDocument();
-        }
-
 
-        /// <summary>
-        /// 展开Bota工具
-        /// </summary>
-        /// <param name="isExpand"></param>
-        private void ExpandBotaTool(bool isExpand)
-        {
-            BotaSideTool.Visibility = isExpand ? Visibility.Visible : Visibility.Collapsed;
-            Splitter.Visibility = isExpand ? Visibility.Visible : Visibility.Collapsed;
-        }
 
         private void ToolExpand_Click(object sender, RoutedEventArgs e)
         {
@@ -460,25 +464,6 @@ namespace Forms
             }
         }
 
-
-        private void ZoomInBtn_Click(object sender, RoutedEventArgs e)
-        {
-            if (pdfViewControl != null)
-            {
-                double newZoom = CheckZoomLevel(pdfViewControl.PDFView.ZoomFactor + 0.01, true);
-                pdfViewControl.PDFView.Zoom(newZoom);
-            }
-        }
-
-        private void ZoomOutBtn_Click(object sender, RoutedEventArgs e)
-        {
-            if (pdfViewControl != null)
-            {
-                double newZoom = CheckZoomLevel(pdfViewControl.PDFView.ZoomFactor - 0.01, false);
-                pdfViewControl.PDFView.Zoom(newZoom);
-            }
-        }
-
         private void NextPageBorder_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
         {
             pdfViewControl.PDFView?.GoToPage(pdfViewControl.PDFView.CurrentIndex + 1);
@@ -496,6 +481,7 @@ namespace Forms
             FileInfoControl.InitWithPDFViewer(pdfViewControl.PDFView);
             PopupBorder.Visibility = Visibility.Visible;
         }
+
         public void ExpandRightPropertyPanel(UIElement properytPanel, Visibility visible)
         {
             PropertyContainer.Child = properytPanel;
@@ -547,7 +533,6 @@ namespace Forms
             }
             catch (Exception ex)
             {
-
             }
         }
 
@@ -623,12 +608,14 @@ namespace Forms
             }
         }
 
+        #region Selection changed]
         private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
         {
             SetFromMode();
         }
+
         private void SetFromMode()
-        {                                    
+        {
             if (LoadPDFFormTool)
             {
                 PDFFormTool.ClearAllToolState();
@@ -671,6 +658,8 @@ namespace Forms
             }
         }
 
+        #endregion 
+
         public void InitialPDFViewControl(PDFViewControl newPDFViewer)
         {
             PDFFormTool.InitWithPDFViewer(newPDFViewer.PDFView, fromPropertyControl);
@@ -795,7 +784,6 @@ namespace Forms
         private void PDFFormTool_Unloaded(object sender, RoutedEventArgs e)
         {
             LoadPDFFormTool = false;
-
         }
 
         private void SaveFile()

+ 0 - 2
Demo/Examples/Viewer/MainWindow.xaml.cs

@@ -294,7 +294,6 @@ namespace Viewer
                 }
                 catch (Exception ex)
                 {
-                    Console.WriteLine(ex.ToString());
                 }
             }
         }
@@ -339,7 +338,6 @@ namespace Viewer
             }
             catch (Exception ex)
             { 
-                Console.WriteLine(ex.ToString());
             } 
         }
 

BIN=BIN
Demo/Examples/packages/ComPDFKit.NetFramework.1.9.0/build/x64/ComPDFKit.dll


BIN=BIN
Demo/Examples/packages/ComPDFKit.NetFramework.1.9.0/build/x86/ComPDFKit.dll