Browse Source

页面编辑、打印-多页bug修复

liuaoran 2 years ago
parent
commit
dd63e35b94

+ 0 - 1
PDF Office/Themes/Alias_Light.xaml

@@ -239,5 +239,4 @@
         Opacity=" 0.4"
         ShadowDepth="0"
         Color="#F3465B" />
-
 </ResourceDictionary>

+ 2 - 3
PDF Office/Themes/Generic.xaml

@@ -1,8 +1,7 @@
 <ResourceDictionary
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-    xmlns:cus="clr-namespace:PDF_Master.CustomControl"
-    xmlns:local="clr-namespace:PDF_Master">
+    xmlns:cus="clr-namespace:PDF_Master.CustomControl">
 
     <!--  style for customControl  -->
     <Style TargetType="{x:Type cus:DialogContent}">
@@ -305,4 +304,4 @@
             </Setter.Value>
         </Setter>
     </Style>
-</ResourceDictionary>
+</ResourceDictionary>

+ 0 - 1
PDF Office/Themes/Global.xaml

@@ -344,5 +344,4 @@
         <Setter Property="FontWeight" Value="Semibold" />
         <Setter Property="FontSize" Value="20" />
     </Style>
-
 </ResourceDictionary>

+ 5 - 5
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDialogViewModel.cs

@@ -1036,7 +1036,7 @@ namespace PDF_Master.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                 string appUnicode = string.Empty;
                 if (parameters.TryGetValue<string>(ParameterNames.Unicode, out appUnicode))
                 {
-                    this.printEvent.GetEvent<ShowTipEvent>().Publish(new ShowTipEventArgs() { enumTipKind = EnumTipKind.StatusNone , Unicode= appUnicode });
+                    this.printEvent.GetEvent<ShowTipEvent>().Publish(new ShowTipEventArgs() { enumTipKind = EnumTipKind.StatusNone, Unicode = appUnicode });
                 }
             }
 
@@ -1048,6 +1048,7 @@ namespace PDF_Master.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                 }));
             }
 
+            int currentPage = -1;
             if (PDFViewer != null && PDFViewer.Document != null && result.IsDiscryptied)
             {
                 for (int temp = 0; temp < PDFViewer.Document.PageCount; temp++)
@@ -1088,10 +1089,7 @@ namespace PDF_Master.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                         }
                     }
                 }
-
-
-                int currentPage = -1;
-                if (parameters.TryGetValue<int>(ParameterNames.PrintCurrentPage, out currentPage))
+                else if (parameters.TryGetValue<int>(ParameterNames.PrintCurrentPage, out currentPage))
                 {
                     System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
                     {
@@ -1099,6 +1097,8 @@ namespace PDF_Master.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                     }));
                 }
 
+
+
                 System.Windows.Size pageSize = PDFViewer.Document.GetPageSize(0);
 
                 if ((pageSize.Height / pageSize.Width > 1.0 && (double)PrintSettingsInfo.PrintDocument.DefaultPageSettings.PaperSize.Height / PrintSettingsInfo.PrintDocument.DefaultPageSettings.PaperSize.Width < 1.0)

+ 1 - 2
PDF Office/ViewModels/Dialog/ToolsDialogs/MergeDialogViewModel.cs

@@ -509,8 +509,7 @@ namespace PDF_Master.ViewModels.Dialog.ToolsDialogs
                             continue;
                         }
                     }
-               
-              
+                
                 mergeObject.DocName = doc.FileName;
                 mergeObject.DocPageCount = doc.PageCount.ToString() + " " + App.MainPageLoader.GetString("Merge_ItemPages");
                 mergeObject.SDKPageCount = doc.PageCount;