LiuAoran 2 년 전
부모
커밋
82e91191df
31개의 변경된 파일895개의 추가작업 그리고 39개의 파일을 삭제
  1. 6 3
      PDF Office/App.xaml.cs
  2. 4 0
      PDF Office/CustomControl/WritableComboBox.xaml
  3. 25 0
      PDF Office/CustomControl/WritableComboBox.xaml.cs
  4. 28 0
      PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageExtractDialogModel.cs
  5. 26 0
      PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageInsertDialogModel.cs
  6. 165 0
      PDF Office/Model/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDialogModel.cs
  7. 44 0
      PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageSplitDialogModel.cs
  8. 41 2
      PDF Office/PDF Office.csproj
  9. 172 0
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDialogViewModel.cs
  10. 30 0
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModBookletContentViewModel.cs
  11. 30 0
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModMutipleContentViewModel.cs
  12. 27 0
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModPosterContentViewModel.cs
  13. 29 0
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModSizeContentViewModel.cs
  14. 8 0
      PDF Office/ViewModels/HomePanel/HomeGuidContentViewModel.cs
  15. 0 1
      PDF Office/ViewModels/ViewContentViewModel.cs
  16. 13 23
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDialog.xaml
  17. 11 2
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDialog.xaml.cs
  18. 37 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModBookletContent.xaml
  19. 15 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModBookletContent.xaml.cs
  20. 34 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModMutipleContent.xaml
  21. 15 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModMutipleContent.xaml.cs
  22. 63 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModPosterContent.xaml
  23. 15 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModPosterContent.xaml.cs
  24. 35 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModSizeContent.xaml
  25. 15 0
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModSizeContent.xaml.cs
  26. 0 0
      PDF Office/Views/Dialog/ToolsDialogs/CompressDialogs/SplitDialog.xaml
  27. 0 0
      PDF Office/Views/Dialog/ToolsDialogs/CompressDialogs/SplitDialog.xaml.cs
  28. 1 1
      PDF Office/Views/HomePanel/HomeToolsContent.xaml
  29. 1 1
      PDF Office/Views/MainContent.xaml
  30. 5 4
      PDF Office/Views/MainWindow.xaml
  31. 0 2
      PDF Office/Views/Tools/ToolsBarContent.xaml

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

@@ -101,7 +101,10 @@ namespace PDF_Office
             containerRegistry.RegisterForNavigation<BOTAContent>();
             containerRegistry.RegisterForNavigation<PageEditContent>();
             containerRegistry.RegisterForNavigation<ToolsBarContent>();
-
+            containerRegistry.RegisterForNavigation<HomePagePrinterModSizeContent>();
+            containerRegistry.RegisterForNavigation<HomePagePrinterModPosterContent>();
+            containerRegistry.RegisterForNavigation<HomePagePrinterModMutipleContent>();
+            containerRegistry.RegisterForNavigation<HomePagePrinterModBookletContent>();
             //注册弹窗
             containerRegistry.RegisterDialog<VerifyPassWordDialog>(DialogNames.VerifyPassWordDialog);
             containerRegistry.RegisterDialog<FullScreenWindow>(DialogNames.FullScreenDialog);
@@ -145,8 +148,8 @@ namespace PDF_Office
             string devKey = "";
             string devSecret = "";
 #if DEBUG
-            devKey = "sTHSivIW4YnZQavIYDLVw4vaFcN5DQTUtRGrVyv5p9aeaHX3GirG/MBxl6Wy9TJbNOwR4CU6LPjHmGe3Po3OtBCPqIRheam9+LomScw3AvoUTHFlG1134e2J4enF43WJQ6PyOnjwZqsG1kUdlBPNztkoPzDAE2pQKgZWf6V2i34=";
-            devSecret = "mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4gQurxTxGuBlGAhs0P1mD3X3bHT+AHfcLiymaqE4DY7kTFHoPs9I3tl5ErS+BHdzHRhrp9sGpqfp0B228KI+IMTu4aGVjtYuk+Uxs/kosIBw1367/WkJ00tM7U7tttD6cfaiHpW8pgW2aur3AxuQIBBLuJD5gcmNxTYW3KA32JLG8alfyXjKFVS3gka9bngvwfZ7GuNXybjKlmz1tnN6iVHpnbSj+xOHhWEperY4HHrSg==";
+            devKey = "ehrnKqkWc1XSEAWyPUt6+95GzCoLEyoKrCbsUuJkCqGmxmP5ozX4bS0R6crHItQVNTFvC5mBZ1M7QjJ6Ekdu4Daj7PM+EDLTBKbFJinK4Ri9E5E2X+a9vF5zSj0TkIscQPVnwj9ikxAFOWGIyybMwQQzwc8a4j1cGOqGXQRDMMY=";
+            devSecret = "mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4gQurxTxGuBlGAhs0P1mD3X3bHT+AHfcLiymaqE4DY7kTFHoPs9I3tl5ErS+BHdzHRhrp9sGpqfp0B228KI+IMTu4aGVjtYuk+Uxs/kosIBw1367/WkJ00tM7U7tttD6ccHhEu996bvBgqf8Sw8OekQKQq13VBewK5AckaDux4W7SGRhCUNWC4MItkr36JnXMD2tiFQYzMG8C66HYmRGSLh";
 #endif
 
             string userKey = "iBPRM/Tz8b6Z1G2GQt52X7hiNCGfVYXztnPjalgrgARvqfKV6lFNH8QeScTzBRYI8GGFpwelfgh790Kd9JmL7V4adI1jCiFHUT2DLT7QucxY5Nkgys2aJItQS482Ck2G2Xf8gNgojxYxRt65o/MEzkj93foj8qIdfHagXsSorSs=";

+ 4 - 0
PDF Office/CustomControl/WritableComboBox.xaml

@@ -12,7 +12,11 @@
         <ComboBox x:Name="writableComboBox" Grid.Column="1"  Visibility="Visible" MinHeight="32"  MinWidth="58"
                                       SelectionChanged="writableComboBox_SelectionChanged" SelectedIndex="0">
             <ComboBoxItem Tag="0">全部页面</ComboBoxItem>
+<<<<<<< Updated upstream
             <ComboBoxItem Tag="0">奇数页</ComboBoxItem>
+=======
+            <ComboBoxItem Tag="1">奇数页</ComboBoxItem>
+>>>>>>> Stashed changes
             <ComboBoxItem Tag="1">偶数页</ComboBoxItem>
             <ComboBoxItem Tag="1">自定义页面</ComboBoxItem>
         </ComboBox>

+ 25 - 0
PDF Office/CustomControl/WritableComboBox.xaml.cs

@@ -32,6 +32,7 @@ namespace PDF_Office.CustomControl
                 this.writableTextBox.Width = this.writableComboBox.ActualWidth - 18;
                 Trace.WriteLine(this.writableComboBox.ActualWidth);
                 this.writableTextBox.Visibility = Visibility.Visible;
+<<<<<<< Updated upstream
                 
             }
             else
@@ -40,7 +41,18 @@ namespace PDF_Office.CustomControl
                 this.writableTextBox.Visibility = Visibility.Hidden;
                 }
            this.SelectedIndex=this.writableComboBox.SelectedIndex.ToString();
+=======
+
+            }
+            else
+            {
+                if (this.writableTextBox != null)
+                {
+                    this.writableTextBox.Visibility = Visibility.Collapsed;
+                }
+>>>>>>> Stashed changes
             }
+            this.SelectedIndex = this.writableComboBox.SelectedIndex.ToString();
         }
 
         public string SelectedIndex
@@ -61,6 +73,7 @@ namespace PDF_Office.CustomControl
 
         // Using a DependencyProperty as the backing store for MyProperty.  This enables animation, styling, binding, etc...
         public static readonly DependencyProperty TextProperty =
+<<<<<<< Updated upstream
             DependencyProperty.Register("Text", typeof(string), typeof(WritableComboBox), new PropertyMetadata(""));
 
         private void writableTextBox_TextChange(object sender, TextChangedEventArgs e)
@@ -71,5 +84,17 @@ namespace PDF_Office.CustomControl
             }
             else { Text = ""; }
         }
+=======
+            DependencyProperty.Register("Text", typeof(string), typeof(WritableComboBox), new PropertyMetadata(""));
+
+        private void writableTextBox_TextChange(object sender, TextChangedEventArgs e)
+        {
+            if (this.writableComboBox.SelectedIndex == this.writableComboBox.Items.Count - 1)
+            {
+                Text = this.writableTextBox.Text;
+            }
+            else { Text = ""; }
+        }
+>>>>>>> Stashed changes
     }
 }

+ 28 - 0
PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageExtractDialogModel.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.Model.Dialog.HomePageToolsDialogs
+{
+    internal class HomePageExtractDialogModel
+    {
+        /// <summary>
+        /// 页码 存入页码范围;
+        /// </summary>
+        public List<int> PageParm;
+        /// <summary>
+        /// 自定模式下 把文本内容传过去
+        /// </summary>
+        public string PageName = "";
+        /// <summary>
+        /// 是否拆分为单文件
+        /// </summary>
+        public bool ExtractToSingleFile;
+        /// <summary>
+        /// 提取后删除页面
+        /// </summary>
+        public bool DeleteAfterExtract;
+    }
+}

+ 26 - 0
PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageInsertDialogModel.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.Model.Dialog.HomePageToolsDialogs
+{
+    internal class HomePageInsertDialogModel
+    {
+        public class InsertEventClass : EventArgs
+        {
+            public InsertType Type;
+            public string filePath;
+            public string pageRange;
+            public int InsertIndex;
+            public string Password;
+        }
+
+        public enum InsertType
+        {
+            BlankPages,
+            FromOtherPdf
+        }
+    }
+}

+ 165 - 0
PDF Office/Model/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDialogModel.cs

@@ -0,0 +1,165 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Numerics;
+using System.Runtime.Remoting.Channels;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePagePrinter
+{
+    internal class HomePagePrinterDialogModel
+    {
+        public enum EnumPaperSize
+        {
+            StatusA3,
+            StatusA4,
+            StatusA5,
+            StatusB5,
+            StatusNo10Envelope,
+            StatusChoukei3Envelope,
+            StatusDLEnvelope,
+            StatusJISB5,
+            StatusROC16K,
+            StatusExtraLargeBA3,
+            StatusTabloid,
+            StatusExraLargeTabloid,
+            StatusAmericanLegal,
+            StatusAmericanLetter,
+            StatusCustomized
+        }
+        public enum EnumSizeType
+        {
+            StatusAdaptive,
+            StatusActural,
+            StatusCustomized,
+        }
+
+        public enum EnumPageRange
+        {
+            StatusAllRange,
+            StatusCurrentRange,
+            StatusOddRange,
+            StatusEvenRange,
+            StatusCustomizedRange
+        }
+
+        public enum EnumPrintOrientation
+        {
+            StatusHorizontal,
+            StatusVertical,
+        }
+
+        public enum EnumPrintContent
+        {
+            StatusOnlyDocument,
+            StatusDocumentAndMarkUps,
+            StatusDocumentAndStamps,
+        }
+
+
+        public enum EnumPrintMod
+        {
+            StatusSize,
+            StatusPoster,
+            StatusMutiple,
+            StatusBooklet
+        }
+
+        public enum EnumPosterMod
+        {
+            StatusTile,
+            StatusSplit
+        }
+
+        public enum EnumDisplayPageNumber
+        {
+            StatusTwo,
+            StatusFour,
+            StatusSix,
+            StatusNine,
+            StatusSixteen,
+            StatusCustomized
+        }
+
+        public enum EnumPageOrder
+        {
+            StatusHorizontalOrder,
+            StatusHorizontalReverseOrder,
+            StatusVerticalOrder,
+            StatusVerticalReverseOrder,
+        }
+
+        public enum EnumBookletSubset
+        {
+            StatusBothSides,
+            StatusFrontSideOnly,
+            StatusBackSideOnly
+        }
+
+        public enum EnumBookletBinding
+        {
+            StatusLeft,
+            StatusRight,
+            StatusLeftTall,
+            StatusRightTall
+        }
+
+        public class PrintSettingsInfo
+        {
+            public bool IsBlackAndWhite { get; set; }
+            public bool IsReverseOrder { get; set; }
+            public EnumPaperSize EnumPaperSize { get; set; }
+            public EnumPrintOrientation EnumPrintOrientation { get; set; }
+            public EnumPageRange EnumPageRange { get; set; }
+            public int Copies { get; set; }
+            public string[] PrinterName { get; set; }
+            public string CustomizeRange { get; set; }
+            public PrintMod PrintMod { get; set; }
+        }
+
+        public abstract class PrintMod { }
+
+        public class SizeSetttingsInfo : PrintMod
+        {
+            public EnumSizeType SizeType;
+            public int DisplayRatio = 0;
+        }
+
+
+        public class PosterInfo : PrintMod
+        {
+            public bool CutMarks { get; set; }
+            public double OverLap { get; set; }  
+        }
+
+        public class PostModTileInfo : PosterInfo
+        {
+            public int TileRatio { get; set; }
+        }
+
+        public class PostModSplitInfo : PosterInfo
+        {
+            public EnumDisplayPageNumber EnumDisplayPageNumber { get; set; }
+            public int TileRatio { get; set; }
+            public int WidthPartNumber { get; set; }
+            public int HeightPartNumber { get; set; }
+        }
+
+        public class MutipleInfo : PrintMod
+        {
+            public bool AutoRotate { set; get; }
+            public EnumDisplayPageNumber EnumDisplayPageNumber { get; set; }
+            public int WidthPartNumber { get; set; }
+            public int HeightPartNumber { get; set; } 
+        }
+
+        public class BookletInfo : PrintMod
+        {
+            public EnumBookletSubset EnumBookletSubset { get; set; }
+            public EnumBookletBinding EnumBookletBinding { get; set; }
+            public int BeginPageIndex { get; set; }
+            public int EndPageIndex { get; set; }
+        }
+    }
+}

+ 44 - 0
PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageSplitDialogModel.cs

@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.Model.Dialog.HomePageToolsDialogs
+{
+    internal class HomePageSplitDialogModel
+    {
+        public class SplitEventClass : EventArgs
+        {
+            /// <summary>
+            /// 拆分模式
+            /// </summary>
+            public SplitMode Mode;
+            /// <summary>
+            /// 文件名
+            /// </summary>
+            public string FileName;
+            /// <summary>
+            /// 页面信息
+            /// </summary>
+            public string PageRange;
+
+        }
+
+        public enum SplitMode
+        {
+            /// <summary>
+            /// 按页平均拆分
+            /// </summary>
+            AveragePages,
+            /// <summary>
+            /// 按文件平均拆分
+            /// </summary>
+            AverageFiles,
+            /// <summary>
+            /// 自定义页码范围拆分
+            /// </summary>
+            CustomPageRange
+        }
+    }
+}

+ 41 - 2
PDF Office/PDF Office.csproj

@@ -186,9 +186,16 @@
     <Compile Include="Model\Dialog\ToolsDialogs\SaftyDialogs\CheckPasswordDialogModel.cs" />
     <Compile Include="Model\Dialog\ToolsDialogs\SaftyDialogs\DeleteSafetySettintgsModel.cs" />
     <Compile Include="Model\Dialog\ToolsDialogs\SaftyDialogs\SetPasswordDialogModel.cs" />
+<<<<<<< Updated upstream
     <Compile Include="Model\HomePageToolsDialogs\HomePageExtractDialogModel.cs" />
     <Compile Include="Model\HomePageToolsDialogs\HomePageInsertDialogModel.cs" />
     <Compile Include="Model\HomePageToolsDialogs\HomePageSplitDialogModel.cs" />
+=======
+    <Compile Include="Model\Dialog\HomePageToolsDialogs\HomePageExtractDialogModel.cs" />
+    <Compile Include="Model\Dialog\HomePageToolsDialogs\HomePageInsertDialogModel.cs" />
+    <Compile Include="Model\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterDialogModel.cs" />
+    <Compile Include="Model\Dialog\HomePageToolsDialogs\HomePageSplitDialogModel.cs" />
+>>>>>>> Stashed changes
     <Compile Include="Model\PageEdit\ExtractModel.cs" />
     <Compile Include="Model\PageEdit\PageEditItem.cs" />
     <Compile Include="Model\ParameterNames.cs" />
@@ -205,6 +212,10 @@
     <Compile Include="ViewModels\BottomToolContentViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ExtractDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\FullScreenWindowViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterModBookletContentViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterModMutipleContentViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterModPosterContentViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterModSizeContentViewModel.cs" />
     <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterPageSetDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePageSplitDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\PageEditDialogs\ExtractDialogViewModel.cs" />
@@ -240,6 +251,18 @@
     <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePageInsertDialog.xaml.cs">
       <DependentUpon>HomePageInsertDialog.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterModBookletContent.xaml.cs">
+      <DependentUpon>HomePagePrinterModBookletContent.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterModMutipleContent.xaml.cs">
+      <DependentUpon>HomePagePrinterModMutipleContent.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterModPosterContent.xaml.cs">
+      <DependentUpon>HomePagePrinterModPosterContent.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterModSizeContent.xaml.cs">
+      <DependentUpon>HomePagePrinterModSizeContent.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterPageSetDialog.xaml.cs">
       <DependentUpon>HomePagePrinterPageSetDialog.xaml</DependentUpon>
     </Compile>
@@ -252,7 +275,7 @@
     <Compile Include="Views\Dialog\PageEditDialogs\InsertDialog.xaml.cs">
       <DependentUpon>InsertDialog.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\Dialog\PageEditDialogs\SplitDialog.xaml.cs">
+    <Compile Include="Views\Dialog\ToolsDialogs\CompressDialogs\SplitDialog.xaml.cs">
       <DependentUpon>SplitDialog.xaml</DependentUpon>
     </Compile>
     <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterDialog.xaml.cs">
@@ -409,6 +432,22 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterModBookletContent.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterModMutipleContent.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterModPosterContent.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterModSizeContent.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterPageSetDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -425,7 +464,7 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
-    <Page Include="Views\Dialog\PageEditDialogs\SplitDialog.xaml">
+    <Page Include="Views\Dialog\ToolsDialogs\CompressDialogs\SplitDialog.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>

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

@@ -1,3 +1,4 @@
+<<<<<<< Updated upstream
 using ComPDFKit.PDFDocument;
 using PDF_Office.Model;
 using Prism.Commands;
@@ -19,6 +20,160 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
         public HomePagePrinterDialogViewModel(IDialogService dialogService)
         {
             dialogs = dialogService;
+=======
+using PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter;
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Regions;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.Windows.Controls;
+using System.Windows;
+using System.Diagnostics;
+using System.Drawing.Printing;
+using PDFSettings;
+
+namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
+{
+    public class HomePagePrinterDialogViewModel : BindableBase, IDialogAware, INavigationAware
+    {
+        public IDialogService Dialogs;
+        public IRegionManager PrintModRegion;
+
+        private string currentPrintModName;
+
+        private string _printModRegionName;
+        public string PrintModRegionName
+        {
+            get
+            {
+                return _printModRegionName;
+            }
+            set
+            {
+                SetProperty(ref _printModRegionName, value);
+            }
+        }
+
+        public Dictionary<string, string> GetContentByPrintMod;
+
+        private Visibility _printModVisible = Visibility.Collapsed;
+        public Visibility PrintModVisible
+        {
+            get { return _printModVisible; }
+            set { SetProperty(ref _printModVisible, value); }
+        }
+
+        private List<string> _printerNameList;
+        public List<string> PrinterNameList
+        {
+            get { return _printerNameList; }
+            set { _printerNameList = value; }
+        }
+
+        private List<string> _printContentList;
+        public List<string> PrintContentList
+        {
+            get { return _printContentList; }
+            set { _printContentList = value; }
+        }
+
+        private List<string> _printerDirectionList;
+        public List<string> PrintDirectionList
+        {
+            get { return _printerDirectionList; }
+            set { _printerDirectionList = value; }
+        }
+
+        public DelegateCommand<object> DelegateChangePrintModCommand { get; set; }
+
+        public HomePagePrinterDialogViewModel(IDialogService dialogService, IRegionManager regionManager)
+        {
+            Dialogs = dialogService;
+            PrintModRegion = regionManager;
+            PrintModVisible = Visibility.Visible;
+            PrintModRegionName = Guid.NewGuid().ToString();
+            DelegateChangePrintModCommand = new DelegateCommand<object>(ChangePrintMod);
+
+            GetContentByPrintMod = new Dictionary<string, string>();
+            InitGetContentByPrintMod(ref GetContentByPrintMod);
+
+            InitComponent();
+        }
+
+        private void InitComponent()
+        {
+            InitPrinterNameList();
+            InitPrintContentList();
+            InitPrintContentList();
+            InitPrintDirectionList();
+        }
+
+
+
+        private void InitPrinterNameList()
+        {
+            PrinterNameList = new List<string>();
+            PrintDocument printDocument = new PrintDocument();
+            string defaultPrinterName = printDocument.PrinterSettings.PrinterName;
+
+            foreach (string printerListItem in PrinterSettings.InstalledPrinters)
+            {
+                PrinterNameList.Add(printerListItem);
+            }
+        }
+        private void InitPrintContentList()
+        {
+            PrintContentList = new List<string>();
+            PrintContentList.Add("文档");
+            PrintContentList.Add("文档和标记");
+            PrintContentList.Add("文档和图章");
+        }
+
+        private void InitPrintDirectionList()
+        {
+            PrintDirectionList= new List<string>();
+            PrintDirectionList.Add("横向");
+            PrintDirectionList.Add("纵向");
+        }
+
+        private void InitGetContentByPrintMod(ref Dictionary<string, string> dictionary)
+        {
+            dictionary.Add("ModSize", "HomePagePrinterModSizeContent");
+            dictionary.Add("ModPoster", "HomePagePrinterModPosterContent");
+            dictionary.Add("ModMutiple", "HomePagePrinterModMutipleContent");
+            dictionary.Add("ModBooklet", "HomePagePrinterModBookletContent");
+        }
+
+        private void ShowContent(string currentBar)
+        {
+            PrintModVisible = Visibility.Visible;
+            //TODO
+        }
+
+        private void EnterSelectedMod(string currentBar)
+        {
+
+            NavigationParameters param = new NavigationParameters();
+            PrintModVisible = Visibility.Collapsed;
+            PrintModRegion.RequestNavigate(PrintModRegionName, GetContentByPrintMod[currentBar]);
+            //TODO
+            ShowContent(currentBar);
+        }
+
+
+
+        private void ChangePrintMod(object e)
+        {
+            var args = e as Button;
+            if (args != null)
+            {
+                currentPrintModName = args.Name;
+                EnterSelectedMod(currentPrintModName);
+                //TODO:
+            }
+>>>>>>> Stashed changes
         }
 
         public string Title => "";
@@ -36,12 +191,29 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
 
         public void OnDialogOpened(IDialogParameters parameters)
         {
+<<<<<<< Updated upstream
             CPDFDocument doc = null;
             parameters.TryGetValue<CPDFDocument>(ParameterNames.PDFDocument, out doc);
             if (doc != null)
             {
                 document = doc;
             }
+=======
+            PrintModRegion.RequestNavigate(PrintModRegionName, GetContentByPrintMod["ModSize"]);
+        }
+
+        public void OnNavigatedTo(NavigationContext navigationContext)
+        {
+        }
+
+        public bool IsNavigationTarget(NavigationContext navigationContext)
+        {
+            return true;
+        }
+
+        public void OnNavigatedFrom(NavigationContext navigationContext)
+        {
+>>>>>>> Stashed changes
         }
     }
 }

+ 30 - 0
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModBookletContentViewModel.cs

@@ -0,0 +1,30 @@
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Regions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
+{
+    public class HomePagePrinterModBookletContentViewModel : BindableBase, INavigationAware
+    {
+        public HomePagePrinterModBookletContentViewModel()
+        {
+
+        }
+
+        public bool IsNavigationTarget(NavigationContext navigationContext)
+        {
+            return true;
+        }
+
+        public void OnNavigatedFrom(NavigationContext navigationContext)
+        {
+        }
+
+        public void OnNavigatedTo(NavigationContext navigationContext)
+        {
+        }
+    }
+}

+ 30 - 0
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModMutipleContentViewModel.cs

@@ -0,0 +1,30 @@
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Regions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
+{
+    public class HomePagePrinterModMutipleContentViewModel : BindableBase, INavigationAware
+    {
+        public HomePagePrinterModMutipleContentViewModel()
+        {
+
+        }
+
+        public bool IsNavigationTarget(NavigationContext navigationContext)
+        {
+            return true;
+        }
+
+        public void OnNavigatedFrom(NavigationContext navigationContext)
+        {
+        }
+
+        public void OnNavigatedTo(NavigationContext navigationContext)
+        {
+        }
+    }
+}

+ 27 - 0
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModPosterContentViewModel.cs

@@ -0,0 +1,27 @@
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Regions;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+
+namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
+{
+    public class HomePagePrinterModPosterContentViewModel : BindableBase,INavigationAware
+    {
+
+        public bool IsNavigationTarget(NavigationContext navigationContext)
+        {
+            return true;
+        }
+
+        public void OnNavigatedFrom(NavigationContext navigationContext)
+        {
+        }
+
+        public void OnNavigatedTo(NavigationContext navigationContext)
+        {
+        }
+    }
+}

+ 29 - 0
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModSizeContentViewModel.cs

@@ -0,0 +1,29 @@
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Regions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
+{
+    public class HomePagePrinterModSizeContentViewModel : BindableBase,INavigationAware
+    {
+        public HomePagePrinterModSizeContentViewModel()
+        {
+        }
+
+        public bool IsNavigationTarget(NavigationContext navigationContext)
+        {
+            return true;
+        }
+
+        public void OnNavigatedFrom(NavigationContext navigationContext)
+        {
+        }
+
+        public void OnNavigatedTo(NavigationContext navigationContext)
+        { 
+        }
+    }
+}

+ 8 - 0
PDF Office/ViewModels/HomePanel/HomeGuidContentViewModel.cs

@@ -74,6 +74,7 @@ namespace PDF_Office.ViewModels.HomePanel
                     case PDFToolType.Merge:
                         break;
 
+<<<<<<< Updated upstream
                     case PDFToolType.Print:
                         DialogParameters printvalue = new DialogParameters();
                         printvalue.Add(ParameterNames.PDFViewer, viewer); ;
@@ -84,6 +85,13 @@ namespace PDF_Office.ViewModels.HomePanel
                     case PDFToolType.Security:
                         break;
                 }
+=======
+                case PDFToolType.Print:
+                    DialogParameters printvalue = new DialogParameters();
+
+                    dialogs.ShowDialog(DialogNames.HomePagePrinterDialog, printvalue, e => { });
+                    break;
+>>>>>>> Stashed changes
 
             }
         }

+ 0 - 1
PDF Office/ViewModels/ViewContentViewModel.cs

@@ -233,7 +233,6 @@ namespace PDF_Office.ViewModels
                         }
                         previousBar = currentBar;
                 }
-
             }
         }
 

+ 13 - 23
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDialog.xaml

@@ -51,7 +51,7 @@
                             <StackPanel Orientation="Horizontal" Margin="0,60,0,0">
                                 <StackPanel Orientation="Horizontal">
                                     <TextBlock Text="打印机: " Height="20" Width="56" ></TextBlock>
-                                    <ComboBox Width="277" Height="32" Margin="8,0,0,0"></ComboBox>
+                                    <ComboBox Width="277" Height="32" Margin="8,0,0,0" ItemsSource="{Binding PrinterNameList}" SelectedIndex="0"></ComboBox>
                                 </StackPanel>
                                 <Button Content="页面设置" Height="32" Width="91" Margin="31,0,0,0"/>
                             </StackPanel>
@@ -79,17 +79,17 @@
                             <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                                 <StackPanel Orientation="Horizontal">
                                     <TextBlock Text="页面范围: " Height="20" Width="70"></TextBlock>
-                                    <ComboBox Width="190" Height="32" Margin="10,0,0,0" ></ComboBox>
+                                    <cus:WritableComboBox Width="190" Height="32" Margin="10,0,0,0"></cus:WritableComboBox>
                                 </StackPanel>
                                 <StackPanel Orientation="Horizontal" Margin="35,0,0,0">
                                     <TextBlock Text="打印方向: " Height="20" Width="70"></TextBlock>
-                                    <ComboBox Width="190" Height="32" Margin="10,0,0,0" ></ComboBox>
+                                    <ComboBox Width="190" Height="32" Margin="10,0,0,0" ItemsSource="{Binding PrintDirectionList}" SelectedIndex="0"></ComboBox>
                                 </StackPanel>
                             </StackPanel>
                             <StackPanel Orientation="Horizontal" Margin="0,12,0,0">
                                 <StackPanel Orientation="Horizontal">
                                     <TextBlock Text="打印内容: " Height="20" Width="70"></TextBlock>
-                                    <ComboBox Width="190" Height="32" Margin="10,0,0,0"></ComboBox>
+                                    <ComboBox Width="190" Height="32" Margin="10,0,0,0" ItemsSource="{Binding PrintContentList}" SelectedIndex="0"></ComboBox>
                                 </StackPanel>
                                 <CheckBox  Margin="35,0,0,0" VerticalAlignment="Center">
                                     <TextBlock Text="逆页序打印"/>
@@ -98,51 +98,41 @@
                         </StackPanel>
                     </Grid>
                     <Grid Grid.Row="2">
-                        <StackPanel Orientation="Vertical">
+                        <StackPanel Height="auto" Orientation="Vertical">
                             <StackPanel Orientation="Horizontal">
                                 <TextBlock Text="调整页面大小和处理页面" FontWeight="ExtraBlack"/>
                                 <Button  Content="?" FontSize="6" Width="16" Height="16" Margin="7,0,0,0"></Button>
                             </StackPanel>
                             <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
-                                <Button Background="WhiteSmoke" Width="126" Height="32" Margin="8,0,25,0" Command="{Binding CompressCommand}">
+                                <Button Name="ModSize" Background="WhiteSmoke" Width="126" Height="32" Margin="8,0,25,0" Command="{Binding DelegateChangePrintModCommand}" CommandParameter="{Binding ElementName=ModSize}">
                                     <Border>
                                         <TextBlock Text="大小"></TextBlock>
                                     </Border>
                                 </Button>
-                                <Button Background="WhiteSmoke" Width="126" Height="32" Margin="0,0,25,0" Command="{Binding CompressCommand}">
+                                <Button Name="ModPoster" Background="WhiteSmoke" Width="126" Height="32" Margin="0,0,25,0" Command="{Binding DelegateChangePrintModCommand}" CommandParameter="{Binding ElementName=ModPoster}">
                                     <Border>
                                         <TextBlock Text="海报"></TextBlock>
                                     </Border>
                                 </Button>
-                                <Button Background="WhiteSmoke" Width="126" Height="32" Margin="0,0,25,0" Command="{Binding CompressCommand}">
+                                <Button Name="ModMutiple" Background="WhiteSmoke" Width="126" Height="32" Margin="0,0,25,0" Command="{Binding DelegateChangePrintModCommand}" CommandParameter="{Binding ElementName=ModMutiple}">
                                     <Border>
                                         <TextBlock Text="多页"></TextBlock>
                                     </Border>
                                 </Button>
-                                <Button Background="WhiteSmoke" Width="126" Height="32" Margin="0,0,10,0" Command="{Binding CompressCommand}">
+                                <Button Name="ModBooklet" Background="WhiteSmoke" Width="126" Height="32" Margin="0,0,10,0" Command="{Binding DelegateChangePrintModCommand}" CommandParameter="{Binding ElementName=ModBooklet}">
                                     <Border>
                                         <TextBlock Text="小册子"></TextBlock>
                                     </Border>
                                 </Button>
                             </StackPanel>
-                            <StackPanel Orientation="Horizontal" Height="107">
-                                <StackPanel Orientation="Vertical">
-                                    <RadioButton Margin="0,16,0,0">
-                                        <TextBlock Text="自动适应"/>
-                                    </RadioButton>
-                                    <RadioButton Margin="0,19,0,0">
-                                        <TextBlock Text="实际大小"/>
-                                    </RadioButton>
-                                    <RadioButton Margin="0,19,0,0">
-                                        <TextBlock Text="自定义显示比例"/>
-                                    </RadioButton>
-                                </StackPanel>
-                                <cus:NumericUpDown Width="73" Height="32" VerticalAlignment="Bottom" Margin="15,0,0,2"></cus:NumericUpDown>
+                            <StackPanel>
+                                <Grid>
+                                    <ContentControl Height="180" Margin="12" x:Name="PrintMod" prism:RegionManager.RegionName="{Binding PrintModRegionName}"   Visibility="{Binding PrintModVisible}"/>
+                                </Grid>
                             </StackPanel>
                         </StackPanel>
                     </Grid>
                 </Grid>
-
             </Grid>
         </Border>
     </Grid>

+ 11 - 2
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDialog.xaml.cs

@@ -1,4 +1,8 @@
-using System.Windows.Controls;
+using PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter;
+using Prism.Ioc;
+using Prism.Regions;
+using System.Windows;
+using System.Windows.Controls;
 
 namespace PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter
 {
@@ -7,9 +11,14 @@ namespace PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter
     /// </summary>
     public partial class HomePagePrinterDialog : UserControl
     {
-        public HomePagePrinterDialog()
+        private IContainerProvider containerProvider;
+        public HomePagePrinterDialog(IContainerProvider containerProvider)
         {
             InitializeComponent();
+            this.containerProvider = containerProvider;
+            var regionManager = containerProvider.Resolve<IRegionManager>();
+            RegionManager.SetRegionManager(this, regionManager);
+            RegionManager.UpdateRegions();
         }
     }
 }

+ 37 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModBookletContent.xaml

@@ -0,0 +1,37 @@
+<UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter.HomePagePrinterModBookletContent"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:prism="http://prismlibrary.com/"             
+             prism:ViewModelLocator.AutoWireViewModel="True"
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             mc:Ignorable="d"
+             d:DesignHeight="180"
+             d:DesignWidth="600">
+    <Grid Height="160"  VerticalAlignment="Top">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="1*"></RowDefinition>
+            <RowDefinition Height="1*"></RowDefinition>
+            <RowDefinition Height="1*"></RowDefinition>
+            <RowDefinition Height="1*"></RowDefinition>
+        </Grid.RowDefinitions>
+        <StackPanel Grid.Row="0" Orientation="Horizontal">
+            <TextBlock Text="小册子子集:" VerticalAlignment="Center" Margin="0,0,47,0"></TextBlock>
+            <ComboBox Height="32" Width="265"></ComboBox>
+        </StackPanel>
+        <StackPanel Grid.Row="1" Orientation="Horizontal">
+            <TextBlock Text="页面,从:" VerticalAlignment="Center" Margin="0,0,58,0"></TextBlock>
+            <TextBox Height="32" Width="50"  HorizontalContentAlignment="Center" VerticalContentAlignment="Center"></TextBox>
+            <TextBlock Text="至" VerticalAlignment="Center" Margin="10,0,5,0"></TextBlock>
+            <TextBox Height="32" Width="50" ></TextBox>
+        </StackPanel>
+        <StackPanel Grid.Row="2" Orientation="Horizontal">
+            <TextBlock Text="装订:" VerticalAlignment="Center" Margin="0,0,84,0"></TextBlock>
+            <ComboBox Height="32" Width="265"></ComboBox>
+        </StackPanel>
+        <StackPanel Grid.Row="3" Orientation="Horizontal">
+            <CheckBox VerticalAlignment="Center"></CheckBox>
+            <TextBlock Text="自动旋转每张纸中的页面" VerticalAlignment="Center" Margin="11,0,0,0"></TextBlock>
+        </StackPanel>
+    </Grid>
+</UserControl>

+ 15 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModBookletContent.xaml.cs

@@ -0,0 +1,15 @@
+using System.Windows.Controls;
+
+namespace PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter
+{
+    /// <summary>
+    /// Interaction logic for HomePagePrinterModBookletContent
+    /// </summary>
+    public partial class HomePagePrinterModBookletContent : UserControl
+    {
+        public HomePagePrinterModBookletContent()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 34 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModMutipleContent.xaml

@@ -0,0 +1,34 @@
+<UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter.HomePagePrinterModMutipleContent"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:prism="http://prismlibrary.com/"             
+             prism:ViewModelLocator.AutoWireViewModel="True"
+             xmlns:cus="clr-namespace:PDF_Office.CustomControl"
+              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             mc:Ignorable="d"
+             d:DesignHeight="180"
+             d:DesignWidth="600">
+    <Grid Height="120"  VerticalAlignment="Top">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="1*"></RowDefinition>
+            <RowDefinition Height="1*"></RowDefinition>
+            <RowDefinition Height="1*"></RowDefinition>
+        </Grid.RowDefinitions>
+        <StackPanel Grid.Row="0" Orientation="Horizontal">
+            <TextBlock Text="每张纸显示的页数:" VerticalAlignment="Center" Margin="0,0,5,0"></TextBlock>
+            <cus:WritableComboBox Height="32" Width="113"></cus:WritableComboBox>
+            <TextBox Height="32" Width="53" Margin="16,0,11,0"></TextBox>
+            <TextBlock Text="X" VerticalAlignment="Center"></TextBlock>
+            <TextBox Height="32" Width="53"  Margin="11,0,0,0"></TextBox>
+        </StackPanel>
+        <StackPanel Grid.Row="1" Orientation="Horizontal">
+            <TextBlock Text="页面顺序:" VerticalAlignment="Center" Margin="0,0,61,0"></TextBlock>
+            <ComboBox Height="32" Width="265"></ComboBox>
+        </StackPanel>
+        <StackPanel Grid.Row="2" Orientation="Horizontal">
+            <CheckBox VerticalAlignment="Center"></CheckBox>
+            <TextBlock VerticalAlignment="Center" Margin="11" Text="自动旋转每张纸中的页面"></TextBlock>
+        </StackPanel>
+    </Grid>
+</UserControl>

+ 15 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModMutipleContent.xaml.cs

@@ -0,0 +1,15 @@
+using System.Windows.Controls;
+
+namespace PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter
+{
+    /// <summary>
+    /// Interaction logic for HomePagePrinterModMutipleContent
+    /// </summary>
+    public partial class HomePagePrinterModMutipleContent : UserControl
+    {
+        public HomePagePrinterModMutipleContent()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 63 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModPosterContent.xaml

@@ -0,0 +1,63 @@
+<UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter.HomePagePrinterModPosterContent"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:prism="http://prismlibrary.com/"             
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             mc:Ignorable="d"
+             d:DesignHeight="180"
+             d:DesignWidth="600"
+             prism:ViewModelLocator.AutoWireViewModel="True">
+    <Grid Height="160"  VerticalAlignment="Top">
+        <Grid.RowDefinitions>
+            <RowDefinition></RowDefinition>
+            <RowDefinition></RowDefinition>
+            <RowDefinition></RowDefinition>
+            <RowDefinition></RowDefinition>
+        </Grid.RowDefinitions>
+        <Grid Grid.Row="0" HorizontalAlignment="Left"  Width="600">
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition Width="1*"></ColumnDefinition>
+                <ColumnDefinition Width="1*"></ColumnDefinition>
+            </Grid.ColumnDefinitions>
+            <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
+                <RadioButton Name="Tile" Content="平铺"></RadioButton>
+                <RadioButton Name="Split" Content="拆分"></RadioButton>
+            </StackPanel>
+            <Grid Grid.Column="1">
+                <StackPanel Orientation="Horizontal" Visibility="Collapsed">
+                    <TextBlock Text="平铺百分比:" VerticalAlignment="Center"></TextBlock>
+                    <TextBox Height="32" Width="52"></TextBox>
+                    <TextBlock Text="%" VerticalAlignment="Center"></TextBlock>
+                </StackPanel>
+                <StackPanel Orientation="Horizontal" Margin="-150,0,0,0" Visibility="Visible">
+                    <TextBlock Text="每张纸显示的页数:" VerticalAlignment="Center" ></TextBlock>
+                    <ComboBox Height="32" Width="113" Margin="0,0,16,0"></ComboBox>
+                    <TextBox Height="32" Width="52" Margin="0,0,16,0"></TextBox>
+                    <TextBlock Text="x" VerticalAlignment="Center" Margin="0,0,16,0"></TextBlock>
+                    <TextBox  Height="32" Width="52"></TextBox>
+                </StackPanel>
+            </Grid>
+        </Grid>
+        <Grid Grid.Row="1">
+            <StackPanel Orientation="Horizontal" >
+                <TextBlock Text="重叠:" VerticalAlignment="Center"></TextBlock>
+                <TextBox Height="32" Width="52"></TextBox>
+                <TextBlock Text="mm" VerticalAlignment="Center"></TextBlock>
+            </StackPanel>
+        </Grid>
+        <Grid Grid.Row="2">
+            <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
+                <CheckBox Margin="0,0,11,0"></CheckBox>
+                <TextBlock Text="剪切标记"></TextBlock>
+            </StackPanel>
+        </Grid>
+        <Grid Grid.Row="3" VerticalAlignment="Center">
+            <StackPanel Orientation="Horizontal">
+                <CheckBox Margin="0,0,11,0" VerticalAlignment="Center"></CheckBox>
+                <TextBlock Text="标签" VerticalAlignment="Center" Margin="0,0,8,0"></TextBlock>
+                <TextBox Height="32" Width="361"></TextBox>
+            </StackPanel>
+        </Grid>
+    </Grid>
+</UserControl>

+ 15 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModPosterContent.xaml.cs

@@ -0,0 +1,15 @@
+using System.Windows.Controls;
+
+namespace PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter
+{
+    /// <summary>
+    /// Interaction logic for HomePagePrinterModPosterContent
+    /// </summary>
+    public partial class HomePagePrinterModPosterContent : UserControl
+    {
+        public HomePagePrinterModPosterContent()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 35 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModSizeContent.xaml

@@ -0,0 +1,35 @@
+<UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter.HomePagePrinterModSizeContent"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:cus="clr-namespace:PDF_Office.CustomControl"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:prism="http://prismlibrary.com/"             
+             prism:ViewModelLocator.AutoWireViewModel="True"
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             mc:Ignorable="d"
+             d:DesignHeight="180"
+             d:DesignWidth="300">
+    <Grid Height="120"  VerticalAlignment="Top">
+        <Grid.RowDefinitions>
+            <RowDefinition></RowDefinition>
+            <RowDefinition></RowDefinition>
+            <RowDefinition></RowDefinition>
+        </Grid.RowDefinitions>
+        <Grid Grid.Row="0">
+            <RadioButton VerticalAlignment="Center">
+                <TextBlock Text="自动适应"></TextBlock>
+            </RadioButton>
+        </Grid>
+        <Grid Grid.Row="1">
+            <RadioButton VerticalAlignment="Center">
+                <TextBlock Text="实际大小"></TextBlock>
+            </RadioButton>
+        </Grid>
+        <Grid Grid.Row="2">
+            <RadioButton VerticalAlignment="Center">
+                <TextBlock Text="自定义显示比例"></TextBlock>
+            </RadioButton>
+            <cus:NumericUpDown Width="73" Height="32" Margin="15,0,0,2"></cus:NumericUpDown>
+        </Grid>
+    </Grid>
+</UserControl>

+ 15 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModSizeContent.xaml.cs

@@ -0,0 +1,15 @@
+using System.Windows.Controls;
+
+namespace PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter
+{
+    /// <summary>
+    /// Interaction logic for HomePagePrinterModSizeContent
+    /// </summary>
+    public partial class HomePagePrinterModSizeContent : UserControl
+    {
+        public HomePagePrinterModSizeContent()
+        {
+            InitializeComponent();
+        }
+    }
+}

PDF Office/Views/Dialog/PageEditDialogs/SplitDialog.xaml → PDF Office/Views/Dialog/ToolsDialogs/CompressDialogs/SplitDialog.xaml


PDF Office/Views/Dialog/PageEditDialogs/SplitDialog.xaml.cs → PDF Office/Views/Dialog/ToolsDialogs/CompressDialogs/SplitDialog.xaml.cs


+ 1 - 1
PDF Office/Views/HomePanel/HomeToolsContent.xaml

@@ -11,6 +11,6 @@
              mc:Ignorable="d" 
              d:DesignHeight="450" d:DesignWidth="800">
     <Grid>
-        <toolBar:PDFToolsContent/>
+        <toolBar:PDFToolsContent Loaded="PDFToolsContent_Loaded"/>
     </Grid>
 </UserControl>

+ 1 - 1
PDF Office/Views/MainContent.xaml

@@ -18,6 +18,6 @@
         </i:EventTrigger>
     </i:Interaction.Triggers>-->
     <Grid>
-        <ContentControl Name="ContentMain" prism:RegionManager.RegionName="{Binding MainContentRegionName}" />
+        <ContentControl Name="ContentMain" prism:RegionManager.RegionName="{Binding MainContentRegionName}" Margin="-64,-10,64,10" />
     </Grid>
 </UserControl>

+ 5 - 4
PDF Office/Views/MainWindow.xaml

@@ -127,11 +127,12 @@
         <Grid>
             <Grid.RowDefinitions>
                 <RowDefinition Height="40" />
-                <RowDefinition Height="*" />
+                <RowDefinition Height="65*" />
+                <RowDefinition Height="121*"/>
             </Grid.RowDefinitions>
             <dragablz:TabablzControl
                 Name="TabablzControl"
-                Grid.RowSpan="2"
+                Grid.RowSpan="3"
                 BorderThickness="0"
                 ItemContainerStyle="{StaticResource DragablzItemStyle}"
                 SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
@@ -161,9 +162,9 @@
             </dragablz:TabablzControl>
             <!--  标题栏右侧栏,关闭按钮,会员,试用等  -->
             <StackPanel
-                HorizontalAlignment="Right"
+                HorizontalAlignment="Left"
                 Orientation="Horizontal"
-                WindowChrome.IsHitTestVisibleInChrome="True">
+                WindowChrome.IsHitTestVisibleInChrome="True" Margin="1160,0,0,0">
                 <Button
                     Name="BtnMiniSize"
                     Width="40"

+ 0 - 2
PDF Office/Views/Tools/ToolsBarContent.xaml

@@ -148,8 +148,6 @@
                     </StackPanel>
                 </Button>
             </WrapPanel>
-
         </Border>
-
     </Grid>
 </UserControl>