liyijie 2 jaren geleden
bovenliggende
commit
53af9c9a73

+ 6 - 5
PDF Office/App.xaml.cs

@@ -26,10 +26,10 @@ using PDFSettings.Settings;
 using PDF_Office.Views.Tools; 
 using PDF_Office.Views.Dialog.ToolsDialogs.SaftyDialogs;
 using PDF_Office.Views.Dialog.ToolsDialogs.CompressDialogs;
-using PDF_Office.ViewModels.Dialog.ToolsDialogs.SaftyDialogs;
 using PDF_Office.Views.Dialog.PageEditDialogs;
-using PDF_Office.Views.Dialog.MainPageTools;
-
+using PDF_Office.Views.Dialog.MainPageToolsDialogs ;
+using PDF_Office.ViewModels.Dialog.MainPageToolsDialogs;
+
 namespace PDF_Office
 {
     /// <summary>
@@ -115,6 +115,7 @@ namespace PDF_Office
             containerRegistry.RegisterDialog<MainPageExtractDialog>(DialogNames.MainPageExtractDialog);
             containerRegistry.RegisterDialog<MainPageInsertDialog>(DialogNames.MainPageInsertDialog);
             containerRegistry.RegisterDialog<MainPageSplitDialog>(DialogNames.MainPageSplitDialog);
+            containerRegistry.RegisterDialog<MainPagePrinterDialog>(DialogNames.MainPagePrinterDialog);
 
         }
 
@@ -142,8 +143,8 @@ namespace PDF_Office
             string devKey = "";
             string devSecret = "";
 #if DEBUG
-            devKey = " ehrnKqkWc1XSEAWyPUt6+95GzCoLEyoKrCbsUuJkCqGmxmP5ozX4bS0R6crHItQVNTFvC5mBZ1M7QjJ6Ekdu4Daj7PM+EDLTBKbFJinK4Ri9E5E2X+a9vF5zSj0TkIscQPVnwj9ikxAFOWGIyybMwQQzwc8a4j1cGOqGXQRDMMY=";
-            devSecret = "mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4gQurxTxGuBlGAhs0P1mD3X3bHT+AHfcLiymaqE4DY7kTFHoPs9I3tl5ErS+BHdzHRhrp9sGpqfp0B228KI+IMTu4aGVjtYuk+Uxs/kosIBw1367/WkJ00tM7U7tttD6ccHhEu996bvBgqf8Sw8OekQKQq13VBewK5AckaDux4W7SGRhCUNWC4MItkr36JnXMD2tiFQYzMG8C66HYmRGSLh";
+            devKey = "sTHSivIW4YnZQavIYDLVw4vaFcN5DQTUtRGrVyv5p9aeaHX3GirG/MBxl6Wy9TJbNOwR4CU6LPjHmGe3Po3OtBCPqIRheam9+LomScw3AvoUTHFlG1134e2J4enF43WJQ6PyOnjwZqsG1kUdlBPNztkoPzDAE2pQKgZWf6V2i34=";
+            devSecret = "mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4gQurxTxGuBlGAhs0P1mD3X3bHT+AHfcLiymaqE4DY7kTFHoPs9I3tl5ErS+BHdzHRhrp9sGpqfp0B228KI+IMTu4aGVjtYuk+Uxs/kosIBw1367/WkJ00tM7U7tttD6cfaiHpW8pgW2aur3AxuQIBBLuJD5gcmNxTYW3KA32JLG8alfyXjKFVS3gka9bngvwfZ7GuNXybjKlmz1tnN6iVHpnbSj+xOHhWEperY4HHrSg==";
 #endif
 
             string userKey = "iBPRM/Tz8b6Z1G2GQt52X7hiNCGfVYXztnPjalgrgARvqfKV6lFNH8QeScTzBRYI8GGFpwelfgh790Kd9JmL7V4adI1jCiFHUT2DLT7QucxY5Nkgys2aJItQS482Ck2G2Xf8gNgojxYxRt65o/MEzkj93foj8qIdfHagXsSorSs=";

+ 2 - 2
PDF Office/CustomControl/NumericUpDown.xaml

@@ -11,13 +11,13 @@
             <ColumnDefinition Width="4*"/>
             <ColumnDefinition Width="1*"/>
         </Grid.ColumnDefinitions>
-        <TextBox Name="TextBox_Num" Grid.Column="0" Text="1" FontSize="20" TextAlignment="Center" MinWidth="80" Height="40" VerticalContentAlignment="Center" />
+        <TextBox Name="TextBox_Num" Grid.Column="0" Text="1" FontSize="20" TextAlignment="Center" MinWidth="80" MinHeight="20" VerticalContentAlignment="Center" />
         <Grid Grid.Column="1">
             <Grid.RowDefinitions>
                 <RowDefinition/>
                 <RowDefinition/>
             </Grid.RowDefinitions>
-            <Button Name="Button_Add" Grid.Row="0"   Click="Button_Add_Click" Background="White">
+            <Button Name="Button_Add" Grid.Row="0" Click="Button_Add_Click" Background="White">
                 <Path  VerticalAlignment="Center" HorizontalAlignment="Center" Stroke="Black"  Data="M0 8L4 1 L8 8" Height="10" Stretch="Fill" Visibility="{Binding CompressLargeStyle}"/>
             </Button>
             <Button Name="Button_Sub" Grid.Row="1"   Click="Button_Sub_Click" Background="White">

+ 6 - 0
PDF Office/Model/DialogNames.cs

@@ -74,5 +74,11 @@ namespace PDF_Office.Model
         ///主页工具-拆分弹窗
         /// </summary>
         public static string MainPageSplitDialog = "MainPageSplitDialog";
+
+        ///<summary>
+        ///主页工具-打印弹窗
+        /// </summary>
+        public static string MainPagePrinterDialog = "MainPagePrinterDialog";
+        
     }
 }

File diff suppressed because it is too large
+ 673 - 680
PDF Office/PDF Office.csproj


+ 3 - 3
PDF Office/ViewModels/Dialog/Printer/PrinterDialogViewModel.cs

@@ -5,11 +5,11 @@ using System;
 using System.Collections.Generic;
 using System.Linq;
 
-namespace PDF_Office.ViewModels.Dialog.Printer
+namespace PDF_Office.ViewModels.Dialog.MainPageToolsDialogs
 {
-    public class PrinterDialogViewModel : BindableBase,IDialogAware
+    public class MainPagePrinterDialogViewModel : BindableBase,IDialogAware
     {
-        public PrinterDialogViewModel()
+        public MainPagePrinterDialogViewModel()
         {
 
         }

+ 16 - 3
PDF Office/ViewModels/HomePanel/HomeGuidContentViewModel.cs

@@ -1,7 +1,10 @@
-using PDF_Office.Model.PDFTool;
+using ComPDFKitViewer.PdfViewer;
+using PDF_Office.Model;
+using PDF_Office.Model.PDFTool;
 using PDF_Office.Views.HomePanel.PDFTools;
 using Prism.Commands;
 using Prism.Mvvm;
+using Prism.Services.Dialogs;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -12,10 +15,12 @@ namespace PDF_Office.ViewModels.HomePanel
 {
     public class HomeGuidContentViewModel:BindableBase
     {
+        public IDialogService dialogs;
         public DelegateCommand<ToolItem> QuickToolsCommand { get; set; }
-        public HomeGuidContentViewModel()
+        public HomeGuidContentViewModel(IDialogService dialogService)
         {
-            QuickToolsCommand = new DelegateCommand<ToolItem>(QuickTools_Click);
+            QuickToolsCommand = new DelegateCommand<ToolItem>(QuickTools_Click);
+            dialogs = dialogService;
         }
 
         public void QuickTools_Click(ToolItem toolItem)
@@ -24,12 +29,18 @@ namespace PDF_Office.ViewModels.HomePanel
             {
                 case PDFToolType.Split:
                     Split_Click();
+                    DialogParameters splitvalue = new DialogParameters();
+                    dialogs.ShowDialog(DialogNames.MainPageSplitDialog, splitvalue, e => { });
                     break;
 
                 case PDFToolType.Extract:
+                    DialogParameters extractvalue = new DialogParameters();
+                    dialogs.ShowDialog(DialogNames.MainPageExtractDialog, extractvalue, e => { });
                     break;
 
                 case PDFToolType.Insert:
+                    DialogParameters insertvalue = new DialogParameters();
+                    dialogs.ShowDialog(DialogNames.MainPageInsertDialog, insertvalue, e => { });
                     break;
 
                 case PDFToolType.Compress:
@@ -39,6 +50,8 @@ namespace PDF_Office.ViewModels.HomePanel
                     break;
 
                 case PDFToolType.Print:
+                    DialogParameters printvalue = new DialogParameters();
+                    dialogs.ShowDialog(DialogNames.MainPagePrinterDialog, printvalue, e => { });
                     break;
 
                 case PDFToolType.Security:

+ 1 - 1
PDF Office/Views/Dialog/MainPageToolsDialogs/MainPageExtractDialog.xaml

@@ -1,4 +1,4 @@
-<UserControl x:Class="PDF_Office.Views.Dialog.MainPageTools.MainPageExtractDialog"
+<UserControl x:Class="PDF_Office.Views.Dialog.MainPageToolsDialogs.MainPageExtractDialog"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

+ 1 - 1
PDF Office/Views/Dialog/MainPageToolsDialogs/MainPageExtractDialog.xaml.cs

@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
 
-namespace PDF_Office.Views.Dialog.MainPageTools
+namespace PDF_Office.Views.Dialog.MainPageToolsDialogs
 {
     /// <summary>
     /// MainPageExtractDialog.xaml 的交互逻辑

+ 1 - 1
PDF Office/Views/Dialog/MainPageToolsDialogs/MainPageInsertDialog.xaml

@@ -1,4 +1,4 @@
-<UserControl x:Class="PDF_Office.Views.Dialog.MainPageTools.MainPageInsertDialog"
+<UserControl x:Class="PDF_Office.Views.Dialog.MainPageToolsDialogs.MainPageInsertDialog"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

+ 1 - 1
PDF Office/Views/Dialog/MainPageToolsDialogs/MainPageInsertDialog.xaml.cs

@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
 
-namespace PDF_Office.Views.Dialog.MainPageTools
+namespace PDF_Office.Views.Dialog.MainPageToolsDialogs
 {
     /// <summary>
     /// MainPageInsertDialog.xaml 的交互逻辑

+ 1 - 1
PDF Office/Views/Dialog/Printer/PrinterDialog.xaml

@@ -1,4 +1,4 @@
-<UserControl x:Class="PDF_Office.Views.Dialog.Printer.PrinterDialog"
+<UserControl x:Class="PDF_Office.Views.Dialog.MainPageToolsDialogs.MainPagePrinterDialog"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

+ 3 - 3
PDF Office/Views/Dialog/Printer/PrinterDialog.xaml.cs

@@ -1,13 +1,13 @@
 using System.Windows.Controls;
 
-namespace PDF_Office.Views.Dialog.Printer
+namespace PDF_Office.Views.Dialog.MainPageToolsDialogs
 {
     /// <summary>
     /// Interaction logic for PrinterDialog
     /// </summary>
-    public partial class PrinterDialog : UserControl
+    public partial class MainPagePrinterDialog : UserControl
     {
-        public PrinterDialog()
+        public MainPagePrinterDialog()
         {
             InitializeComponent();
         }

+ 1 - 1
PDF Office/Views/Dialog/MainPageToolsDialogs/MainPageSplitDialog.xaml

@@ -1,4 +1,4 @@
-<UserControl x:Class="PDF_Office.Views.Dialog.MainPageTools.MainPageSplitDialog"
+<UserControl x:Class="PDF_Office.Views.Dialog.MainPageToolsDialogs.MainPageSplitDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

+ 1 - 1
PDF Office/Views/Dialog/MainPageToolsDialogs/MainPageSplitDialog.xaml.cs

@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
 
-namespace PDF_Office.Views.Dialog.MainPageTools
+namespace PDF_Office.Views.Dialog.MainPageToolsDialogs
 {
     /// <summary>
     /// MainPageSplitDialog.xaml 的交互逻辑