Browse Source

Merge branch 'dev' into practice2

# Conflicts:
#	PDF Office/PDF Office.csproj
OYXH\oyxh 2 years ago
parent
commit
a3c8e55f76
37 changed files with 1088 additions and 1582 deletions
  1. 7 0
      PDF Office/App.xaml.cs
  2. 3 3
      PDF Office/Views/PropertyPanel/AnnotPanel/CommonControls/ColorContent.xaml
  3. 1 1
      PDF Office/Views/PropertyPanel/AnnotPanel/CommonControls/ColorContent.xaml.cs
  4. 2 2
      PDF Office/Views/PropertyPanel/AnnotPanel/CommonControls/SlidContent.xaml
  5. 1 1
      PDF Office/Views/PropertyPanel/AnnotPanel/CommonControls/SlidContent.xaml.cs
  6. 3 3
      PDF Office/Views/PropertyPanel/AnnotPanel/CommonControls/SlidContentPop.xaml
  7. 1 1
      PDF Office/Views/PropertyPanel/AnnotPanel/CommonControls/SlidContentPop.xaml.cs
  8. 38 0
      PDF Office/DataConvert/InvertBoolConvert.cs
  9. 20 4
      PDF Office/Views/HomePanel/PDFTools/PDFTools.cs
  10. 12 2
      PDF Office/Model/PDFTool/ToolItem.cs
  11. 11 10
      PDF Office/PDF Office.csproj
  12. 22 0
      PDF Office/Properties/Settings.Designer.cs
  13. 6 0
      PDF Office/Properties/Settings.settings
  14. 52 0
      PDF Office/Styles/ButtonStyle.xaml
  15. 5 15
      PDF Office/Styles/ListViewStyle.xaml
  16. 74 0
      PDF Office/Styles/RadioButtonStyle.xaml
  17. 5 3
      PDF Office/ViewModels/HomePanel/HomeGuidContentViewModel.cs
  18. 359 0
      PDF Office/ViewModels/HomePanel/RecentFiles/RecentFilesContentViewModel.cs
  19. 2 0
      PDF Office/ViewModels/PageEdit/PageEditContentViewModel.cs
  20. 1 1
      PDF Office/Views/HomePanel/HomeGuidContent.xaml
  21. 3 3
      PDF Office/Views/HomePanel/PDFTools/PDFToolItem.xaml
  22. 0 18
      PDF Office/Views/HomePanel/PDFTools/PDFToolItem.xaml.cs
  23. 7 11
      PDF Office/Views/HomePanel/PDFTools/PDFToolsContent.xaml
  24. 30 40
      PDF Office/Views/HomePanel/PDFTools/PDFToolsContent.xaml.cs
  25. 18 17
      PDF Office/Views/HomePanel/PDFTools/QuickToolsContent.xaml.cs
  26. 19 58
      PDF Office/Views/HomePanel/RecentFiles/DocItemListViewControl.xaml
  27. 14 25
      PDF Office/Views/HomePanel/RecentFiles/DocItemListViewControl.xaml.cs
  28. 102 83
      PDF Office/Views/HomePanel/RecentFiles/RecentFilesView.xaml
  29. 201 0
      PDF Office/Views/HomePanel/RecentFiles/RecentFilesContent.xaml.cs
  30. 0 382
      PDF Office/Views/HomePanel/RecentFiles/RecentFilesView.xaml.cs
  31. 35 3
      PDF Office/Views/PageEdit/PageEditContent.xaml.cs
  32. 0 253
      PDF Office/Views/PropertyPanel/AnnotPanel/FreehandAnnotProperty.xaml
  33. 0 354
      PDF Office/Views/PropertyPanel/AnnotPanel/FreetextAnnotProperty.xaml
  34. 0 211
      PDF Office/Views/PropertyPanel/AnnotPanel/SharpsAnnotProperty.xaml
  35. 0 78
      PDF Office/Views/PropertyPanel/AnnotPanel/TextAnnotProperty.xaml
  36. 1 0
      PDFSettings/PDFSettings.csproj
  37. 33 0
      PDFSettings/PDFToolsList.cs

+ 7 - 0
PDF Office/App.xaml.cs

@@ -96,6 +96,13 @@ namespace PDF_Office
 
             if (Settings.Default.AppProperties == null)
                 Settings.Default.AppProperties = new PDFSettings.APPSettingProperties();
+
+            if (Settings.Default.AllPDFToolsList == null)
+                Settings.Default.AllPDFToolsList = new PDFSettings.AllPDFToolsList();
+
+            if (Settings.Default.QuickPDFToolsList == null)
+                Settings.Default.QuickPDFToolsList = new PDFSettings.QuickPDFToolsList();
+
         }
 
         /// <summary>

+ 3 - 3
PDF Office/Views/PropertyPanel/AnnotPanel/CommonControls/ColorContent.xaml

@@ -1,16 +1,16 @@
-<UserControl x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls.ColorContent"
+<UserControl x:Class="PDF_Office.CustomControl.CompositeControl.ColorContent"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls"
+             xmlns:local="clr-namespace:PDF_Office.CustomControl.CompositeControl"
              xmlns:cus="clr-namespace:PDF_Office.CustomControl"
              mc:Ignorable="d" 
              d:DesignHeight="450" d:DesignWidth="800">
     <UserControl.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
-                <ResourceDictionary Source="../../../../Styles/CustomBtnStyle.xaml"/>
+                <ResourceDictionary Source="../../Styles/CustomBtnStyle.xaml"/>
             </ResourceDictionary.MergedDictionaries>
             <DataTemplate x:Key="listboxData">
                 <Ellipse Height="20" Width="20" Fill="{Binding Color}"/>

+ 1 - 1
PDF Office/Views/PropertyPanel/AnnotPanel/CommonControls/ColorContent.xaml.cs

@@ -15,7 +15,7 @@ using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
 
-namespace PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls
+namespace PDF_Office.CustomControl.CompositeControl
 {
     public class ColorItem: BindableBase
     {

+ 2 - 2
PDF Office/Views/PropertyPanel/AnnotPanel/CommonControls/SlidContent.xaml

@@ -1,9 +1,9 @@
-<UserControl x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls.SlidContent"
+<UserControl x:Class="PDF_Office.CustomControl.CompositeControl.SlidContent"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls"
+             xmlns:local="clr-namespace:PDF_Office.CustomControl.CompositeControl"
              xmlns:cus="clr-namespace:PDF_Office.CustomControl"
              mc:Ignorable="d" 
              d:DesignHeight="450" d:DesignWidth="800">

+ 1 - 1
PDF Office/Views/PropertyPanel/AnnotPanel/CommonControls/SlidContent.xaml.cs

@@ -15,7 +15,7 @@ using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
 
-namespace PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls
+namespace PDF_Office.CustomControl.CompositeControl
 {
     public class AdornerPresenter : Adorner
     {

+ 3 - 3
PDF Office/Views/PropertyPanel/AnnotPanel/CommonControls/SlidContentPop.xaml

@@ -1,16 +1,16 @@
-<UserControl x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls.SlidContentPop"
+<UserControl x:Class="PDF_Office.CustomControl.CompositeControl.SlidContentPop"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls"
+             xmlns:local="clr-namespace:PDF_Office.CustomControl.CompositeControl"
              mc:Ignorable="d" 
              x:Name="usercontorls"
              d:DesignHeight="450" d:DesignWidth="800">
     <UserControl.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
-                <ResourceDictionary Source="../../../../Styles/SliderStyle.xaml"></ResourceDictionary>
+                <ResourceDictionary Source="../../Styles/SliderStyle.xaml"></ResourceDictionary>
             </ResourceDictionary.MergedDictionaries>
         </ResourceDictionary>
 

+ 1 - 1
PDF Office/Views/PropertyPanel/AnnotPanel/CommonControls/SlidContentPop.xaml.cs

@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
 
-namespace PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls
+namespace PDF_Office.CustomControl.CompositeControl
 {
     /// <summary>
     /// ThicknessContentPop.xaml 的交互逻辑

+ 38 - 0
PDF Office/DataConvert/InvertBoolConvert.cs

@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace PDF_Office.DataConvert
+{
+    public class InvertBoolConvert : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (value is bool)
+            {
+                if ((bool)value)
+                {
+                    return false;
+                }
+                else
+                {
+                    return true;
+                }
+            }
+            else
+            {
+                return false;
+            }
+
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotImplementedException();
+        }
+    }
+}

+ 20 - 4
PDF Office/Views/HomePanel/PDFTools/PDFTools.cs

@@ -1,11 +1,13 @@
 using PDF_Office.Model.PDFTool;
+using PDF_Office.Properties;
+using PDFSettings;
 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 
-namespace PDF_Office.Views.HomePanel.PDFTools
+namespace PDF_Office.Helper
 {
     public enum PDFToolType
     {
@@ -30,11 +32,11 @@ namespace PDF_Office.Views.HomePanel.PDFTools
         CompareDoc
 
     }
-    public class PDFTools
+    public class PDFToolsHelper
     {
         public List<ToolItem> AllTools = null;
         public List<ToolItem> QuickTools = null;
-        public PDFTools()
+        public PDFToolsHelper()
         {
             InitPDFTools();
         }
@@ -68,6 +70,19 @@ namespace PDF_Office.Views.HomePanel.PDFTools
             AddToolItem(PDFToolType.Batch, path, "批量处理", "Batch convert, compress, secure, watermark PDFs.");
             AddToolItem(PDFToolType.Background, path, "背景", "Batch convert, compress, secure, watermark PDFs.");
             AddToolItem(PDFToolType.CompareDoc, path, "文件对比", "Batch convert, compress, secure, watermark PDFs.");
+
+           
+        }
+
+        private void ContianNewTools()
+        {
+            if (Settings.Default.AllPDFToolsList != null)
+            {
+                foreach(var item in AllTools)
+                {
+                    Settings.Default.AllPDFToolsList.FirstOrDefault(tool => tool.Tag == item.Tag);
+                }
+            }
         }
 
         private void AddToolItem(PDFToolType toolType, string imgPath,string title,string titleInfo,int id = 0)
@@ -75,7 +90,8 @@ namespace PDF_Office.Views.HomePanel.PDFTools
             ToolItem toolItem = new ToolItem();
 
             toolItem.Id = id;
-            toolItem.Tag = toolType;
+            toolItem.Tag = (int)toolType;
+            toolItem.TagStr = Enum.GetName(typeof(PDFToolType), toolType);
             toolItem.Image = imgPath;
             toolItem.Title = title;
             toolItem.TitleInfo = titleInfo;

+ 12 - 2
PDF Office/Model/PDFTool/ToolItem.cs

@@ -1,4 +1,4 @@
-using PDF_Office.Views.HomePanel.PDFTools;
+using PDF_Office.Helper;
 using Prism.Mvvm;
 using System;
 using System.Collections.Generic;
@@ -8,8 +8,18 @@ using System.Threading.Tasks;
 
 namespace PDF_Office.Model.PDFTool
 {
-    public class ToolItem : BindableBase
+    public class ToolItem1 : BindableBase
     {
+        private bool _isShowConciseContent = false;
+        public bool IsShowConciseContent
+        {
+            get { return _isShowConciseContent; }
+            set
+            {
+                SetProperty(ref _isShowConciseContent, value);
+            }
+        }
+        public bool IsNewTool { get; set; }
         public int Id { get; set; }
         public PDFToolType Tag { get; set; }
         public string Image { get; set; }

+ 11 - 10
PDF Office/PDF Office.csproj

@@ -322,6 +322,7 @@
     <Compile Include="ViewModels\EditTools\Background\BackgroundTemplateListColorContentViewModel.cs" />
     <Compile Include="ViewModels\EditTools\Background\BackgroundTemplateListFileContentViewModel.cs" />
     <Compile Include="ViewModels\PropertyPanel\ViewModular\ReadViewContentViewModel.cs" />
+    <Compile Include="ViewModels\HomePanel\RecentFiles\RecentFilesContentViewModel.cs" />
     <Compile Include="ViewModels\Tools\ConverterBarContentViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ExtractDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\FullScreenWindowViewModel.cs" />
@@ -592,7 +593,7 @@
     <Compile Include="Views\HomePanel\HomeToolsContent.xaml.cs">
       <DependentUpon>HomeToolsContent.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\HomePanel\PDFTools\PDFTools.cs" />
+    <Compile Include="Helper\PDFToolsHelper.cs" />
     <Compile Include="Views\HomePanel\PDFTools\PDFToolsContent.xaml.cs">
       <DependentUpon>PDFToolsContent.xaml</DependentUpon>
     </Compile>
@@ -608,8 +609,8 @@
     <Compile Include="Views\HomePanel\RecentFiles\DocItemListViewControl.xaml.cs">
       <DependentUpon>DocItemListViewControl.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\HomePanel\RecentFiles\RecentFilesView.xaml.cs">
-      <DependentUpon>RecentFilesView.xaml</DependentUpon>
+    <Compile Include="Views\HomePanel\RecentFiles\RecentFilesContent.xaml.cs">
+      <DependentUpon>RecentFilesContent.xaml</DependentUpon>
     </Compile>
     <Compile Include="Views\MainContent.xaml.cs">
       <DependentUpon>MainContent.xaml</DependentUpon>
@@ -617,10 +618,10 @@
     <Compile Include="Views\PageEdit\PageEditContent.xaml.cs">
       <DependentUpon>PageEditContent.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\PropertyPanel\AnnotPanel\CommonControls\ColorContent.xaml.cs">
+    <Compile Include="CustomControl\CompositeControl\ColorContent.xaml.cs">
       <DependentUpon>ColorContent.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\PropertyPanel\AnnotPanel\CommonControls\SlidContentPop.xaml.cs">
+    <Compile Include="CustomControl\CompositeControl\SlidContentPop.xaml.cs">
       <DependentUpon>SlidContentPop.xaml</DependentUpon>
     </Compile>
     <Compile Include="Views\PropertyPanel\AnnotPanel\FreehandAnnotProperty.xaml.cs">
@@ -647,7 +648,7 @@
     <Compile Include="Views\PropertyPanel\AnnotPanel\TextEditProperty.xaml.cs">
       <DependentUpon>TextEditProperty.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\PropertyPanel\AnnotPanel\CommonControls\SlidContent.xaml.cs">
+    <Compile Include="CustomControl\CompositeControl\SlidContent.xaml.cs">
       <DependentUpon>SlidContent.xaml</DependentUpon>
     </Compile>
     <Compile Include="Views\PropertyPanel\PropertyPanelContent.xaml.cs">
@@ -967,7 +968,7 @@
     <Page Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterDialog.xaml">
       <SubType>Designer</SubType>
     </Page>
-    <Page Include="Views\PropertyPanel\AnnotPanel\CommonControls\ColorContent.xaml">
+    <Page Include="CustomControl\CompositeControl\ColorContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
@@ -983,7 +984,7 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\PropertyPanel\AnnotPanel\CommonControls\SlidContentPop.xaml">
+    <Page Include="CustomControl\CompositeControl\SlidContentPop.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
@@ -1055,7 +1056,7 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\PropertyPanel\AnnotPanel\CommonControls\SlidContent.xaml">
+    <Page Include="CustomControl\CompositeControl\SlidContent.xaml">
       <Generator>MSBuild:Compile</Generator>
     </Page>
     <Page Include="Views\EditTools\Watermark\WatermarkTemplateListFileContent.xaml">
@@ -1149,7 +1150,7 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
-    <Page Include="Views\HomePanel\RecentFiles\RecentFilesView.xaml">
+    <Page Include="Views\HomePanel\RecentFiles\RecentFilesContent.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>

+ 22 - 0
PDF Office/Properties/Settings.Designer.cs

@@ -65,5 +65,27 @@ namespace PDF_Office.Properties {
                 this["AppProperties"] = value;
             }
         }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        public global::PDFSettings.AllPDFToolsList AllPDFToolsList {
+            get {
+                return ((global::PDFSettings.AllPDFToolsList)(this["AllPDFToolsList"]));
+            }
+            set {
+                this["AllPDFToolsList"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        public global::PDFSettings.QuickPDFToolsList QuickPDFToolsList {
+            get {
+                return ((global::PDFSettings.QuickPDFToolsList)(this["QuickPDFToolsList"]));
+            }
+            set {
+                this["QuickPDFToolsList"] = value;
+            }
+        }
     }
 }

+ 6 - 0
PDF Office/Properties/Settings.settings

@@ -11,5 +11,11 @@
     <Setting Name="AppProperties" Type="PDFSettings.APPSettingProperties" Scope="User">
       <Value Profile="(Default)" />
     </Setting>
+    <Setting Name="AllPDFToolsList" Type="PDFSettings.AllPDFToolsList" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
+    <Setting Name="QuickPDFToolsList" Type="PDFSettings.QuickPDFToolsList" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
   </Settings>
 </SettingsFile>

+ 52 - 0
PDF Office/Styles/ButtonStyle.xaml

@@ -64,6 +64,58 @@
             </Setter.Value>
         </Setter>
     </Style>
+    
+    <!--只有内容的按钮(普通状态下,没有固定的边框和背景色)-->
+    <!--<Setter Property="Background" Value="{StaticResource Button.Static.Background}" />
+    <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}" />-->
+    <Style x:Key="OnlyContentBtn" TargetType="{x:Type Button}">
+        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
+        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
+        <Setter Property="Background" Value="Transparent"/>
+        <Setter Property="BorderBrush" Value="Transparent"/>
+        <Setter Property="Padding" Value="0" />
+        <Setter Property="Width" Value="32" />
+        <Setter Property="Height" Value="32" />
+        <Setter Property="IsTabStop" Value="False" />
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type Button}">
+                    <Border
+                        x:Name="border"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}"
+                        SnapsToDevicePixels="true">
+                        <ContentPresenter
+                            x:Name="contentPresenter"
+                            Margin="{TemplateBinding Padding}"
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Focusable="False"
+                            RecognizesAccessKey="True"
+                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
+                    </Border>
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="IsMouseOver" Value="true">
+                            <Setter TargetName="border" Property="Background" Value="{StaticResource Button.MouseOver.Background}" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.MouseOver.Border}" />
+                        </Trigger>
+                        <Trigger Property="IsPressed" Value="true">
+                            <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Pressed.Background}" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Pressed.Border}" />
+                        </Trigger>
+                        <Trigger Property="IsEnabled" Value="false">
+                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{StaticResource Button.Disabled.Foreground}" />
+                            <Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" />
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
 
     <!--  阅读模式的按钮模板样式  -->
     <ControlTemplate x:Key="zoomout" TargetType="{x:Type ButtonBase}">

+ 5 - 15
PDF Office/Styles/ListViewStyle.xaml

@@ -27,12 +27,13 @@
                                         <ColumnDefinition Width="2*" />
                                         <ColumnDefinition Width="100" />
                                     </Grid.ColumnDefinitions>
+                                    <!--以下是列表模式的列标题-->
                                     <TextBlock
                                         Margin="12,0,0,6"
                                         HorizontalAlignment="Left"
                                         VerticalAlignment="Center"
                                         FontSize="14" />
-                                    <!--  Text="{x:Static homePageUI:HomePage.RencentFiles_Name}"  -->
+
                                     <TextBlock
                                         Grid.Column="1"
                                         Margin="0,0,0,6"
@@ -41,17 +42,16 @@
                                         FontSize="14"
                                         TextAlignment="Center"
                                         TextWrapping="Wrap" />
-                                    <!--  Text="{x:Static homePageUI:HomePage.RencentFiles_LastOpenedTime}"  -->
                                     <TextBlock
                                         Grid.Column="2"
                                         Margin="0,0,0,6"
                                         HorizontalAlignment="Center"
                                         VerticalAlignment="Center"
                                         FontSize="14" />
-                                    <!--  Text="{x:Static homePageUI:HomePage.RencentFiles_Size}"  -->
+                                    <!--列表模式的列标题的分隔线-->
                                     <Rectangle
                                         Grid.ColumnSpan="4"
-                                        Height="1"
+                                        Height="0"
                                         Margin="12,0,0,0"
                                         HorizontalAlignment="Stretch"
                                         VerticalAlignment="Bottom"
@@ -68,17 +68,6 @@
 
     <Style x:Key="FilesListViewItemStyle" TargetType="{x:Type ListViewItem}">
         <Setter Property="UIElement.SnapsToDevicePixels" Value="True" />
-        <!--<Setter Property="Control.Padding" Value="4,1" />
-        <Setter Property="Control.HorizontalContentAlignment">
-        <Setter.Value>
-        <Binding Path="HorizontalContentAlignment" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ItemsControl, AncestorLevel=1}" />
-        </Setter.Value>
-        </Setter>
-        <Setter Property="Control.VerticalContentAlignment">
-        <Setter.Value>
-        <Binding Path="VerticalContentAlignment" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ItemsControl, AncestorLevel=1}" />
-        </Setter.Value>
-        </Setter>-->
         <Setter Property="Panel.Background" Value="#00FFFFFF" />
         <Setter Property="Border.BorderBrush" Value="#00FFFFFF" />
         <Setter Property="Border.BorderThickness" Value="1" />
@@ -147,6 +136,7 @@
                                 ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
                                 ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
                                 SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
+                            <Rectangle Grid.Column="1" Height="1" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Fill="#C5CBD3"/>
                         </Grid>
                     </Border>
                     <ControlTemplate.Triggers>

+ 74 - 0
PDF Office/Styles/RadioButtonStyle.xaml

@@ -185,4 +185,78 @@
             </Setter.Value>
         </Setter>
     </Style>
+
+    <!--最近列表列表模式单选按钮-->
+    <Style x:Key="ListModeRadioBtnStyle" TargetType="{x:Type RadioButton}">
+        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
+        <Setter Property="Background" Value="{StaticResource RadioButton.Static.Background}"/>
+        <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Static.Border}"/>
+        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type RadioButton}">
+                    <Border CornerRadius="4" x:Name="root" Background="#EEF2F3">
+                   
+                        <Grid x:Name="templateRoot" SnapsToDevicePixels="True" VerticalAlignment="Center" HorizontalAlignment="Center">
+
+                            <Grid.ColumnDefinitions>
+                                <ColumnDefinition Width="Auto"/>
+                                <ColumnDefinition Width="*"/>
+                            </Grid.ColumnDefinitions>
+                            <Border x:Name="radioButtonBorder" Visibility="Collapsed" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="100" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1,1,2,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
+                                <Grid x:Name="markGrid" Margin="2">
+                                    <Ellipse x:Name="optionMark" Fill="{StaticResource RadioButton.Static.Glyph}" MinWidth="6" MinHeight="6" Opacity="0"/>
+                                </Grid>
+                            </Border>
+
+                            <ContentPresenter x:Name="contentPresenter" Grid.Column="1" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
+                            </ContentPresenter>
+                        </Grid>
+
+                    </Border>
+
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="HasContent" Value="true">
+                            <Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}"/>
+                            <Setter Property="Padding" Value="4,-1,0,0"/>
+                        </Trigger>
+                        <Trigger Property="IsMouseOver" Value="true">
+                            <Setter Property="Background" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.MouseOver.Background}"/>
+                            <Setter Property="BorderBrush" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.MouseOver.Border}"/>
+                            <Setter Property="Fill" TargetName="optionMark" Value="{StaticResource RadioButton.MouseOver.Glyph}"/>
+                        </Trigger>
+                        <Trigger Property="IsEnabled" Value="false">
+                            <Setter Property="Background" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.Disabled.Background}"/>
+                            <Setter Property="BorderBrush" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.Disabled.Border}"/>
+                            <Setter Property="Fill" TargetName="optionMark" Value="{StaticResource RadioButton.Disabled.Glyph}"/>
+                            <Setter Property="Border.Background" TargetName="root">
+                                <Setter.Value>
+                                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
+                                        <GradientStop Color="White" Offset="0.0" />
+                                        <GradientStop Color="#CFCFCF" Offset="0.5" />
+                                        <GradientStop Color="White" Offset="0.0" />
+                                    </LinearGradientBrush>
+                                </Setter.Value>
+                            </Setter>
+                        </Trigger>
+                        <Trigger Property="IsPressed" Value="true">
+                            <Setter Property="Background" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.Pressed.Background}"/>
+                            <Setter Property="BorderBrush" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.Pressed.Border}"/>
+                            <Setter Property="Fill" TargetName="optionMark" Value="{StaticResource RadioButton.Pressed.Glyph}"/>
+                        </Trigger>
+                        <Trigger Property="IsChecked" Value="true">
+                            <Setter Property="Opacity" TargetName="optionMark" Value="1"/>
+                            <Setter Property="Border.Background" TargetName="root" Value="White">
+                              
+                            </Setter>
+                        </Trigger>
+                        <Trigger Property="IsChecked" Value="{x:Null}">
+                            <Setter Property="Opacity" TargetName="optionMark" Value="0.56"/>
+
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
 </ResourceDictionary>

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

@@ -1,10 +1,12 @@
 using ComPDFKit.PDFDocument;
 using ComPDFKitViewer.PdfViewer;
 using PDF_Office.CustomControl;
+using PDF_Office.Helper;
 using PDF_Office.Model;
 using PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing;
 using PDF_Office.Model.PDFTool;
 using PDF_Office.Views.HomePanel.PDFTools;
+using PDFSettings;
 using Prism.Commands;
 using Prism.Mvvm;
 using Prism.Services.Dialogs;
@@ -36,11 +38,11 @@ namespace PDF_Office.ViewModels.HomePanel
             System.Windows.Forms.OpenFileDialog dlg = new System.Windows.Forms.OpenFileDialog();
             dlg.Multiselect = false;
             dlg.Filter = "PDF|*.pdf;*.PDF;";
-            if (toolItem.Tag == PDFToolType.Compress || toolItem.Tag == PDFToolType.Security)
+            if (toolItem.Tag == (int)PDFToolType.Compress || toolItem.Tag == (int)PDFToolType.Security)
             {
                 dlg.Multiselect = true;
             }
-                if (toolItem.Tag == PDFToolType.Merge)
+                if (toolItem.Tag == (int)PDFToolType.Merge)
             {
                 dlg.Multiselect = true;
                 dlg.Filter = "Picture|*.png;*.PNG;*.jpg;*.JPG;*bmp;*jpeg;*gif;*tiff;";
@@ -49,7 +51,7 @@ namespace PDF_Office.ViewModels.HomePanel
             {
                 CPDFViewer viewer = new CPDFViewer();
                 
-                switch (toolItem.Tag)
+                switch ((PDFToolType)toolItem.Tag)
                 {
                     case PDFToolType.Split:
                         

+ 359 - 0
PDF Office/ViewModels/HomePanel/RecentFiles/RecentFilesContentViewModel.cs

@@ -0,0 +1,359 @@
+using Microsoft.Win32;
+using PDF_Office.CustomControl;
+using PDF_Office.Helper;
+using PDF_Office.Properties;
+using PDF_Office.Views;
+using PDFSettings.Settings;
+using Prism.Commands;
+using Prism.Mvvm;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using winform = System.Windows.Forms;
+
+namespace PDF_Office.ViewModels.HomePanel.RecentFiles
+{
+    public class RecentFilesContentViewModel: BindableBase
+    {
+        #region 属性
+
+        private ObservableCollection<OpenFileInfo> _recentFilesGroup = new ObservableCollection<OpenFileInfo>();
+        /// <summary>
+        /// 最近列表:文件集合
+        /// </summary>
+        public ObservableCollection<OpenFileInfo> RecentFilesGroup
+        {
+            get { return _recentFilesGroup; }
+            set
+            {
+                SetProperty(ref _recentFilesGroup, value);
+            }
+        }
+
+        private bool _isEmpty = false;
+        /// <summary>
+        /// 最近列表是否为空
+        /// </summary>
+        public bool IsEmpty
+        {
+            get { return _isEmpty; }
+            set
+            {
+                SetProperty(ref _isEmpty, value);
+            }
+        }
+
+
+        private bool _isListMode = false;
+        /// <summary>
+        /// 是否为列表模式
+        /// </summary>
+        public bool IsListMode
+        {
+            get { return _isListMode; }
+            set
+            {
+                SetProperty(ref _isListMode, value);
+            }
+        }
+
+        #endregion
+
+        public DelegateCommand<object> RemoveFileItemCommand { get; set; }
+        public DelegateCommand<object> RemoveFilesFromContainerCommand { get; set; }
+        public DelegateCommand<object> OpenRecentFilesCommand { get; set; }
+        public DelegateCommand<object> OpenFilesCommand { get; set; }
+
+        public DelegateCommand<object> ListModeCheckedCommand { get; set; }
+
+        public DelegateCommand<object> ExplorerFileCommand { get; set; }
+
+        public event EventHandler<bool> RecentFilesSelectionHandler;
+        public RecentFilesContentViewModel()
+        {
+            InitVariables();
+            InitCommands();
+            InitEvents();
+        }
+
+        #region 初始化
+        private void InitVariables()
+        {
+            RecentFilesGroup = new ObservableCollection<OpenFileInfo>(Settings.Default.RecentOpenFiles);
+            RecentFileGroupIsEmpty();
+
+            int mode = Settings.Default.AppProperties.RecentFileListMode;
+            if (mode == 0)
+                IsListMode = false;
+            else
+                IsListMode = true;
+        }
+
+        private void InitCommands()
+        {
+            RemoveFilesFromContainerCommand = new DelegateCommand<object>(RemoveFilesFromContainer_Command);
+            RemoveFileItemCommand = new DelegateCommand<object>(RemoveFileItem_Command);
+            OpenRecentFilesCommand = new DelegateCommand<object>(OpenRecentFiles_Command);
+            ListModeCheckedCommand = new DelegateCommand<object>(ListMode_Checked);
+            OpenFilesCommand = new DelegateCommand<object>(OpenFiles_Command);
+            ExplorerFileCommand = new DelegateCommand<object>(ExplorerFile_Command);
+        }
+
+        private void InitEvents()
+        {
+            RecentFilesGroup.CollectionChanged -= RecentFilesGroup_CollectionChanged;
+            RecentFilesGroup.CollectionChanged += RecentFilesGroup_CollectionChanged;
+        }
+
+        private void RecentFilesGroup_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
+        {
+            RecentFileGroupIsEmpty();
+        }
+
+        private void RecentFileGroupIsEmpty()
+        {
+            if (RecentFilesGroup.Count == 0)
+            {
+                IsEmpty = true;
+            }
+            else
+            {
+                IsEmpty = false;
+            }
+        }
+
+        #endregion
+
+        /// <summary>
+        /// 最近列表:文件列表模式选中事件
+        /// </summary>
+        /// <param name="obj"></param>
+        private void ListMode_Checked(object obj)
+        {
+            if (obj is string)
+            {
+                var tag = obj as string;
+                if (tag == "ListMode")
+                {
+                    IsListMode = true;
+                    Settings.Default.AppProperties.RecentFileListMode = 1;
+                }
+                else
+                {
+                    IsListMode = false;
+                    Settings.Default.AppProperties.RecentFileListMode = 0;
+                }
+                Settings.Default.Save();
+                RecentFilesSelectionHandler?.Invoke(null, IsListMode);
+            }
+        }
+
+        /// <summary>
+        /// 移除文件记录:单个文件
+        /// </summary>
+        /// <param name="obj"></param>
+        private void RemoveFileItem_Command(object obj)
+        {
+            var openFileInfo = obj as OpenFileInfo;
+            if (openFileInfo != null)
+            {
+                SettingHelper.RemoveRecentOpenFile(openFileInfo.FilePath);
+                RecentFilesGroup.Remove(openFileInfo);
+            }
+        }
+
+        /// <summary>
+        /// 删除按钮触发事件:选中的文件
+        /// </summary>
+        /// <param name="obj">选中的文档</param>
+        private void RemoveFilesFromContainer_Command(object obj)
+        {
+            System.Collections.IList items = (System.Collections.IList)obj;
+            if (items == null || items.Cast<OpenFileInfo>() == null)
+                return;
+
+            var collection = items.Cast<OpenFileInfo>();
+            var openFileInfo = collection.ToList();
+            if(openFileInfo != null)
+            {
+                string msg = "";
+                int SelectedItemsType = 0;
+
+                if (openFileInfo.Count == RecentFilesGroup.Count || openFileInfo.Count == 0)
+                {
+                    if(openFileInfo.Count == 1 && RecentFilesGroup.Count == 1)
+                        msg = "ClearFile";
+                    else
+                        msg = "AllClearFiles";
+
+                    SelectedItemsType = 0;
+                }
+                else if(openFileInfo.Count == 1)
+                {
+                    msg = "ClearFile";
+                    SelectedItemsType = 1;
+                }
+                else
+                {
+                    msg = "ClearSelectedFiles";
+                    SelectedItemsType = 2;
+                }
+
+                winform.DialogResult result = MessageBoxEx.Show(msg, "", winform.MessageBoxButtons.OKCancel, winform.MessageBoxIcon.Question);
+                if (result == winform.DialogResult.OK)
+                {
+                    RemoveRecentFilesFrom(SelectedItemsType, openFileInfo);
+                }
+
+
+            }
+        }
+
+        /// <summary>
+        ///  删除最近文件的操作
+        /// </summary>
+        /// <param name="selectedItemsType">0:全部文件;1:一个文件;2:多个文件</param>
+        /// <param name="openFileInfo">选中的文件</param>
+        private void RemoveRecentFilesFrom(int selectedItemsType, List<OpenFileInfo> openFileInfo)
+        {
+            if (selectedItemsType == 0)
+            {
+                SettingHelper.RemoveAllRecentOpenFiles();
+                   RecentFilesGroup.Clear();
+            }
+            else if (selectedItemsType == 1)
+            {
+                var file = openFileInfo[0] as OpenFileInfo;
+                SettingHelper.RemoveRecentOpenFile(file.FilePath);
+                  RecentFilesGroup.Remove(file);
+            }
+            else
+            {
+                foreach (var item in openFileInfo)
+                {
+                    SettingHelper.RemoveRecentOpenFile(item.FilePath);
+                     RecentFilesGroup.Remove(item);
+                }
+            }
+        }
+
+        /// <summary>
+        /// 空状态时,点击文件浏览器弹窗,打开文件
+        /// </summary>
+        private void OpenFiles_Command(object obj)
+        {
+            var dlg = new OpenFileDialog();
+            dlg.Multiselect = true;
+            dlg.Filter = Properties.Resources.OpenDialogFilter;
+
+            if (dlg.ShowDialog() == true)
+            {
+                LoadPdfViewer(dlg.FileNames);
+            }
+        }
+
+        /// <summary>
+        /// 打开文件路径
+        /// </summary>
+        private void ExplorerFile_Command(object obj)
+        {
+            try
+            {
+                var fileInfo = obj as OpenFileInfo;
+                if (fileInfo != null)
+                {
+                    if (string.IsNullOrEmpty(fileInfo.FilePath) == false)
+                    {
+                        if (!File.Exists(fileInfo.FilePath))
+                        {
+                            MessageBoxEx.Show("文件不存在");
+                            SettingHelper.RemoveRecentOpenFile(fileInfo.FilePath);
+                            RecentFilesGroup.Remove(fileInfo);
+                        }
+                        else
+                        {
+                            Process.Start("explorer", "/select,\"" + fileInfo.FilePath + "\"");
+                        }
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+
+            }
+            
+        }
+
+        /// <summary>
+        /// 从最近列表里,打开文档
+        /// </summary>
+        /// <param name="obj"></param>
+        private void OpenRecentFiles_Command(object obj)
+        {
+            var fileInfo = obj as OpenFileInfo;
+            if (fileInfo != null)
+            {
+                if (File.Exists(fileInfo.FilePath))
+                {
+                    string[] filePath = new string[1];
+                    filePath[0] = fileInfo.FilePath;
+                    LoadPdfViewer(filePath);
+                }
+                else
+                {
+                    SettingHelper.RemoveRecentOpenFile(fileInfo.FilePath);
+                    RecentFilesGroup.Remove(fileInfo);
+                }
+
+            }
+
+        }
+
+        /// <summary>
+        /// 打开文档
+        /// </summary>
+        /// <param name="filePaths"></param>
+        public void LoadPdfViewer(string[] filePaths)
+        {
+            var content = App.mainWindowViewModel.SelectedItem.DataContext as MainContentViewModel;
+            if (filePaths.Count() == 1)
+            {
+                if (App.OpenedFileList.Contains(filePaths[0]))
+                {
+                    App.mainWindowViewModel.SelectItem(filePaths[0]);
+                }
+                else
+                {
+                    content.OpenFile(filePaths[0]);
+                }
+                ToolMethod.SetFileThumbImg(filePaths[0]);
+            }
+            else
+            {
+                var fileList = filePaths.ToList().Where(x => !App.OpenedFileList.Exists(y => y == x)).ToList();
+                if (fileList.Count <= 0)
+                    return;
+
+                content.OpenFile(filePaths[0]);
+                for (int i = 1; i < fileList.Count(); i++)
+                {
+                    if (!App.OpenedFileList.Contains(fileList[i]))
+                    {
+                        App.mainWindowViewModel.AddTabItem(fileList[i]);
+                    }
+                    ToolMethod.SetFileThumbImg(fileList[i]);
+                }
+            }
+
+            Settings.Default.Save();
+        }
+
+    }
+}

+ 2 - 0
PDF Office/ViewModels/PageEdit/PageEditContentViewModel.cs

@@ -624,6 +624,8 @@ namespace PDF_Office.ViewModels.PageEdit
             {
                 PageEditItems[i].ItemSize = newsize;
             }
+            //缩略图模式 调整item大小的时候,更新选中项
+            NotifyUIToRefresh(new List<int>() { PDFViewer.CurrentIndex + 1 });
         }
 
         private bool CanZoomIn()

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

@@ -22,7 +22,7 @@
                     <RowDefinition />
                 </Grid.RowDefinitions>
                 <pDFTools:QuickToolsContent x:Name="hometool" Margin="32,32,0,0"/>
-                <recentFiles:RecentFilesView x:Name="Recentlist" Grid.Row="1" Margin="0,0,32,0" />
+                <recentFiles:RecentFilesContent x:Name="Recentlist" Grid.Row="1" Margin="0,0,32,0" />
             </Grid>
         </ScrollViewer>
     </Grid>

+ 3 - 3
PDF Office/Views/HomePanel/PDFTools/PDFToolItem.xaml

@@ -6,7 +6,6 @@
              xmlns:local="clr-namespace:PDF_Office.Views.HomePanel"
              xmlns:convert="clr-namespace:PDF_Office.DataConvert"
              mc:Ignorable="d" 
-             x:Name="usercontrol"
              d:DesignHeight="450" d:DesignWidth="800">
     <UserControl.Resources>
         <convert:BoolToVisible x:Key="boolToVisible"/>
@@ -15,7 +14,7 @@
     <Grid  Margin="1,1,1,1">
 
         <Border x:Name="BorderExtend" Height="108"  CornerRadius="8" Background="White" BorderThickness="2" 
-                Visibility="{Binding ElementName=usercontrol,Path=IsShowConciseContent,Converter={StaticResource invertBoolToVisibleConvert}}">
+                Visibility="{Binding IsShowConciseContent,Converter={StaticResource invertBoolToVisibleConvert}}">
 
             <Grid  Background="Transparent" MouseEnter="Border_MouseEnter" MouseLeave="Border_MouseLeave">
                 <Grid Margin="10">
@@ -45,7 +44,8 @@
             </Grid>
         </Border>
 
-        <Border x:Name="BorderConcise" Height="64"  CornerRadius="8" Background="White" BorderThickness="2" BorderBrush="#04000000" Visibility="{Binding ElementName=usercontrol,Path=IsShowConciseContent,Converter={StaticResource boolToVisible}}">
+        <Border x:Name="BorderConcise" Height="64"  CornerRadius="8" Background="White" BorderThickness="2" BorderBrush="#04000000" 
+                Visibility="{Binding IsShowConciseContent,Converter={StaticResource boolToVisible}}">
             <Grid Background="Transparent" MouseEnter="Border_MouseEnter" MouseLeave="Border_MouseLeave">
                 <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="auto"/>

+ 0 - 18
PDF Office/Views/HomePanel/PDFTools/PDFToolItem.xaml.cs

@@ -179,23 +179,5 @@ namespace PDF_Office.Views.HomePanel.PDFTools
         }
         public static readonly DependencyProperty ToolInfoProperty = DependencyProperty.Register("ToolInfo", typeof(string), typeof(PDFToolItem), new PropertyMetadata(string.Empty));
 
-
-        /// <summary>
-        /// 是否收缩UI
-        /// </summary>
-        public bool IsShowConciseContent
-        {
-            get
-            {
-                return (bool)GetValue(IsShowConciseContentProperty);
-            }
-            set
-            {
-                SetValue(IsShowConciseContentProperty, value);
-            }
-        }
-        public static readonly DependencyProperty IsShowConciseContentProperty = DependencyProperty.Register("IsShowConciseContent", typeof(bool), typeof(PDFToolItem), new PropertyMetadata(false));
-
-
     }
 }

+ 7 - 11
PDF Office/Views/HomePanel/PDFTools/PDFToolsContent.xaml

@@ -14,6 +14,7 @@
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
                 <ResourceDictionary Source="../../../Styles/CustomListItemStyle.xaml"/>
+                <ResourceDictionary Source="../../../Styles/CustomBtnStyle.xaml"/>
             </ResourceDictionary.MergedDictionaries>
             <converter:BoolToVisible x:Key="BoolToVisibilityConverter" />
 
@@ -73,17 +74,12 @@
 
                     </Button>
 
-
-                    <Button
-                x:Name="BtnMore"
-                Width="28"
-                Height="28"
-                Margin="12,0,0,0"
-                 Background="#FFFFFF" BorderThickness="0" Content="..."
-                Click="BtnMore_Click"
-               >
-                    </Button>
-
+                    <customControl:CustomIconToggleBtn x:Name="BtnExptend"  Click="BtnExptend_Click"
+                                                        Style="{StaticResource ToggleBtnViewModeStyle}"
+                                                       >
+                        <TextBlock Text="展开"/>
+                    </customControl:CustomIconToggleBtn>
+                    
                 </StackPanel>
             </Grid>
            

+ 30 - 40
PDF Office/Views/HomePanel/PDFTools/PDFToolsContent.xaml.cs

@@ -2,6 +2,7 @@
 using PDF_Office.Helper;
 using PDF_Office.Model.PDFTool;
 using PDF_Office.ViewModels.HomePanel;
+using PDFSettings;
 using System;
 using System.Collections.Generic;
 using System.IO;
@@ -34,7 +35,7 @@ namespace PDF_Office.Views.HomePanel.PDFTools
         private List<ToolItem> quickTools = null;
         private List<ToolItem> allTools = null;
         private List<ToolItem> moreTools = null;
-        PDFTools PDFtools;
+        PDFToolsHelper PDFtools;
 
         private string fileName = string.Empty;
         private BitmapSource bitmapSource = null;
@@ -47,7 +48,7 @@ namespace PDF_Office.Views.HomePanel.PDFTools
         public PDFToolsContent()
         {
             InitializeComponent();
-            PDFtools = new PDFTools();
+            PDFtools = new PDFToolsHelper();
 
 
             #region ListBox
@@ -496,34 +497,34 @@ namespace PDF_Office.Views.HomePanel.PDFTools
             }
         }
 
-        /// <summary>
-        /// 扩展收缩UI
-        /// </summary>
-        /// <param name="IsShowConciseContent">是否收缩</param>
-        private void ShowToolsUI(ListBoxEx list,bool IsShowConciseContent)
-        {
-            foreach (var item in list.Items)
-            {
+        ///// <summary>
+        ///// 扩展收缩UI
+        ///// </summary>
+        ///// <param name="IsShowConciseContent">是否收缩</param>
+        //private void ShowToolsUI(ListBoxEx list,bool IsShowConciseContent)
+        //{
+        //    foreach (var item in list.Items)
+        //    {
 
-                var listBoxItem = list.ItemContainerGenerator.ContainerFromItem(item) as ListBoxItem;
-                if (listBoxItem != null)
-                {
+        //        var listBoxItem = list.ItemContainerGenerator.ContainerFromItem(item) as ListBoxItem;
+        //        if (listBoxItem != null)
+        //        {
 
-                    var viewItem = listBoxItem.ContentTemplate;
-                    var myContentPresenter = CommonHelper.FindVisualChild<ContentPresenter>(listBoxItem);
-                    var obj = viewItem.FindName("data", myContentPresenter);
+        //            var viewItem = listBoxItem.ContentTemplate;
+        //            var myContentPresenter = CommonHelper.FindVisualChild<ContentPresenter>(listBoxItem);
+        //            var obj = viewItem.FindName("data", myContentPresenter);
 
-                    var checkNum = obj as PDFToolItem;
+        //            var checkNum = obj as PDFToolItem;
 
-                    if (checkNum != null)
-                    {
-                        checkNum.IsShowConciseContent = IsShowConciseContent;
-                    }
+        //            if (checkNum != null)
+        //            {
+        //                checkNum.IsShowConciseContent = IsShowConciseContent;
+        //            }
 
-                }
-            }
+        //        }
+        //    }
 
-        }
+        //}
 
 
         private void ListBoxShortCuts_SizeChanged(object sender, SizeChangedEventArgs e)
@@ -566,27 +567,16 @@ namespace PDF_Office.Views.HomePanel.PDFTools
 
         private void BtnTools_Click(object sender, RoutedEventArgs e)
         {
-
+           
         }
 
-        bool isExtend = false;
-        private void BtnMore_Click(object sender, RoutedEventArgs e)
+
+        private void BtnExptend_Click(object sender, RoutedEventArgs e)
         {
-            if(isExtend)
-            {
-                isExtend = false;
-                ShowToolsUI(ListShortCuts, false);
-                ShowToolsUI(ListMoreCuts, false);
-            }
-            else
+            foreach (var item in allTools)
             {
-                isExtend = true;
-                ShowToolsUI(ListShortCuts, true);
-                ShowToolsUI(ListMoreCuts, true);
+                item.IsShowConciseContent = (bool)BtnExptend.IsChecked;
             }
-           
-           
-
         }
 
 

+ 18 - 17
PDF Office/Views/HomePanel/PDFTools/QuickToolsContent.xaml.cs

@@ -3,6 +3,7 @@ using PDF_Office.Helper;
 using PDF_Office.Model.PDFTool;
 using PDF_Office.ViewModels.HomePanel;
 using PDF_Office.Views.HomePanel.PDFTools;
+using PDFSettings;
 using System.Collections.Generic;
 using System.Windows;
 using System.Windows.Controls;
@@ -16,11 +17,11 @@ namespace PDF_Office.Views.HomePanel.PDFTools
     /// </summary>
     public partial class QuickToolsContent : UserControl
     {
-        PDFTools PDFtools;
+        PDFToolsHelper PDFtools;
         public QuickToolsContent()
         {
             InitializeComponent();
-            PDFtools = new PDFTools();
+            PDFtools = new PDFToolsHelper();
             ListBoxToolBars.ItemsSource = PDFtools.QuickTools;
         }
    
@@ -46,26 +47,26 @@ namespace PDF_Office.Views.HomePanel.PDFTools
         /// <param name="IsShowConciseContent">是否收缩</param>
         private void ShowToolsUI(bool IsShowConciseContent)
         {
-            foreach (var item in ListBoxToolBars.Items)
-            {
+            //foreach (var item in ListBoxToolBars.Items)
+            //{
                
-                var listBoxItem = ListBoxToolBars.ItemContainerGenerator.ContainerFromItem(item) as ListBoxItem;
-                if (listBoxItem != null)
-                {
+            //    var listBoxItem = ListBoxToolBars.ItemContainerGenerator.ContainerFromItem(item) as ListBoxItem;
+            //    if (listBoxItem != null)
+            //    {
                    
-                    var viewItem = listBoxItem.ContentTemplate;
-                    var myContentPresenter = CommonHelper.FindVisualChild<ContentPresenter>(listBoxItem);
-                    var obj = viewItem.FindName("data", myContentPresenter);
+            //        var viewItem = listBoxItem.ContentTemplate;
+            //        var myContentPresenter = CommonHelper.FindVisualChild<ContentPresenter>(listBoxItem);
+            //        var obj = viewItem.FindName("data", myContentPresenter);
 
-                    var checkNum = obj as PDFToolItem;
+            //        var checkNum = obj as PDFToolItem;
 
-                    if (checkNum != null)
-                    {
-                        checkNum.IsShowConciseContent = IsShowConciseContent;
-                    }
+            //        if (checkNum != null)
+            //        {
+            //            checkNum.IsShowConciseContent = IsShowConciseContent;
+            //        }
 
-                }
-            }
+            //    }
+            //}
             
         }
 

File diff suppressed because it is too large
+ 19 - 58
PDF Office/Views/HomePanel/RecentFiles/DocItemListViewControl.xaml


+ 14 - 25
PDF Office/Views/HomePanel/RecentFiles/DocItemListViewControl.xaml.cs

@@ -27,10 +27,7 @@ namespace PDF_Office.Views.HomePanel.RecentFiles
     public partial class DocItemListViewControl : UserControl
     {
         public event EventHandler<RoutedEventArgs> DeleteItemHandler;
-        public event EventHandler<RoutedEventArgs> PrintItemHandler;
-        public event EventHandler<RoutedEventArgs> FileInfoItemHandler;
-        public event EventHandler<RoutedEventArgs> ShareItemHandler;
-        public event EventHandler<RoutedEventArgs> FilePathItemHandler;
+        public event EventHandler<RoutedEventArgs> OpenFileItemHandler;
 
         public DocItemListViewControl()
         {
@@ -55,17 +52,17 @@ namespace PDF_Office.Views.HomePanel.RecentFiles
 
         private void UserControl_MouseEnter(object sender, MouseEventArgs e)
         {
-            IsHoverState = true;
+           // IsHoverState = true;
         }
 
         private void UserControl_MouseLeave(object sender, MouseEventArgs e)
         {
-            IsHoverState = false;
+           // IsHoverState = false;
         }
 
         private void UserControl_MouseMove(object sender, MouseEventArgs e)
         {
-            IsHoverState = true;
+           // IsHoverState = true;
         }
 
         private void MoreButton_Initialized(object sender, EventArgs e)
@@ -83,20 +80,7 @@ namespace PDF_Office.Views.HomePanel.RecentFiles
         #endregion
 
         #region 事件
-        private void MenuPrint_Click(object sender, RoutedEventArgs e)
-        {
-            PrintItemHandler.Invoke(sender, e);
-        }
-
-        private void MenuShare_Click(object sender, RoutedEventArgs e)
-        {
-            ShareItemHandler.Invoke(sender, e);
-        }
 
-        private void MenuFileInfo_Click(object sender, RoutedEventArgs e)
-        {
-            FileInfoItemHandler.Invoke(sender, e);
-        }
         #endregion
 
         private void DeleteButton_Click(object sender, RoutedEventArgs e)
@@ -104,10 +88,7 @@ namespace PDF_Office.Views.HomePanel.RecentFiles
             DeleteItemHandler.Invoke(sender, e);
         }
 
-        private void MenuFilePath_Click(object sender, RoutedEventArgs e)
-        {
-            FilePathItemHandler.Invoke(sender, e);
-        }
+
 
         private void MenuMore_Loaded(object sender, RoutedEventArgs e)
         {
@@ -136,6 +117,14 @@ namespace PDF_Office.Views.HomePanel.RecentFiles
 
         }
 
-     
+        private void MenuOpenFile_Click(object sender, RoutedEventArgs e)
+        {
+            OpenFileItemHandler?.Invoke(sender, e);
+        }
+
+        private void MenuDelete_Click(object sender, RoutedEventArgs e)
+        {
+            DeleteItemHandler?.Invoke(sender, e);
+        }
     }
 }

File diff suppressed because it is too large
+ 102 - 83
PDF Office/Views/HomePanel/RecentFiles/RecentFilesView.xaml


+ 201 - 0
PDF Office/Views/HomePanel/RecentFiles/RecentFilesContent.xaml.cs

@@ -0,0 +1,201 @@
+using ComPDFKitViewer.PdfViewer;
+using Microsoft.Win32;
+using PDF_Office.CustomControl;
+using PDF_Office.Helper;
+using PDF_Office.Properties;
+using PDF_Office.ViewModels.HomePanel.RecentFiles;
+using PDFSettings.Settings;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Diagnostics;
+using System.IO;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Navigation;
+using winform = System.Windows.Forms;
+
+namespace PDF_Office.Views.HomePanel.RecentFiles
+{
+    public partial class RecentFilesContent : UserControl
+    {
+        private RecentFilesContentViewModel ViewModel => DataContext as RecentFilesContentViewModel;
+        public RecentFilesContent()
+        {
+            InitializeComponent();
+        }
+
+        #region 初始化
+        private void UserControl_Loaded(object sender, RoutedEventArgs e)
+        {
+            InitVariables();
+            InitEvents();
+        }
+
+        private void InitVariables()
+        {
+            if (RecentFilesList.SelectedItems != null)
+                RecentFilesList.SelectedItems.Clear();
+
+            if (GridRecentFilesList.SelectedItems != null)
+                GridRecentFilesList.SelectedItems.Clear();
+        }
+        private void InitEvents()
+        {
+            ViewModel.RecentFilesSelectionHandler -= ViewModel_RecentFilesSelection;
+            ViewModel.RecentFilesSelectionHandler += ViewModel_RecentFilesSelection;
+        }
+        #endregion
+
+        #region UI操作
+        private void ViewModel_RecentFilesSelection(object sender, bool e)
+        {
+            if (e)
+            {
+                RecentFilesList.SelectedItems.Clear();
+                if (GridRecentFilesList.SelectedItems.Count > 0)
+                {
+                    for (int i = 0; i < GridRecentFilesList.SelectedItems.Count; i++)
+                    {
+                        RecentFilesList.SelectedItems.Add(GridRecentFilesList.SelectedItems[i]);
+                    }
+
+                }
+            }
+            else
+            {
+                GridRecentFilesList.SelectedItems.Clear();
+                if (RecentFilesList.SelectedItems.Count > 0)
+                {
+                    for (int i = 0; i < RecentFilesList.SelectedItems.Count; i++)
+                    {
+                        GridRecentFilesList.SelectedItems.Add(RecentFilesList.SelectedItems[i]);
+                    }
+
+                }
+            }
+        }
+
+        private void ContextMenu_Opened(object sender, RoutedEventArgs e)
+        {
+            try
+            {
+                var contexMenu = sender as ContextMenu;
+                if (contexMenu != null)
+                {
+                    foreach (var item in contexMenu.Items)
+                    {
+                        var menuitem = item as MenuItem;
+                        menuitem.Visibility = Visibility.Visible;
+                    }
+                }
+                if (RecentFilesList.SelectedItems.Count >= 2)
+                {
+                    foreach (var item in contexMenu.Items)
+                    {
+                        var menuitem = item as MenuItem;
+                        if (menuitem.Name == "FilePathMenuItem")
+                            menuitem.Visibility = Visibility.Collapsed;
+                    }
+                }
+            }
+            catch { }
+        }
+
+        /// <summary>
+        /// 禁用触发鼠标右键,列表项被选中
+        /// </summary>
+        private void ListViewItem_PreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
+        {
+            Trace.WriteLine("Preview MouseRightButtonDown");
+            e.Handled = true;
+        }
+
+        #endregion
+
+
+        #region Events
+
+
+        /// <summary>
+        /// 右键菜单:删除文件记录
+        /// </summary>
+        private void DeleteMenuItem_Click(object sender, RoutedEventArgs e)
+        {
+            if (RecentFilesList.SelectedItems == null || RecentFilesList.SelectedItems.Count == 0)
+            {
+                var item = (sender as MenuItem).DataContext as OpenFileInfo;
+                if (item != null)
+                {
+                    ViewModel?.RemoveFileItemCommand.Execute(item);
+                }
+            }
+            else
+            {
+                ViewModel?.RemoveFilesFromContainerCommand.Execute(RecentFilesList.SelectedItems);
+            }
+
+        }
+
+        /// <summary>
+        /// 右键菜单:打开文件路径
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void FilePathMenuItem_Click(object sender, RoutedEventArgs e)
+        {
+            if ((sender as MenuItem) != null)
+            {
+                var menuItem = sender as MenuItem;
+                var file = menuItem.DataContext as OpenFileInfo;
+                ViewModel?.ExplorerFileCommand.Execute(file);
+            }
+        }
+
+        /// <summary>
+        /// 双击打开最近列表
+        /// </summary>
+        private void RecentFilesList_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
+        {
+            var item = sender as ListViewItem;
+            if (item != null && (item.DataContext as OpenFileInfo) != null)
+            {
+                var fileInfo = item.DataContext as OpenFileInfo;
+                if(fileInfo != null)
+                {
+                    ViewModel?.OpenRecentFilesCommand.Execute(fileInfo);
+                }
+            }
+
+        }
+
+        /// <summary>
+        /// 文件列表项:打开文件
+        /// </summary>
+        private void DocItemListViewControl_OpenFileItemHandler(object sender, RoutedEventArgs e)
+        {
+            var item = (sender as MenuItem).DataContext as OpenFileInfo;
+            if (item != null)
+            {
+                ViewModel?.OpenRecentFilesCommand.Execute(item);
+            }
+        }
+
+        /// <summary>
+        ///  文件列表项:删除文件记录
+        /// </summary>
+        private void DocItemListViewControl_DeleteItemHandler(object sender, RoutedEventArgs e)
+        {
+            var item = (sender as MenuItem).DataContext as OpenFileInfo;
+            if (item != null)
+            {
+                ViewModel?.RemoveFileItemCommand.Execute(item);
+            }
+        }
+
+        #endregion
+    }
+}

+ 0 - 382
PDF Office/Views/HomePanel/RecentFiles/RecentFilesView.xaml.cs

@@ -1,382 +0,0 @@
-using ComPDFKitViewer.PdfViewer;
-using Microsoft.Win32;
-using PDF_Office.CustomControl;
-using PDF_Office.Helper;
-using PDF_Office.Properties;
-using PDFSettings.Settings;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Diagnostics;
-using System.IO;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Input;
-using System.Windows.Interop;
-using System.Windows.Navigation;
-using winform = System.Windows.Forms;
-
-namespace PDF_Office.Views.HomePanel.RecentFiles
-{
-    public partial class RecentFilesView : UserControl
-    {
-       
-        private ObservableCollection<OpenFileInfo> RecentFilesGroup = new ObservableCollection<OpenFileInfo>();
-        public RecentFilesView()
-        {
-            InitializeComponent();
-        }
-
-        private void UserControl_Loaded(object sender, RoutedEventArgs e)
-        {
-            RecentFilesGroup = new ObservableCollection<OpenFileInfo>(Settings.Default.RecentOpenFiles);
-            RecentFilesList.ItemsSource = RecentFilesGroup;
-            GridRecentFilesList.ItemsSource = RecentFilesGroup;
-            RecentFilesList.SelectedItem = null;
-            ShowListViewContentUI();
-        }
-
-        private void SetLangText()
-        {
-
-        }
-
-        private void InitContextMenu()
-        {
-
-        }
-
-        private void InitUI()
-        {
-
-        }
-
-
-        #region UI
-        #region 列表和网格模式
-        private void ListModeBtn_Click(object sender, RoutedEventArgs e)
-        {
-            SwitchFilesMode(sender);
-
-            if (BtnListMode.IsChecked == false)
-                BtnListMode.IsChecked = true;
-        }
-
-        private void GridModeBtn_Click(object sender, RoutedEventArgs e)
-        {
-            SwitchFilesMode(sender);
-
-            if (BtnGridMode.IsChecked == false)
-                BtnGridMode.IsChecked = true;
-        }
-
-        private void SwitchFilesMode(object sender)
-        {
-            try
-            {
-                var btn = sender as CustomIconToggleBtn;
-                switch (btn.Tag.ToString())
-                {
-                    case "ListMode":
-                        BtnGridMode.IsChecked = false;
-
-                        GridRecentFilesList.Visibility = Visibility.Collapsed;
-                        RecentFilesList.Visibility = Visibility.Visible;
-                        RecentFilesList.SelectedItems.Clear();
-                        if (GridRecentFilesList.SelectedItems.Count > 0)
-                        {
-                            for (int i = 0; i < GridRecentFilesList.SelectedItems.Count; i++)
-                            {
-                                RecentFilesList.SelectedItems.Add(GridRecentFilesList.SelectedItems[i]);
-                            }
-
-                        }
-                        
-                        break;
-
-                    case "GridMode":
-                        BtnListMode.IsChecked=false;
-
-                        GridRecentFilesList.Visibility = Visibility.Visible;
-                        RecentFilesList.Visibility = Visibility.Collapsed;
-                        GridRecentFilesList.SelectedItems.Clear();
-                        if (RecentFilesList.SelectedItems.Count > 0)
-                        {
-                            for (int i = 0; i < RecentFilesList.SelectedItems.Count; i++)
-                            {
-                                GridRecentFilesList.SelectedItems.Add(RecentFilesList.SelectedItems[i]);
-                            }
-
-                        }
-                        
-                        break;
-                }
-              
-            }
-            catch { }
-        }
-
-        private void ShowListViewContentUI()
-        {
-            if (RecentFilesList.Items.Count == 0)
-            {
-                BlankContentPanel.Visibility = Visibility.Visible;
-                RecentFilesList.Visibility = Visibility.Collapsed;
-                PnlRightBtns.Visibility = Visibility.Collapsed;
-            }
-            else
-            {
-                RecentFilesList.Visibility = Visibility.Visible;
-                PnlRightBtns.Visibility = Visibility.Visible;
-                BlankContentPanel.Visibility = Visibility.Collapsed;
-            }
-        }
-
-        #endregion
-
-        private void btnDelete_Click(object sender, RoutedEventArgs e)
-        {
-            string msg = "";
-            int SelectedItemsType = 0;
-            if (RecentFilesList.SelectedItems.Count == RecentFilesList.Items.Count || RecentFilesList.SelectedItems.Count == 0)
-            {
-                if (RecentFilesList.SelectedItems.Count == 1 && RecentFilesList.Items.Count == 1)
-                    msg = "ClearFile";
-                else
-                    msg = "AllClearFiles";
-
-                SelectedItemsType = 0;
-            }
-            else if (RecentFilesList.SelectedItems.Count == 1)
-            {
-                msg = "ClearFile";
-                SelectedItemsType = 1;
-            }
-            else
-            {
-                msg = "ClearSelectedFiles";
-                SelectedItemsType = 2;
-            }
-
-            winform.DialogResult result = MessageBoxEx.Show(msg, "", winform.MessageBoxButtons.OKCancel, winform.MessageBoxIcon.Question);
-            if (result == winform.DialogResult.OK)
-            {
-                RemoveRecentFilesFrom(SelectedItemsType);
-            }
-        }
-
-        private void RecentFilesList_SelectionChanged(object sender, SelectionChangedEventArgs e)
-        {
-           
-        }
-
-        private void GridRecentFilesList_SelectionChanged(object sender, SelectionChangedEventArgs e)
-        {
-        
-        }
-
-        private void ContextMenu_Opened(object sender, RoutedEventArgs e)
-        {
-           
-        }
-
-        /// <summary>
-        /// 未被选中的项目,或只有一个被选中的项
-        /// </summary>
-        private void showMoreContexMenu(ContextMenu contexMenu)
-        {
-            foreach (var item in contexMenu.Items)
-            {
-                var menuitem = item as MenuItem;
-                menuitem.Visibility = Visibility.Visible;
-               
-            }
-        }
-
-        private void ListViewItem_PreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
-        {
-            Trace.WriteLine("Preview MouseRightButtonDown");
-            e.Handled = true;
-        }
-        #endregion
-
-        #region Events
-        /// <summary>
-        /// 删除最近文件的操作
-        /// </summary>
-        /// <param name="selectedItemsType">0:全部文件;1:一个文件;2:多个文件</param>
-        private void RemoveRecentFilesFrom(int selectedItemsType)
-        {
-            if (selectedItemsType == 0)
-            {
-                SettingHelper.RemoveAllRecentOpenFiles();
-                RecentFilesGroup.Clear();
-            }
-            else if (selectedItemsType == 1)
-            {
-                var file = RecentFilesList.SelectedItems[0] as OpenFileInfo;
-                SettingHelper.RemoveRecentOpenFile(file.FilePath);
-                RecentFilesGroup.Remove(file);
-            }
-            else
-            {
-                List<OpenFileInfo> OpenFileInfos = new List<OpenFileInfo>();
-                foreach (var item in RecentFilesList.SelectedItems)
-                {
-                    var openFileInfo = item as OpenFileInfo;
-                    OpenFileInfos.Add(openFileInfo);
-                }
-
-                foreach (var item in OpenFileInfos)
-                {
-                    SettingHelper.RemoveRecentOpenFile(item.FilePath);
-                    RecentFilesGroup.Remove(item);
-                }
-                OpenFileInfos.Clear();
-            }
-
-            ShowListViewContentUI();
-        }
-
-        private void DeleteMenuItem_Click(object sender, RoutedEventArgs e)
-        {
-
-            DeleteFileItem(sender);
-        }
-
-        private void DeleteItemHandler_Click(object sender, RoutedEventArgs e)
-        {
-            DeleteFileItem(sender);
-        }
-
-        private bool IsSelectedFile(object sender)
-        {
-
-            return true;
-        }
-
-        private void DeleteFileItem(object sender)
-        {
-            if (RecentFilesList.SelectedItems.Count > 1)
-            {
-                var isSelected = IsSelectedFile(sender);
-                if (!isSelected)
-                {
-                    ShowListViewContentUI();
-                    return;
-                }
-
-                string msg = "";
-                if (RecentFilesList.SelectedItems.Count == RecentFilesList.Items.Count)
-                    msg = "RecentFiles_AllClearMsg";
-                else
-                    msg = "RecentFiles_SelectedClearMsg";
-
-                if (MessageBoxEx.Show(msg, "", winform.MessageBoxButtons.OKCancel, winform.MessageBoxIcon.Question) == winform.DialogResult.OK)
-                    RemoveRecentFilesFrom(2);
-                else
-                    return;
-            }
-            else
-            {
-                if (MessageBoxEx.Show("RecentFiles_ClearMsg", "", winform.MessageBoxButtons.OKCancel, winform.MessageBoxIcon.Question) != winform.DialogResult.OK)
-                    return;
-
-                OpenFileInfo file = null;
-                if ((sender as MenuItem) != null)
-                {
-                    var menuItem = sender as MenuItem;
-                    file = menuItem.DataContext as OpenFileInfo;
-                    if (file != null)
-                    {
-                        SettingHelper.RemoveRecentOpenFile(file.FilePath);
-                        RecentFilesGroup.Remove(file);
-                    }
-                }
-                else if ((sender as Button) != null)
-                {
-                    var btn = sender as Button;
-                    file = btn.DataContext as OpenFileInfo;
-                    if (file != null)
-                    {
-                        SettingHelper.RemoveRecentOpenFile(file.FilePath);
-                        RecentFilesGroup.Remove(file);
-                    }
-
-                }
-            }
-            ShowListViewContentUI();
-        }
-
-        private void RecentFilesList_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
-        {
-            var item = sender as ListViewItem;
-            if (item != null && (item.DataContext as OpenFileInfo) != null)
-            {
-                var fileInfo = item.DataContext as OpenFileInfo;
-                if (File.Exists(fileInfo.FilePath))
-                {
-                    MainWindow parentWindow = Window.GetWindow(this) as MainWindow;
-
-                    string[] filePath = new string[1];
-                    filePath[0] = fileInfo.FilePath;
-                    parentWindow.LoadPdfViewer(filePath);
-                }
-                else
-                {
-                    //MessageBoxEx.Show(App.MainPageLoader.GetString("Main_TheFileNotExistWarning"));
-                    SettingHelper.RemoveRecentOpenFile(fileInfo.FilePath);
-                    RecentFilesGroup.Remove(fileInfo);
-                    ShowListViewContentUI(); 
-                }
-
-            }
-
-        }
-
-        private async void OpenFiles_Click(object sender, RoutedEventArgs e)
-        {
-
-            var dlg = new OpenFileDialog();
-            dlg.Multiselect = true;
-            dlg.Filter = Properties.Resources.OpenDialogFilter;
-
-            if (dlg.ShowDialog() == true)
-            {
-                await Task.Delay(3);
-                MainWindow parentWindow = Window.GetWindow(this) as MainWindow;
-                parentWindow.LoadPdfViewer(dlg.FileNames);
-            }
-        }
-        #endregion
-
-        private void PrintFile(CPDFViewer pdfViewer)
-        {
-           
-        }
-
-
-        private void PrintMenuItem_Click(object sender, RoutedEventArgs e)
-        {
-
-        }
-
-        private void FileInfoMenuItem_Click(object sender, RoutedEventArgs e)
-        {
-
-        }
-
-        private void ShareMenuItem_Click(object sender, RoutedEventArgs e)
-        {
-
-        }
-
-        private void FilePathMenuItem_Click(object sender, RoutedEventArgs e)
-        {
-
-        }
-
-      
-    }
-}

+ 35 - 3
PDF Office/Views/PageEdit/PageEditContent.xaml.cs

@@ -343,7 +343,8 @@ namespace PDF_Office.Views.PageEdit
                     }
                     var scroll = GetScrollHost(ListPageEdit);
 
-                    string tempPath = System.IO.Path.Combine(System.IO.Path.GetTempPath(), "Temp.pdf");
+                    string filename = Guid.NewGuid().ToString() + ".pdf";
+                    string tempPath = System.IO.Path.Combine(System.IO.Path.GetTempPath(), filename);
                     System.IO.File.Create(tempPath);
                     string[] files = new string[1];
                     files[0] = tempPath;
@@ -398,12 +399,43 @@ namespace PDF_Office.Views.PageEdit
             }
             //选中了item 时,不能框选
             startChoose = false;
+
+            //更改系统的选中规则,选中状态下,鼠标松开后取消选中
+            //方便实现多选拖拽功能
+            if (listBoxItem.IsSelected == true && !Keyboard.IsKeyDown(Key.LeftCtrl))
+            {
+                e.Handled = true;
+            }
         }
 
         private void ListPageEdit_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
         {
-            startChoose = false;
+            var pos = e.GetPosition(ListPageEdit);
+            HitTestResult result = VisualTreeHelper.HitTest(ListPageEdit, pos);
+            if (result == null)
+            {
+                return;
+            }
+
+            var listBoxItem = CommonHelper.FindVisualParent<ListBoxItem>(result.VisualHit);
+            if (listBoxItem == null)
+            {
+                return;
+            }
+
+            //更改系统默认的选中规则,多选后,鼠标单击抬起后再选中单个
+            //拖拽框选之后的抬起鼠标不进入处理
+            if (!startChoose&&!Keyboard.IsKeyDown(Key.LeftCtrl) && !Keyboard.IsKeyDown(Key.LeftShift))
+            {
+                ListPageEdit.SelectedItems.Clear();
+                ListPageEdit.SelectedItem = listBoxItem;
+                listBoxItem.IsSelected = true;
+                return;
+            }
+
             Mouse.Capture(null);
+            //结束鼠标框选
+            startChoose = false;
             RectChoose.Visibility = Visibility.Collapsed;
         }
 
@@ -420,7 +452,7 @@ namespace PDF_Office.Views.PageEdit
         }
 
         /// <summary>
-        ///根据鼠标拖选的框 选中里面的Item
+        ///根据鼠标拖选的框 选中矩形框里面的Item
         /// </summary>
         private void DoSelectItems()
         {

File diff suppressed because it is too large
+ 0 - 253
PDF Office/Views/PropertyPanel/AnnotPanel/FreehandAnnotProperty.xaml


+ 0 - 354
PDF Office/Views/PropertyPanel/AnnotPanel/FreetextAnnotProperty.xaml

@@ -1,354 +0,0 @@
-<UserControl x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.FreetextAnnotProperty"
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel"
-             xmlns:CommonControls="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls"
-             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
-             xmlns:prism="http://prismlibrary.com/"             
-             prism:ViewModelLocator.AutoWireViewModel="True"
-             xmlns:Convert="clr-namespace:PDF_Office.DataConvert"
-             xmlns:cus="clr-namespace:PDF_Office.CustomControl"
-             mc:Ignorable="d" 
-             d:DesignHeight="850" d:DesignWidth="800">
-    <UserControl.Resources>
-        <ResourceDictionary>
-            <ResourceDictionary.MergedDictionaries>
-                <ResourceDictionary Source="../../../Styles/SliderStyle.xaml"></ResourceDictionary>
-                <ResourceDictionary Source="../../../Styles/CustomBtnStyle.xaml"/>
-            </ResourceDictionary.MergedDictionaries>
-
-            <Convert:CheckToVisibleMutiConvert x:Key="CheckToVisibleMutiConvert"/>
-            <Style x:Key="line1Style" TargetType="{x:Type Line}">
-                <Setter Property="Visibility">
-                    <Setter.Value>
-                        <MultiBinding Converter="{StaticResource CheckToVisibleMutiConvert}">
-                            <Binding ElementName="TextAlignLeftBtn" Path="IsChecked"/>
-                            <Binding ElementName="TextAlignCenterBtn" Path="IsChecked"/>
-                        </MultiBinding>
-                    </Setter.Value>
-                </Setter>
-            </Style>
-            <Style x:Key="line2Style" TargetType="{x:Type Line}">
-                <Setter Property="Visibility">
-                    <Setter.Value>
-                        <MultiBinding Converter="{StaticResource CheckToVisibleMutiConvert}">
-                            <Binding ElementName="TextAlignCenterBtn" Path="IsChecked"/>
-                            <Binding ElementName="TextAlignRightBtn" Path="IsChecked"/>
-                        </MultiBinding>
-                    </Setter.Value>
-                </Setter>
-            </Style>
-            
-            <ContextMenu x:Key="BtnFlyoutMenu" FontSize="14"
-                        >
-                <ContextMenu.ItemContainerStyle>
-                    <Style TargetType="MenuItem">
-                        <Setter Property="Padding" Value="0,7,0,7"/>
-                        <Setter Property="VerticalContentAlignment" Value="Center"/>
-                    </Style>
-                </ContextMenu.ItemContainerStyle>
-                <MenuItem Name="ChangeStyleMenuItem"  Header="用所选部分重新定义" IsEnabled="True">
-                </MenuItem>
-                <MenuItem Name="BackStyleMenuItem"  Header="恢复默认预设样式" IsEnabled="True">
-                </MenuItem>
-            </ContextMenu>
-
-        </ResourceDictionary>
-    </UserControl.Resources>
-    <Grid Background="#F3F3F3">
-        <StackPanel>
-            <TextBlock Name="AnnotTypeTitle" FontFamily="Segoe UI Semibold" FontWeight="SemiBold" FontSize="18" LineHeight="24" HorizontalAlignment="Left" Margin="10,8,0,0">Freetext</TextBlock>
-            <Border Width="228" Height="100" BorderThickness="1" CornerRadius="2" BorderBrush="#DDDDDD" Background="White" Margin="0,8,0,0">
-                <Grid>
-                    <Border Name="FreeTextBorder" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5">
-                        <TextBlock Name="SampleText" Foreground="{Binding SelectColor}" FontFamily="{Binding TextFontFamily}" FontWeight="{Binding TextFontWeights}" FontStyle="{Binding TextFontStyle}" Text="Sample" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24">
-                        </TextBlock>
-                    </Border>
-
-                    <Path Name="UnderlinePath" HorizontalAlignment="Center" StrokeThickness="2" Margin="0,51,0,0" Visibility="Collapsed">
-                        <Path.Data>
-                            <LineGeometry StartPoint="0,0" EndPoint="62,0"></LineGeometry>
-                        </Path.Data>
-                    </Path>
-                    <Path Name="StrikeoutPath" HorizontalAlignment="Center" StrokeThickness="2" Margin="0,40,0,0" Visibility="Collapsed">
-                        <Path.Data>
-                            <LineGeometry StartPoint="0,0" EndPoint="62,0"></LineGeometry>
-                        </Path.Data>
-                    </Path>
-                    <Path Name="SquigglyPath"  HorizontalAlignment="Center" StrokeThickness="2" Margin="0,51,0,0" Visibility="Collapsed">
-
-                    </Path>
-                </Grid>
-            </Border>
-
-
-            <Border BorderBrush="#E2E3E6"  Height="32" Margin="12,0,4,0"  BorderThickness="0">
-                <StackPanel Orientation="Horizontal">
-                    <ComboBox IsReadOnly="True" Name="FontTitleBox" Background="Transparent" Padding="10 10 0 0"  Width="148"   BorderThickness="1" BorderBrush="#FFE2E3E6"
-                                >
-                        <ComboBox.ItemContainerStyle>
-                            <Style TargetType="{x:Type ComboBoxItem}">
-                                <Setter Property="Padding" Value="10 0 0 0"/>
-                            </Style>
-                        </ComboBox.ItemContainerStyle>
-                        <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
-                            <TextBlock Text="H1 大标题"  Tag="Courier"  FontSize="14"/>
-                        </ComboBoxItem>
-                        <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
-                            <TextBlock Text="H2标准标题"  Tag="Helvetica" FontSize="14"/>
-                        </ComboBoxItem>
-                        <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
-                            <TextBlock Text="H3小标题"  Tag="Times Roman" FontSize="14"/>
-                        </ComboBoxItem>
-
-                        <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
-                            <TextBlock Text="H3小标题"  Tag="Times Roman" FontSize="14"/>
-                        </ComboBoxItem>
-
-                        <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
-                            <TextBlock Text="B1正文(标准)"  Tag="Times Roman" FontSize="14"/>
-                        </ComboBoxItem>
-                        <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
-                            <TextBlock Text="B2正文(小)"  Tag="Times Roman" FontSize="14"/>
-                        </ComboBoxItem>
-                        <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
-                            <TextBlock Text="B3描述"  Tag="Times Roman" FontSize="14"/>
-                        </ComboBoxItem>
-                    </ComboBox>
-                    <Button Width="32" Height="32" ContextMenu="{StaticResource BtnFlyoutMenu}"/>
-                </StackPanel>
-            </Border>
-
-
-
-
-            <TextBlock x:Name="FontText"  FontFamily="Segoe UI Semibold" FontWeight="SemiBold" FontSize="14" LineHeight="20" Margin="12,18,0,0" >Font</TextBlock>
-
-            <Grid Margin="0,6,0,0">
-                <Grid.ColumnDefinitions>
-                    <ColumnDefinition Width="auto"></ColumnDefinition>
-                    <ColumnDefinition Width="auto"></ColumnDefinition>
-                </Grid.ColumnDefinitions>
-                <Grid.RowDefinitions>
-                    <RowDefinition Height="auto"></RowDefinition>
-                    <RowDefinition Height="auto"></RowDefinition>
-                    <RowDefinition Height="auto"></RowDefinition>
-                </Grid.RowDefinitions>
-
-                <Border BorderBrush="#E2E3E6"  Width="148" Height="32" Margin="12,0,4,0"  BorderThickness="0">
-                    <Grid>
-                        <ComboBox IsReadOnly="True" Name="FontFamilyBox" Background="Transparent" Padding="10 10 0 0"  BorderThickness="1" BorderBrush="#FFE2E3E6"
-                                >
-                            <ComboBox.ItemContainerStyle>
-                                <Style TargetType="{x:Type ComboBoxItem}">
-                                    <Setter Property="Padding" Value="10 0 0 0"/>
-                                </Style>
-                            </ComboBox.ItemContainerStyle>
-                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
-                                <TextBlock Text="Courier New" FontFamily="Courier New" Tag="Courier"  FontSize="14"/>
-                            </ComboBoxItem>
-                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
-                                <TextBlock Text="Arial" FontFamily="Arial" Tag="Helvetica" FontSize="14"/>
-                            </ComboBoxItem>
-                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
-                                <TextBlock Text="Times New Roman" FontFamily="Times New Roman" Tag="Times Roman" FontSize="14"/>
-                            </ComboBoxItem>
-                            <i:Interaction.Triggers>
-                                <i:EventTrigger EventName="SelectionChanged">
-                                    <i:InvokeCommandAction Command="{Binding FontFamilyChangedCommand}" CommandParameter="{Binding ElementName=FontFamilyBox,Path=SelectedIndex}"/>
-                                </i:EventTrigger>
-                            </i:Interaction.Triggers>
-                        </ComboBox>
-
-                        <TextBox Name="FontFamilyText" FontFamily="Segoe UI" FontSize="14" Background="White"  Padding="10 0 0 0" Margin="2,0,25,0" IsReadOnly="True"
-                             BorderThickness="0" VerticalAlignment="Center" TextAlignment="Left">
-                        </TextBox>
-                    </Grid>
-                </Border>
-
-                <cus:ColorDropBox x:Name="FontColorBox" Grid.Column="1" Grid.Row="1" SelectedColorChanged="FontColorBox_SelectedColorChanged" BorderThickness="1" BorderBrush="#E2E3E6" Width="80" Height="32" HorizontalAlignment="Left"
-                                   ></cus:ColorDropBox>
-
-                <Border Grid.Row="1" BorderBrush="#E2E3E6"  Width="148" Height="32" Margin="12,8,4,0"  BorderThickness="0">
-                    <Grid>
-                        <ComboBox Name="FontStyleBox" IsReadOnly="True" BorderThickness="1" BorderBrush="#FFE2E3E6" Padding="10 10 0 0" Background="Transparent">
-                            <ComboBox.ItemContainerStyle>
-                                <Style TargetType="{x:Type ComboBoxItem}">
-                                    <Setter Property="Padding" Value="10 0 0 0"/>
-                                </Style>
-                            </ComboBox.ItemContainerStyle>
-                            <ComboBoxItem x:Name="RegularItem" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">Regular</ComboBoxItem>
-                            <ComboBoxItem x:Name="BoldItem" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">Bold</ComboBoxItem>
-                            <ComboBoxItem x:Name="ItalicItem" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">Italic</ComboBoxItem>
-                            <ComboBoxItem x:Name="BoldItalicItem" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">Bold Italic</ComboBoxItem>
-
-                            <i:Interaction.Triggers>
-                                <i:EventTrigger EventName="SelectionChanged">
-                                    <i:InvokeCommandAction Command="{Binding FontStyleChangedCommand}" CommandParameter="{Binding ElementName=FontStyleBox,Path=SelectedItem}"/>
-                                </i:EventTrigger>
-                            </i:Interaction.Triggers>
-                        </ComboBox>
-                        <TextBox Name="FontStyleText" IsReadOnly="True" FontFamily="Segoe UI" FontSize="14" Background="White" Padding="10 0 0 0" Height="20" Margin="2,0,35,0" 
-                             BorderThickness="0" VerticalAlignment="Center" TextAlignment="Left">
-                        </TextBox>
-                    </Grid>
-                </Border>
-
-                <Border Grid.Row="0" Grid.Column="1" BorderBrush="#E2E3E6"  Width="80" Height="32" Margin="-1,8,0,0"  BorderThickness="0">
-                    <Grid>
-                        <ComboBox Name="FontSizeBox" BorderThickness="1" Background="Transparent" BorderBrush="#FFE2E3E6"
-                                  MaxDropDownHeight="200">
-                            <ComboBox.ItemContainerStyle>
-                                <Style TargetType="{x:Type ComboBoxItem}">
-                                    <Setter Property="Padding" Value="10 0 0 0"/>
-                                </Style>
-                            </ComboBox.ItemContainerStyle>
-                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">6</ComboBoxItem>
-                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">8</ComboBoxItem>
-                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">9</ComboBoxItem>
-                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">10</ComboBoxItem>
-                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">12</ComboBoxItem>
-                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">14</ComboBoxItem>
-                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">18</ComboBoxItem>
-                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">20</ComboBoxItem>
-                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">22</ComboBoxItem>
-                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">24</ComboBoxItem>
-                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">26</ComboBoxItem>
-                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">28</ComboBoxItem>
-                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">32</ComboBoxItem>
-                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">36</ComboBoxItem>
-                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">48</ComboBoxItem>
-                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">72</ComboBoxItem>
-                            <i:Interaction.Triggers>
-                                <i:EventTrigger EventName="SelectionChanged">
-                                    <i:InvokeCommandAction Command="{Binding FontSizeChangedCommand}" CommandParameter="{Binding ElementName=FontSizeBox,Path=SelectedItem}"/>
-                                </i:EventTrigger>
-                            </i:Interaction.Triggers>
-                        </ComboBox>
-                        <TextBox Name="FontSizeText" FontFamily="Segoe UI" FontSize="14" Background="White" Height="20" Padding="10 0 0 0" Margin="2,0,35,0" 
-                             BorderThickness="0" VerticalAlignment="Center" TextAlignment="Left" IsReadOnly="True">
-                        </TextBox>
-                    </Grid>
-                </Border>
-
-
-                <Border Grid.ColumnSpan="2" Grid.Row="2" Width="148" Height="32" Margin="12,8,0,0" BorderThickness="1" BorderBrush="#FFE2E3E6" HorizontalAlignment="Left">
-                    <Grid Name="ToolGrid">
-                        <Grid.ColumnDefinitions>
-                            <ColumnDefinition Width="*"></ColumnDefinition>
-                            <ColumnDefinition Width="*"></ColumnDefinition>
-                            <ColumnDefinition Width="*"></ColumnDefinition>
-                        </Grid.ColumnDefinitions>
-
-                        <ToggleButton Name="TextAlignLeftBtn" Tag="AlignLeft" Background="Transparent" BorderThickness="0" Click="BtnTextAlign_Click">
-                            <Path HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#000000" Data="M10,11 L10,12 L0,12 L0,11 L10,11 Z M16,7 L16,8 L0,8 L0,7 L16,7 Z M13,3 L13,4 L0,4 L0,3 L13,3 Z">
-                            </Path>
-                            <i:Interaction.Triggers>
-                                <i:EventTrigger EventName="Checked">
-                                    <i:InvokeCommandAction Command="{Binding TextAlignChecked}" CommandParameter="{Binding ElementName=TextAlignLeftBtn,Path=Tag}"/>
-                                </i:EventTrigger>
-                            </i:Interaction.Triggers>
-                        </ToggleButton>
-                        <Line HorizontalAlignment="Left" Style="{StaticResource line1Style}" VerticalAlignment="Center" Grid.Column="1" X1="0" Y1="0" X2="0" Y2="16" StrokeThickness="1" Stroke="#33000000"></Line>
-
-                        <ToggleButton Name="TextAlignCenterBtn" Tag="AlignCenter" Grid.Column="1" Background="Transparent"  BorderThickness="0"  Click="BtnTextAlign_Click">
-                            <Path HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#000000" Data="M16,11 L16,12 L0,12 L0,11 L16,11 Z M13,7 L13,8 L3,8 L3,7 L13,7 Z M16,3 L16,4 L0,4 L0,3 L16,3 Z">
-                            </Path>
-                            <i:Interaction.Triggers>
-                                <i:EventTrigger EventName="Checked">
-                                    <i:InvokeCommandAction Command="{Binding TextAlignChecked}" CommandParameter="{Binding ElementName=TextAlignCenterBtn,Path=Tag}"/>
-                                </i:EventTrigger>
-                            </i:Interaction.Triggers>
-                        </ToggleButton>
-                        <Line HorizontalAlignment="Left" Style="{StaticResource line2Style}" VerticalAlignment="Center" Grid.Column="2" X1="0" Y1="0" X2="0" Y2="16" StrokeThickness="1" Stroke="#33000000"></Line>
-
-                        <ToggleButton Name="TextAlignRightBtn" Tag="AlignRight" Grid.Column="2" Background="Transparent"  BorderThickness="0"  Click="BtnTextAlign_Click">
-                            <Path HorizontalAlignment="Center" VerticalAlignment="Center"  Fill="#000000" Data="M16,11 L16,12 L6.00061035,12 L6.00061035,11 L16,11 Z M16,7 L16,8 L0.0009765625,8 L0.0009765625,7 L16,7 Z M16,3 L16,4 L3.00079346,4 L3.00079346,3 L16,3 Z">
-                            </Path>
-                            <i:Interaction.Triggers>
-                                <i:EventTrigger EventName="Checked">
-                                    <i:InvokeCommandAction Command="{Binding TextAlignChecked}" CommandParameter="{Binding ElementName=TextAlignRightBtn,Path=Tag}"/>
-                                </i:EventTrigger>
-                            </i:Interaction.Triggers>
-                        </ToggleButton>
-                    </Grid>
-                </Border>
-            </Grid>
-
-
-            <Grid Margin="0,18,0,0">
-                <Grid.RowDefinitions>
-                    <RowDefinition Height="auto"/>
-                    <RowDefinition/>
-                </Grid.RowDefinitions>
-                <CommonControls:SlidContent x:Name="layerThick" HorizontalAlignment="Right"/>
-                <CommonControls:ColorContent Grid.Row="1" x:Name="cusColor"/>
-            </Grid>
-
-
-         
-
-            <TextBlock x:Name="thicknessText" FontFamily="Segoe UI Semibold" FontWeight="SemiBold" FontSize="14" LineHeight="20" Margin="12,14,0,0" >Thickness</TextBlock>
-
-
-            <Grid>
-                <Grid.ColumnDefinitions>
-                    <ColumnDefinition Width="*"></ColumnDefinition>
-                    <ColumnDefinition Width="auto"></ColumnDefinition>
-                </Grid.ColumnDefinitions>
-
-                <Slider Name="ThicknessSlider" VerticalAlignment="Center" Margin="12,0,0,0" Width="148"  Minimum="0" Maximum="24" IsSelectionRangeEnabled="True" IsMoveToPointEnabled="True" 
-                    Style="{StaticResource RoundThumbSlider}"  TickFrequency="1" IsSnapToTickEnabled="True" >
-                    <Slider.Resources>
-                        <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#477EDE" />
-                        <SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkDarkBrushKey}" Color="#E2E3E6" />
-                    </Slider.Resources>
-                </Slider>
-
-
-                <Border Grid.Column="1" BorderBrush="#E2E3E6"  Width="80" Height="32" Margin="0,0,11,0"  BorderThickness="0">
-                    <Grid>
-                        <ComboBox Name="ThicknessBox" BorderThickness="1" Padding="10" Background="Transparent" BorderBrush="#FFE2E3E6"
-                                  MaxDropDownHeight="200">
-                            <ComboBox.ItemContainerStyle>
-                                <Style TargetType="{x:Type ComboBoxItem}">
-                                    <Setter Property="Padding" Value="10 0 0 0"/>
-                                </Style>
-                            </ComboBox.ItemContainerStyle>
-                            <ComboBoxItem Content="1" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                            <ComboBoxItem Content="3" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                            <ComboBoxItem Content="6" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                            <ComboBoxItem Content="9" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                            <ComboBoxItem Content="12" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                            <ComboBoxItem Content="15" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                            <ComboBoxItem Content="18" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                            <ComboBoxItem Content="21" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                            <ComboBoxItem Content="24" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                        </ComboBox>
-                        <TextBox Name="ThicknessText" Background="White" FontFamily="Segoe UI" FontSize="14"  Height="20" Margin="10,0,35,0" IsReadOnly="True"
-                             BorderThickness="0" VerticalAlignment="Center" TextAlignment="Left" >
-                        </TextBox>
-                    </Grid>
-                </Border>
-            </Grid>
-
-
-            <StackPanel x:Name="PnlLineStyle" Orientation="Horizontal" Margin="0,20,0,0">
-                <cus:CustomIconToggleBtn x:Name="BtnSolidLine" Tag="Solid" Width="110" Height="32" Click="BtnLineStyle_Click"
-                                              Style="{StaticResource ToggleBtnViewModeStyle}">
-                    <Border BorderBrush="Black" BorderThickness="1" Padding="8,0,8,0" Width="108" Height="30">
-                        <Line X1="10" Y1="15" X2="260" Y2="15" Stroke="Black" StrokeThickness="2" />
-                    </Border>
-                </cus:CustomIconToggleBtn>
-                <cus:CustomIconToggleBtn x:Name="BtnDottedLine" Tag="Dotted" Width="110" Height="32" Click="BtnLineStyle_Click"
-                                              Style="{StaticResource ToggleBtnViewModeStyle}">
-                    <Border BorderBrush="Black" BorderThickness="1" Padding="8,0,8,0" Width="108" Height="30" >
-                        <Line X1="10" Y1="15" X2="260" Y2="15" Stroke="Black" StrokeThickness="2" StrokeDashArray="2"/>
-                    </Border>
-                </cus:CustomIconToggleBtn>
-            </StackPanel>
-        </StackPanel>
-    </Grid>
-</UserControl>

+ 0 - 211
PDF Office/Views/PropertyPanel/AnnotPanel/SharpsAnnotProperty.xaml

@@ -1,211 +0,0 @@
-<UserControl x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.SharpsAnnotProperty"
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel"
-             xmlns:cus="clr-namespace:PDF_Office.CustomControl"
-             xmlns:CommonControls="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls"
-             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
-             xmlns:prism="http://prismlibrary.com/"             
-             prism:ViewModelLocator.AutoWireViewModel="True"
-             xmlns:Convert="clr-namespace:PDF_Office.DataConvert"
-              xmlns:DashConvert="clr-namespace:PDF_Office.ViewModels.PropertyPanel.AnnotPanel"
-             mc:Ignorable="d" 
-             d:DesignHeight="450" d:DesignWidth="800">
-    <UserControl.Resources>
-        <ResourceDictionary>
-            <ResourceDictionary.MergedDictionaries>
-                <ResourceDictionary Source="../../../Styles/SliderStyle.xaml"></ResourceDictionary>
-                <ResourceDictionary Source="../../../Styles/CustomBtnStyle.xaml"/>
-            </ResourceDictionary.MergedDictionaries>
-            <Convert:ColorToBrushConverter x:Key="ColorToBrushConvert"></Convert:ColorToBrushConverter>
-            <Convert:CheckToVisibleMutiConvert x:Key="CheckToVisibleMutiConvert"/>
-            <DashConvert:DashStyleConverter x:Key="DashStyleConverter"/>
-
-            <Style x:Key="line1Style" TargetType="{x:Type Line}">
-                <Setter Property="Visibility">
-                    <Setter.Value>
-                        <MultiBinding Converter="{StaticResource CheckToVisibleMutiConvert}">
-                            <Binding ElementName="SharpRectBtn" Path="IsChecked"/>
-                            <Binding ElementName="SharpCircleBtn" Path="IsChecked"/>
-                        </MultiBinding>
-                    </Setter.Value>
-                </Setter>
-            </Style>
-            <Style x:Key="line2Style" TargetType="{x:Type Line}">
-                <Setter Property="Visibility">
-                    <Setter.Value>
-                        <MultiBinding Converter="{StaticResource CheckToVisibleMutiConvert}">
-                            <Binding ElementName="SharpCircleBtn" Path="IsChecked"/>
-                            <Binding ElementName="SharpArrowBtn" Path="IsChecked"/>
-                        </MultiBinding>
-                    </Setter.Value>
-                </Setter>
-            </Style>
-            <Style x:Key="line3Style" TargetType="{x:Type Line}">
-                <Setter Property="Visibility">
-                    <Setter.Value>
-                        <MultiBinding Converter="{StaticResource CheckToVisibleMutiConvert}">
-                            <Binding ElementName="SharpArrowBtn" Path="IsChecked"/>
-                            <Binding ElementName="SharpLineBtn" Path="IsChecked"/>
-                        </MultiBinding>
-                    </Setter.Value>
-                </Setter>
-            </Style>
-
-        </ResourceDictionary>
-    </UserControl.Resources>
-    <Grid Background="#F3F3F3">
-        <StackPanel>
-            <TextBlock Name="AnnotTypeTitle" Text="{Binding AnnotTypeTitle}" FontFamily="SegoeUI" FontWeight="Bold" FontSize="18" LineHeight="24" HorizontalAlignment="Left" Margin="10,8,0,0" />
-            <Border Width="228" Height="100" BorderThickness="1" CornerRadius="2" BorderBrush="#DDDDDD" Background="White" Margin="0,8,0,0">
-                <Grid>
-                    <Path Name="SharpPath" Opacity="{Binding FillOpacity}" StrokeThickness="{Binding LineWidth}"  Data="{Binding DataPath}"
-                        Stroke="{Binding SelectColor}"
-                        Fill="{Binding FillColor}" StrokeStartLineCap="Flat"
-                         StrokeDashArray="{Binding Dash,Converter={StaticResource DashStyleConverter}}"
-                        Width="36" Height="36" HorizontalAlignment="Center" VerticalAlignment="Center">
-                        <!--,Converter={StaticResource ColorToBrushConvert}-->
-                    </Path>
-                </Grid>
-            </Border>
-
-
-            <Border Width="162" Height="32" Margin="0,12,0,0" BorderThickness="1" BorderBrush="#FFE2E3E6">
-                <Grid Name="ToolGrid">
-                    <Grid.ColumnDefinitions>
-                        <ColumnDefinition Width="40.5"></ColumnDefinition>
-                        <ColumnDefinition Width="40.5"></ColumnDefinition>
-                        <ColumnDefinition Width="40.5"></ColumnDefinition>
-                        <ColumnDefinition Width="40.5"></ColumnDefinition>
-                    </Grid.ColumnDefinitions>
-
-
-                    <ToggleButton Name="SharpRectBtn" Tag="Rect" Width="40.5" Background="Transparent" BorderThickness="0" Click="SharpsBtn_Click" 
-                                  Command="{Binding SharpsTypeCommand}" CommandParameter="{Binding ElementName=SharpRectBtn,Path=Tag}">
-                        <Rectangle HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" Stroke="#273C62"></Rectangle>
-                    </ToggleButton>
-
-                    <Line Name="line1" HorizontalAlignment="Left"  VerticalAlignment="Center" Grid.Column="1" X1="0" Y1="0" X2="0" Y2="16" StrokeThickness="1" Stroke="#33000000">
-
-                    </Line>
-
-                    <ToggleButton Name="SharpCircleBtn" Width="40.5" Tag="Circle" Grid.Column="1" Background="Transparent"  BorderThickness="0"  Margin="0,0,0,0" Click="SharpsBtn_Click"
-                                  Command="{Binding SharpsTypeCommand}" CommandParameter="{Binding ElementName=SharpCircleBtn,Path=Tag}"
-                                  >
-                        <Ellipse Width="16" Height="16" Stroke="#273C62" HorizontalAlignment="Center" VerticalAlignment="Center"  ></Ellipse>
-                    </ToggleButton>
-
-
-                    <Line Name="line2" HorizontalAlignment="Left" Style="{StaticResource line2Style}" VerticalAlignment="Center" Grid.Column="2" X1="0" Y1="0" X2="0" Y2="16" StrokeThickness="1" Stroke="#33000000"></Line>
-                    <ToggleButton Name="SharpArrowBtn" Width="40.5" Tag="Arrow" Grid.Column="2" Background="Transparent"  BorderThickness="0" Click="SharpsBtn_Click"
-                                    Command="{Binding SharpsTypeCommand}" CommandParameter="{Binding ElementName=SharpArrowBtn,Path=Tag}"
-                                  >
-                        <Path HorizontalAlignment="Center" VerticalAlignment="Center"  Fill="#273C62" Width="16" Height="16">
-                            <Path.Data>
-                                M13.4,2.6 L13.4,8 L12.2,8 L12.1997359,4.648 L2.02426407,14.8242641 L1.17573593,13.9757359 L11.3517359,3.799 L8,3.8 L8,2.6 L13.4,2.6 Z
-                            </Path.Data>
-                        </Path>
-                    </ToggleButton>
-
-                    <Line x:Name="line3" HorizontalAlignment="Left" Style="{StaticResource line3Style}" VerticalAlignment="Center" Grid.Column="3" X1="0" Y1="0" X2="0" Y2="16" StrokeThickness="1" Stroke="#33000000"></Line>
-                    <ToggleButton Name="SharpLineBtn" Width="40.5" Tag="Line" Grid.Column="3" Background="Transparent"  BorderThickness="0" Click="SharpsBtn_Click"
-                                   Command="{Binding SharpsTypeCommand}" CommandParameter="{Binding ElementName=SharpLineBtn,Path=Tag}"
-                                  >
-                        <Polygon Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#273C62">
-                            <Polygon.Points>
-                                13.1757359 1.97573593 14.0242641 2.82426407 2.82426407 14.0242641 1.97573593 13.1757359
-                            </Polygon.Points>
-                        </Polygon>
-                    </ToggleButton>
-
-                </Grid>
-            </Border>
-
-
-            <Grid Margin="0,18,0,0" x:Name="GridFill">
-                <Grid.RowDefinitions>
-                    <RowDefinition Height="auto"/>
-                    <RowDefinition/>
-                </Grid.RowDefinitions>
-                <CommonControls:SlidContent x:Name="layerFill" HorizontalAlignment="Right"/>
-                <CommonControls:ColorContent Grid.Row="1" x:Name="cusFillColor"/>
-            </Grid>
-
-            <Grid Margin="0,18,0,0">
-                <Grid.RowDefinitions>
-                    <RowDefinition Height="auto"/>
-                    <RowDefinition/>
-                </Grid.RowDefinitions>
-                <CommonControls:SlidContent x:Name="layerThick" HorizontalAlignment="Right"/>
-                <CommonControls:ColorContent Grid.Row="1" x:Name="cusColor"/>
-
-            </Grid>
-
-
-
-            <Grid>
-                <Grid.ColumnDefinitions>
-                    <ColumnDefinition Width="*"></ColumnDefinition>
-                    <ColumnDefinition Width="auto"></ColumnDefinition>
-                </Grid.ColumnDefinitions>
-                <Slider Name="BorderSlider" VerticalAlignment="Center" Value="{Binding LineWidth}" Margin="12,0,4,0"  Minimum="1" Maximum="12" IsSelectionRangeEnabled="True" IsMoveToPointEnabled="True"
-                    Style="{StaticResource RoundThumbSlider}"  TickFrequency="1" IsSnapToTickEnabled="True" >
-                    <Slider.Resources>
-                        <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#477EDE" />
-                        <SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkDarkBrushKey}" Color="#E2E3E6" />
-                    </Slider.Resources>
-                </Slider>
-
-                <Border Grid.Column="1" BorderBrush="#E2E3E6"  Width="80" Height="32" Margin="0,0,12,0"  BorderThickness="0">
-                    <Grid>
-                        <ComboBox Name="BorderDropBox" BorderThickness="1" Padding="10 10 0 0" Background="Transparent" BorderBrush="#FFE2E3E6" >
-                            <ComboBox.ItemContainerStyle>
-                                <Style TargetType="{x:Type ComboBoxItem}">
-                                    <Setter Property="Padding" Value="10 0 0 0"/>
-                                </Style>
-                            </ComboBox.ItemContainerStyle>
-                            <ComboBoxItem Content="1" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
-                                
-                            </ComboBoxItem>
-                            <ComboBoxItem Content="3" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                            <ComboBoxItem Content="6" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                            <ComboBoxItem Content="9" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                            <ComboBoxItem Content="12" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                            <i:Interaction.Triggers>
-                                <i:EventTrigger EventName="SelectionChanged">
-                                    <i:InvokeCommandAction Command="{Binding ThicknessChangedCommand}" CommandParameter="{Binding ElementName=BorderDropBox,Path=SelectedItem}"/>
-                                </i:EventTrigger>
-                            </i:Interaction.Triggers>
-                        </ComboBox>
-                        <TextBox FontFamily="Segoe UI" FontSize="14" Background="White" Height="20" Margin="10,0,35,0" IsReadOnly="True"
-                             BorderThickness="0" VerticalAlignment="Center" TextAlignment="Left" Text="{Binding ElementName=BorderSlider,Path=Value}">
-                        </TextBox>
-                    </Grid>
-                </Border>
-            </Grid>
-
-
-            <StackPanel x:Name="PnlLineStyle" Orientation="Horizontal" Margin="0,20,0,0">
-                <cus:CustomIconToggleBtn x:Name="BtnSolidLine" Tag="Solid" Width="110" Height="32" Click="BtnLineStyle_Click"
-                                         Command="{Binding LineStyleCommand}" CommandParameter="{Binding ElementName=BtnSolidLine,Path=Tag}"
-                                              Style="{StaticResource ToggleBtnViewModeStyle}">
-                    <Border BorderBrush="Black" BorderThickness="1" Padding="8,0,8,0" Width="108" Height="30">
-                        <Line X1="10" Y1="15" X2="260" Y2="15" Stroke="Black" StrokeThickness="2" />
-                    </Border>
-                </cus:CustomIconToggleBtn>
-                <cus:CustomIconToggleBtn x:Name="BtnDottedLine" Tag="Dotted" Width="110" Height="32"
-                                         Command="{Binding LineStyleCommand}" CommandParameter="{Binding ElementName=BtnDottedLine,Path=Tag}"
-                                              Style="{StaticResource ToggleBtnViewModeStyle}" Click="BtnLineStyle_Click">
-                    <Border BorderBrush="Black" BorderThickness="1" Padding="8,0,8,0" Width="108" Height="30" >
-                        <Line X1="10" Y1="15" X2="260" Y2="15" Stroke="Black" StrokeThickness="2" StrokeDashArray="2"/>
-                    </Border>
-                </cus:CustomIconToggleBtn>
-            </StackPanel>
-
-
-
-        </StackPanel>
-    </Grid>
-</UserControl>

+ 0 - 78
PDF Office/Views/PropertyPanel/AnnotPanel/TextAnnotProperty.xaml

@@ -1,78 +0,0 @@
-<UserControl x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.TextAnnotProperty"
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel"
-             xmlns:CommonControls="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls"
-             xmlns:cus="clr-namespace:PDF_Office.CustomControl"
-             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
-             xmlns:prism="http://prismlibrary.com/"             
-             prism:ViewModelLocator.AutoWireViewModel="True"
-             xmlns:AnnotPanel="clr-namespace:PDF_Office.ViewModels.PropertyPanel.AnnotPanel"
-             d:DataContext="{d:DesignInstance Type=AnnotPanel:TextAnnotPropertyViewModel}"
-             xmlns:Convert="clr-namespace:PDF_Office.ViewModels.PropertyPanel.AnnotPanel"
-             
-             mc:Ignorable="d" 
-             d:DesignHeight="450" d:DesignWidth="800">
-    <UserControl.Resources>
-        <ResourceDictionary>
-            <ResourceDictionary.MergedDictionaries>
-                <ResourceDictionary Source="../../../Styles/SliderStyle.xaml"></ResourceDictionary>
-            </ResourceDictionary.MergedDictionaries>
-            <Convert:AnnotArgsTypeConverter x:Key="AnnotArgsTypeConverter"/>
-
-        </ResourceDictionary>
-      
-    </UserControl.Resources>
-    <Grid  VerticalAlignment="Stretch" Background="#F3F3F3">
-        <StackPanel Margin="12 0 12 0">
-            <TextBlock Name="AnnotTypeTitle" FontFamily="Segoe UI" FontWeight="Bold" FontSize="18" LineHeight="24" HorizontalAlignment="Left" Margin="0,16,0,8"
-                       Text="{Binding AnnotTypeTitle}"
-                       ></TextBlock>
-            <Border Width="228" Height="100" BorderThickness="1" CornerRadius="2" BorderBrush="#DDDDDD" Background="White" Margin="0,8,0,0">
-                <Grid>
-                    <TextBlock Name="SampleText" Text="Sample" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Bold" FontFamily="Segoe UI" FontSize="18"
-                             Background="{Binding SampleTextBg}" 
-                               >
-                    </TextBlock>
-                    <Path Name="UnderlinePath" HorizontalAlignment="Center" StrokeThickness="2" Margin="0,60,0,0" Stroke="{Binding SelectColor}" Visibility="{Binding AnnotType,Converter={StaticResource AnnotArgsTypeConverter},ConverterParameter=AnnotUnderline}">
-                        <Path.Data>
-                            <LineGeometry StartPoint="0,0" EndPoint="62,0"></LineGeometry>
-                        </Path.Data>
-                    </Path>
-                    <Path Name="StrikeoutPath" HorizontalAlignment="Center" StrokeThickness="2" Margin="0,50,0,0" Stroke="{Binding SelectColor}" Visibility="{Binding AnnotType,Converter={StaticResource AnnotArgsTypeConverter},ConverterParameter=AnnotStrikeout}">
-                        <Path.Data>
-                            <LineGeometry StartPoint="0,0" EndPoint="62,0"></LineGeometry>
-                        </Path.Data>
-                    </Path>
-                    <Path Name="SquigglyPath"  HorizontalAlignment="Center" StrokeThickness="2" Margin="0,51,0,0" Stroke="{Binding SelectColor}" Visibility="{Binding AnnotType,Converter={StaticResource AnnotArgsTypeConverter},ConverterParameter=AnnotSquiggly}">
-
-                    </Path>
-
-                    <Path Name="StickyPath" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed" Fill="#FF8133"
-                      Data="M28.8,4.8 L28.8,24 L16,24 L8,28.8 L8,24 L3.2,24 L3.2,4.8 L28.8,4.8 Z M24,15.2 L8,15.2 L8,17.6 L24,17.6 L24,15.2 Z M17.6,9.6 L8,9.6 L8,12 L17.6,12 L17.6,9.6 Z">
-
-                    </Path>
-                </Grid>
-            </Border>
-
-
-            <Grid Margin="0,18,0,0">
-                <Grid.RowDefinitions>
-                    <RowDefinition Height="auto"/>
-                    <RowDefinition/>
-                </Grid.RowDefinitions>
-                <CommonControls:SlidContent x:Name="SlidOpacity" HorizontalAlignment="Right">
-                    <!--<i:Interaction.Triggers>
-                        <i:EventTrigger EventName="SelectedValueChanged">
-                            <i:InvokeCommandAction Command="{Binding SelectedValueChangedCommand}"/>
-                        </i:EventTrigger>
-                    </i:Interaction.Triggers>-->
-                </CommonControls:SlidContent>
-                <CommonControls:ColorContent Grid.Row="1" x:Name="cusColor" />
-            </Grid>
-
-        </StackPanel>
-    </Grid>
-</UserControl>

+ 1 - 0
PDFSettings/PDFSettings.csproj

@@ -61,6 +61,7 @@
     <Compile Include="DialogCounter.cs" />
     <Compile Include="DpiHelpers.cs" />
     <Compile Include="PDFBackgroundList.cs" />
+    <Compile Include="PDFToolsList.cs" />
     <Compile Include="ProductActiveInfo.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="RecentOpenFiles.cs" />

+ 33 - 0
PDFSettings/PDFToolsList.cs

@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDFSettings
+{
+
+    public class AllPDFToolsList : List<ToolItem>
+    {
+
+    }
+
+    public class QuickPDFToolsList : List<ToolItem>
+    {
+
+    }
+
+    public class ToolItem
+    {
+        public bool IsShowConciseContent { get; set; }
+        public bool IsNewTool { get; set; }
+        public int Id { get; set; }
+        public int Tag { get; set; }
+        public string TagStr { get; set; }
+        public string Image { get; set; }
+        public string TitleInfo { get; set; }
+        public string Title { get; set; }
+
+    }
+
+}