Quellcode durchsuchen

其他-同步PDFViewer部分的重命名

zhuyi vor 11 Monaten
Ursprung
Commit
63c889d252

+ 2 - 2
Demo/Examples/Compdfkit_Tools/Common/BaseControl/PageNumberControl.xaml.cs

@@ -54,7 +54,7 @@ namespace Compdfkit_Tools.Common
         private void NextPageBorder_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
         {
             SetPageRangeVisible();
-            if (pdfView.GetCPDFViewer().GetViewMode() == ComPDFKitViewer.ViewModes.Single || pdfView.GetCPDFViewer().GetViewMode() == ComPDFKitViewer.ViewModes.SingleContinuous)
+            if (pdfView.GetCPDFViewer().GetViewMode() == ComPDFKitViewer.ViewMode.Single || pdfView.GetCPDFViewer().GetViewMode() == ComPDFKitViewer.ViewMode.SingleContinuous)
             {
                 pdfView.GetCPDFViewer().GoToPage(pdfView.GetCPDFViewer().CurrentRenderFrame.PageIndex + 1,new Point(0,0));
             }
@@ -67,7 +67,7 @@ namespace Compdfkit_Tools.Common
         private void PrevPageBorder_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
         {
             SetPageRangeVisible();
-            if (pdfView.GetCPDFViewer().GetViewMode() == ComPDFKitViewer.ViewModes.Single || pdfView.GetCPDFViewer().GetViewMode() == ComPDFKitViewer.ViewModes.SingleContinuous)
+            if (pdfView.GetCPDFViewer().GetViewMode() == ComPDFKitViewer.ViewMode.Single || pdfView.GetCPDFViewer().GetViewMode() == ComPDFKitViewer.ViewMode.SingleContinuous)
             {
                 pdfView.GetCPDFViewer().GoToPage(pdfView.GetCPDFViewer().CurrentRenderFrame.PageIndex - 1, new Point(0, 0));
             }

+ 1 - 1
Demo/Examples/Compdfkit_Tools/PDFView/PDFDisplaySettings/PDFDisplaySettingsControl/CPDFDisplaySettingsControl.xaml.cs

@@ -51,7 +51,7 @@ namespace Compdfkit_Tools.PDFControl
         //    ViewControl?.SetSplitMode(e);
         //}
 
-        private void ViewModeUI_ViewModeChanged(object sender, ViewModes e)
+        private void ViewModeUI_ViewModeChanged(object sender, ViewMode e)
         {
             if (ViewControl != null && ViewControl.PDFViewTool != null)
             {

+ 6 - 6
Demo/Examples/Compdfkit_Tools/PDFView/PDFDisplaySettings/PDFDisplaySettingsControl/CPDFDrawModeControl.xaml.cs

@@ -9,7 +9,7 @@ namespace Compdfkit_Tools.PDFControl
     {
         public PDFViewControl ViewControl;
 
-        public Dictionary<string, DrawModes> GetDrawMode = new Dictionary<string, DrawModes>();
+        public Dictionary<string, DrawMode> GetDrawMode = new Dictionary<string, DrawMode>();
 
         public CPDFDrawModeControl()
         {
@@ -20,11 +20,11 @@ namespace Compdfkit_Tools.PDFControl
         private void CPDFDrawModeUI_Loaded(object sender, RoutedEventArgs e)
         {
             GetDrawMode.Clear();
-            GetDrawMode.Add("Normal", DrawModes.Normal);
-            GetDrawMode.Add("Soft", DrawModes.Soft);
-            GetDrawMode.Add("Dark", DrawModes.Dark);
-            GetDrawMode.Add("Green", DrawModes.Green);
-            GetDrawMode.Add("Custom", DrawModes.Custom);
+            GetDrawMode.Add("Normal", DrawMode.Normal);
+            GetDrawMode.Add("Soft", DrawMode.Soft);
+            GetDrawMode.Add("Dark", DrawMode.Dark);
+            GetDrawMode.Add("Green", DrawMode.Green);
+            GetDrawMode.Add("Custom", DrawMode.Custom);
             CPDFDrawModeUI.SetDrawModeEvent -= CPDFDrawModeUI_SetDrawModeEvent;
             CPDFDrawModeUI.SetDrawModeEvent += CPDFDrawModeUI_SetDrawModeEvent;
         }

+ 7 - 7
Demo/Examples/Compdfkit_Tools/PDFView/PDFDisplaySettings/PDFDisplaySettingsControl/CPDFViewModeControl.xaml.cs

@@ -16,7 +16,7 @@ namespace Compdfkit_Tools.PDFControl
         public string CurrentContinuousMode = "Continuous";
         public string CurrentViewMode = "Single";
 
-        public Dictionary<Tuple<string, string>, ViewModes> GetViewMode = new Dictionary<Tuple<string, string>, ViewModes>();
+        public Dictionary<Tuple<string, string>, ViewMode> GetViewMode = new Dictionary<Tuple<string, string>, ViewMode>();
         
         public CPDFViewModeControl()
         {
@@ -39,12 +39,12 @@ namespace Compdfkit_Tools.PDFControl
         private void CPDFViewModeUI_Loaded(object sender, RoutedEventArgs e)
         {
             GetViewMode.Clear();
-            GetViewMode.Add(Tuple.Create("Continuous", "Single"), ViewModes.SingleContinuous);
-            GetViewMode.Add(Tuple.Create("Continuous", "Double"), ViewModes.DoubleContinuous);
-            GetViewMode.Add(Tuple.Create("Continuous", "Book"), ViewModes.BookContinuous);
-            GetViewMode.Add(Tuple.Create("Discontinuous", "Single"), ViewModes.Single);
-            GetViewMode.Add(Tuple.Create("Discontinuous", "Double"), ViewModes.Double);
-            GetViewMode.Add(Tuple.Create("Discontinuous", "Book"), ViewModes.Book);
+            GetViewMode.Add(Tuple.Create("Continuous", "Single"), ViewMode.SingleContinuous);
+            GetViewMode.Add(Tuple.Create("Continuous", "Double"), ViewMode.DoubleContinuous);
+            GetViewMode.Add(Tuple.Create("Continuous", "Book"), ViewMode.BookContinuous);
+            GetViewMode.Add(Tuple.Create("Discontinuous", "Single"), ViewMode.Single);
+            GetViewMode.Add(Tuple.Create("Discontinuous", "Double"), ViewMode.Double);
+            GetViewMode.Add(Tuple.Create("Discontinuous", "Book"), ViewMode.Book);
         }
 
         private void CPDFViewModeUI_SplitModeChanged(object sender, SplitMode e)

+ 7 - 7
Demo/Examples/Compdfkit_Tools/PDFView/PDFDisplaySettings/PDFDisplaySettingsUI/CPDFDrawModeUI.xaml.cs

@@ -26,7 +26,7 @@ namespace Compdfkit_Tools.PDFControlUI
         {
             DrawModeChanged?.Invoke(sender, new DrawModeData()
             {
-                DrawMode = DrawModes.Normal
+                DrawMode = DrawMode.Normal
             }) ;
         }
 
@@ -34,7 +34,7 @@ namespace Compdfkit_Tools.PDFControlUI
         {
             DrawModeChanged?.Invoke(sender, new DrawModeData()
             {
-                DrawMode = DrawModes.Soft
+                DrawMode = DrawMode.Soft
             });
         }
 
@@ -42,7 +42,7 @@ namespace Compdfkit_Tools.PDFControlUI
         {
             DrawModeChanged?.Invoke(sender, new DrawModeData()
             {
-                DrawMode = DrawModes.Dark
+                DrawMode = DrawMode.Dark
             });
         }
 
@@ -50,7 +50,7 @@ namespace Compdfkit_Tools.PDFControlUI
         {
             DrawModeChanged?.Invoke(sender, new DrawModeData()
             {
-                DrawMode = DrawModes.Green
+                DrawMode = DrawMode.Green
             });
         }
 
@@ -58,7 +58,7 @@ namespace Compdfkit_Tools.PDFControlUI
         {
             DrawModeChanged?.Invoke(sender, new DrawModeData()
             {
-                DrawMode = DrawModes.Custom,
+                DrawMode = DrawMode.Custom,
                 CustomColor= 0xFFFFE390
             });
         }
@@ -67,7 +67,7 @@ namespace Compdfkit_Tools.PDFControlUI
         {
             DrawModeChanged?.Invoke(sender, new DrawModeData()
             {
-                DrawMode = DrawModes.Custom,
+                DrawMode = DrawMode.Custom,
                 CustomColor= 0xFFC1E6FF
             });
         }
@@ -75,7 +75,7 @@ namespace Compdfkit_Tools.PDFControlUI
 
     public class DrawModeData
     {
-        public DrawModes DrawMode { get; set; }
+        public DrawMode DrawMode { get; set; }
         public uint CustomColor { get; set; }
     }
 }

+ 14 - 14
Demo/Examples/Compdfkit_Tools/PDFView/PDFDisplaySettings/PDFDisplaySettingsUI/CPDFViewModeUI.xaml.cs

@@ -16,7 +16,7 @@ namespace Compdfkit_Tools.PDFControlUI
 
         public event EventHandler<SplitMode> SplitModeChanged;
 
-        public event EventHandler<ViewModes> ViewModeChanged;
+        public event EventHandler<ViewMode> ViewModeChanged;
 
         public event EventHandler<bool> CropModeChanged;
 
@@ -89,7 +89,7 @@ namespace Compdfkit_Tools.PDFControlUI
             ClearViewState();
             BookViewBtn.IsChecked = true;
             BookViewPath.Fill = ActivePathBrush;
-            ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked==true? ViewModes.BookContinuous: ViewModes.Book);
+            ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked==true? ViewMode.BookContinuous: ViewMode.Book);
         }
 
         private void DoubleViewBtn_Click(object sender, RoutedEventArgs e)
@@ -97,7 +97,7 @@ namespace Compdfkit_Tools.PDFControlUI
             ClearViewState();
             DoubleViewBtn.IsChecked = true;
             DoubleViewPath.Fill = ActivePathBrush;
-            ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewModes.DoubleContinuous: ViewModes.Double);
+            ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewMode.DoubleContinuous: ViewMode.Double);
         }
 
         private void SingleViewBtn_Click(object sender, RoutedEventArgs e)
@@ -105,7 +105,7 @@ namespace Compdfkit_Tools.PDFControlUI
             ClearViewState();
             SingleViewBtn.IsChecked = true;
             SingleViewPath.Fill = ActivePathBrush;
-            ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewModes.SingleContinuous: ViewModes.Single);
+            ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewMode.SingleContinuous: ViewMode.Single);
         }
 
         private void CropModeBtn_Click(object sender, RoutedEventArgs e)
@@ -117,19 +117,19 @@ namespace Compdfkit_Tools.PDFControlUI
         {
             if(SingleViewBtn.IsChecked==true)
             {
-                ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewModes.SingleContinuous : ViewModes.Single);
+                ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewMode.SingleContinuous : ViewMode.Single);
                 return;
             }
 
             if (DoubleViewBtn.IsChecked == true)
             {
-                ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewModes.DoubleContinuous : ViewModes.Double);
+                ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewMode.DoubleContinuous : ViewMode.Double);
                 return;
             }
 
             if(BookViewBtn.IsChecked == true)
             {
-                ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewModes.BookContinuous : ViewModes.Book);
+                ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewMode.BookContinuous : ViewMode.Book);
             }
         }
 
@@ -167,38 +167,38 @@ namespace Compdfkit_Tools.PDFControlUI
             }
         }
 
-        public void SetViewModeUI(ViewModes mode)
+        public void SetViewModeUI(ViewMode mode)
         {
             ClearViewState();
 
             switch (mode)
             {
-                case ViewModes.Book:
+                case ViewMode.Book:
                     BookViewBtn.IsChecked = true;
                     BookViewPath.Fill = ActivePathBrush;
                     ContinuePageBtn.IsChecked = false;
                     break;
-                case ViewModes.BookContinuous:
+                case ViewMode.BookContinuous:
                     BookViewBtn.IsChecked = true;
                     BookViewPath.Fill = ActivePathBrush;
                     ContinuePageBtn.IsChecked = true;
                     break;
-                case ViewModes.Single:
+                case ViewMode.Single:
                     SingleViewBtn.IsChecked = true;
                     SingleViewPath.Fill = ActivePathBrush;
                     ContinuePageBtn.IsChecked = false;
                     break;
-                case ViewModes.SingleContinuous:
+                case ViewMode.SingleContinuous:
                     SingleViewBtn.IsChecked = true;
                     SingleViewPath.Fill = ActivePathBrush;
                     ContinuePageBtn.IsChecked = true;
                     break;
-                case ViewModes.Double:
+                case ViewMode.Double:
                     DoubleViewBtn.IsChecked = true;
                     DoubleViewPath.Fill = ActivePathBrush;
                     ContinuePageBtn.IsChecked = false;
                     break;
-                case ViewModes.DoubleContinuous:
+                case ViewMode.DoubleContinuous:
                     DoubleViewBtn.IsChecked = true;
                     DoubleViewPath.Fill = ActivePathBrush;
                     ContinuePageBtn.IsChecked = true;

+ 3 - 3
Demo/Examples/Compdfkit_Tools/PDFView/PDFScaling/PDFScalingControl/CPDFScalingControl.xaml.cs

@@ -157,15 +157,15 @@ namespace Compdfkit_Tools.PDFControl
             }
             if (e == LanguageHelper.CommonManager.GetString("Zoom_Real"))
             {
-                pdfViewer.SetFitMode(FitModes.FitOriginal);
+                pdfViewer.SetFitMode(FitMode.FitOriginal);
             }
             else if (e == LanguageHelper.CommonManager.GetString("Zoom_FitWidth"))
             {
-                pdfViewer.SetFitMode(FitModes.FitWidth);
+                pdfViewer.SetFitMode(FitMode.FitWidth);
             }
             else if (e == LanguageHelper.CommonManager.GetString("Zoom_FitPage"))
             {
-                pdfViewer.SetFitMode(FitModes.FitHeight);
+                pdfViewer.SetFitMode(FitMode.FitHeight);
             }
             else
             {

+ 7 - 7
Demo/Examples/Compdfkit_Tools/PDFView/PDFViewControl/PDFViewControl.xaml.cs

@@ -181,13 +181,13 @@ namespace Compdfkit_Tools.PDFControl
             {
                 PDFViewTool.GetCPDFViewer().InitDoc(pdfDoc);
 
-                PDFViewTool.GetCPDFViewer().SetFitMode(FitModes.FitHeight);
-                PDFViewTool.GetCPDFViewer().SetViewMode(ViewModes.SingleContinuous);
+                PDFViewTool.GetCPDFViewer().SetFitMode(FitMode.FitHeight);
+                PDFViewTool.GetCPDFViewer().SetViewMode(ViewMode.SingleContinuous);
 
                 splitViewerTool.GetCPDFViewer().InitDoc(pdfDoc);
 
-                splitViewerTool.GetCPDFViewer().SetFitMode(FitModes.FitHeight);
-                splitViewerTool.GetCPDFViewer().SetViewMode(ViewModes.SingleContinuous);
+                splitViewerTool.GetCPDFViewer().SetFitMode(FitMode.FitHeight);
+                splitViewerTool.GetCPDFViewer().SetViewMode(ViewMode.SingleContinuous);
             }
         }
 
@@ -198,7 +198,7 @@ namespace Compdfkit_Tools.PDFControl
             if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
             {
                 e.IsZoom = true;
-                PDFViewTool.GetCPDFViewer().SetFitMode(FitModes.FitZoom);
+                PDFViewTool.GetCPDFViewer().SetFitMode(FitMode.FitZoom);
                 double zoom = PDFViewTool.GetCPDFViewer().GetZoom();
                 PDFViewTool.GetCPDFViewer().SetZoom(CheckZoomLevel(zoom, Convert.ToBoolean(e.WheelBehavior)));
                 PDFViewTool?.GetCPDFViewer()?.UpDateRenderFrame();
@@ -213,7 +213,7 @@ namespace Compdfkit_Tools.PDFControl
             if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
             {
                 e.IsZoom = true;
-                splitViewerTool.GetCPDFViewer().SetFitMode(FitModes.FitZoom);
+                splitViewerTool.GetCPDFViewer().SetFitMode(FitMode.FitZoom);
                 double zoom = splitViewerTool.GetCPDFViewer().GetZoom();
                 splitViewerTool.GetCPDFViewer().SetZoom(CheckZoomLevel(zoom, Convert.ToBoolean(e.WheelBehavior)));
                 splitViewerTool?.GetCPDFViewer()?.UpDateRenderFrame();
@@ -316,7 +316,7 @@ namespace Compdfkit_Tools.PDFControl
         {
             viewerTool?.GetCPDFViewer()?.SetDrawModes(drawMode.DrawMode);
             splitViewerTool?.GetCPDFViewer()?.SetDrawModes(drawMode.DrawMode);
-            if (drawMode.DrawMode == DrawModes.Custom)
+            if (drawMode.DrawMode == DrawMode.Custom)
             {
                 viewerTool?.GetCPDFViewer().SetPDFBackground(drawMode.CustomColor);
                 splitViewerTool?.GetCPDFViewer().SetPDFBackground(drawMode.CustomColor);