Sfoglia il codice sorgente

Merge branch 'dev' of http://git.kdan.cc:8865/Windows/PDFOffice_Windows_exe into dev

OYXH\oyxh 2 anni fa
parent
commit
5b0267e1ea
37 ha cambiato i file con 1161 aggiunte e 730 eliminazioni
  1. 1 0
      PDF Office/App.xaml.cs
  2. 5 2
      PDF Office/EventAggregators/FillAndSignEvent.cs
  3. 5 0
      PDF Office/Model/DialogNames.cs
  4. 0 2
      PDF Office/Model/SettingsDialog/InitialVIewModel.cs
  5. 10 0
      PDF Office/PDF Office.csproj
  6. BIN
      PDF Office/Resources/PromotionIcon/black_pdfreaderpro_home_en.png
  7. 69 0
      PDF Office/Settings.cs
  8. 2 1
      PDF Office/StyleAndTemplateList.txt
  9. 8 5
      PDF Office/Styles/ListViewStyle.xaml
  10. 15 1
      PDF Office/ViewModels/BOTA/BOTAContentViewModel.cs
  11. 34 9
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDialogViewModel.cs
  12. 0 4
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModBookletContentViewModel.cs
  13. 2 1
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModMultipleContentViewModel.cs
  14. 31 0
      PDF Office/ViewModels/Dialog/ServiceDialog/IAPCompareDialogViewModel.cs
  15. 23 5
      PDF Office/ViewModels/FillAndSign/FillAndSignContentViewModel.cs
  16. 17 7
      PDF Office/ViewModels/MainContentViewModel.cs
  17. 31 1
      PDF Office/ViewModels/MainWindowViewModel.cs
  18. 2 0
      PDF Office/ViewModels/PropertyPanel/ViewModular/ReadViewContentViewModel.cs
  19. 9 2
      PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Command.cs
  20. 6 6
      PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Function.cs
  21. 1 0
      PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Properties.cs
  22. 18 2
      PDF Office/ViewModels/ViewContentViewModel.cs
  23. 4 1
      PDF Office/Views/BOTA/BOTAContent.xaml
  24. 5 0
      PDF Office/Views/BOTA/BOTAContent.xaml.cs
  25. 9 5
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDialog.xaml
  26. 21 0
      PDF Office/Views/Dialog/ServiceDialog/IAPCompareDialog.xaml
  27. 28 0
      PDF Office/Views/Dialog/ServiceDialog/IAPCompareDialog.xaml.cs
  28. 179 164
      PDF Office/Views/Dialog/SettingsDialog.xaml
  29. 4 1
      PDF Office/Views/HomeContent.xaml.cs
  30. 36 13
      PDF Office/Views/HomePanel/PromotionContent.xaml
  31. 69 11
      PDF Office/Views/HomePanel/PromotionContent.xaml.cs
  32. 442 442
      PDF Office/Views/MainWindow.xaml
  33. 35 35
      PDF Office/Views/Tools/ToolsBarContent.xaml.cs
  34. 12 2
      PDF Office/Views/ViewContent.xaml
  35. 10 0
      PDF Office/Views/ViewContent.xaml.cs
  36. 5 8
      PDFSettings/APPSettingProperties.cs
  37. 13 0
      PDFSettings/RecentOpenFiles.cs

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

@@ -454,6 +454,7 @@ namespace PDF_Office
 
             //新手引导弹窗
             containerRegistry.RegisterDialog<NoviceGuidDialog>(DialogNames.GuidDialog);
+            containerRegistry.RegisterDialog<IAPCompareDialog>(DialogNames.IAPCompareDialog);
             #endregion 注册弹窗
         }
 

+ 5 - 2
PDF Office/EventAggregators/FillAndSignEvent.cs

@@ -1,4 +1,5 @@
-using Prism.Events;
+using ComPDFKitViewer.AnnotEvent;
+using Prism.Events;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -11,9 +12,11 @@ namespace PDF_Office.EventAggregators
     public class FillAndSigntEventArgs
     {
         public string Unicode { get; set; }
+        public string AppUnicode { get; set; }
+        public List<AnnotHandlerEventArgs> Annots { get; set; }
+
     }
     public class FillAndSignEvent : PubSubEvent<FillAndSigntEventArgs>
     {
-
     }
 }

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

@@ -11,6 +11,11 @@ namespace PDF_Office.Model
     /// </summary>
     public static class DialogNames
     {
+        /// <summary>
+        /// 付费比较表
+        /// </summary>
+        public static string IAPCompareDialog = "IAPCompareDialog";
+
         /// <summary>
         /// 新手引导弹窗
         /// </summary>

+ 0 - 2
PDF Office/Model/SettingsDialog/InitialVIewModel.cs

@@ -181,7 +181,6 @@ namespace PDF_Office.Model.SettingsDialog
             this.NotShowBOTA = view.NotShowBOTA;
             this.RememberBOTA = view.RememberBOTA;
             this.ShowOutLine = view.ShowOutLine;
-            this.IsBOTAOpen = view.IsBOTAOpen;
             this.AutoExpandProperty =view.AutoExpandProperty;
             this.ClickOpenProperty = view.ClickOpenProperty;
             this.BackGround = view.BackGround;
@@ -201,7 +200,6 @@ namespace PDF_Office.Model.SettingsDialog
             view.NotShowBOTA = this.NotShowBOTA;
             view.RememberBOTA = this.RememberBOTA;
             view.ShowOutLine = this.ShowOutLine;
-            view.IsBOTAOpen = this.IsBOTAOpen;
             view.AutoExpandProperty = this.AutoExpandProperty;
             view.ClickOpenProperty = this.ClickOpenProperty;
             view.BackGround = this.BackGround;

+ 10 - 0
PDF Office/PDF Office.csproj

@@ -434,6 +434,7 @@
       <DesignTime>True</DesignTime>
       <AutoGen>True</AutoGen>
     </Compile>
+    <Compile Include="Settings.cs" />
     <Compile Include="Strings\HomePage\HomePage.Designer.cs">
       <AutoGen>True</AutoGen>
       <DesignTime>True</DesignTime>
@@ -457,6 +458,7 @@
     <Compile Include="ViewModels\Dialog\Redaction\PageMarkDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\Redaction\RepeatMarkDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ServiceDialog\CodeRegionViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\ServiceDialog\IAPCompareDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ServiceDialog\LoginDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ServiceDialog\LoginPasswordRegionViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ServiceDialog\LoginRegionViewModel.cs" />
@@ -850,6 +852,9 @@
     <Compile Include="Views\Dialog\ServiceDialog\CodeRegion.xaml.cs">
       <DependentUpon>CodeRegion.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\Dialog\ServiceDialog\IAPCompareDialog.xaml.cs">
+      <DependentUpon>IAPCompareDialog.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\Dialog\ServiceDialog\LoginDialog.xaml.cs">
       <DependentUpon>LoginDialog.xaml</DependentUpon>
     </Compile>
@@ -1623,6 +1628,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\Dialog\ServiceDialog\IAPCompareDialog.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\Dialog\ServiceDialog\LoginDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -2188,6 +2197,7 @@
     <Content Include="Resources\GuidItems\Guid_SignUp.png">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
+    <Resource Include="Resources\PromotionIcon\black_pdfreaderpro_home_en.png" />
     <Content Include="source\AnalysisWord\Res\word\_rels\document.xml.rels">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>

BIN
PDF Office/Resources/PromotionIcon/black_pdfreaderpro_home_en.png


+ 69 - 0
PDF Office/Settings.cs

@@ -0,0 +1,69 @@
+using System.Configuration;
+using System.IO;
+
+namespace PDF_Office.Properties {
+    
+    
+    // 通过此类可以处理设置类的特定事件: 
+    //  在更改某个设置的值之前将引发 SettingChanging 事件。
+    //  在更改某个设置的值之后将引发 PropertyChanged 事件。
+    //  在加载设置值之后将引发 SettingsLoaded 事件。
+    //  在保存设置值之前将引发 SettingsSaving 事件。
+    internal sealed partial class Settings {
+        
+        public Settings() {
+            // // 若要为保存和更改设置添加事件处理程序,请取消注释下列行: 
+            //
+            // this.SettingChanging += this.SettingChangingEventHandler;
+            //
+             this.SettingsSaving += this.SettingsSavingEventHandler;
+            //
+        }
+        
+        private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
+            // 在此处添加用于处理 SettingChangingEvent 事件的代码。
+        }
+        
+        private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
+            // 在此处添加用于处理 SettingsSaving 事件的代码。
+            try
+            {
+                //判断配置文件是否可写
+                var filepath = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal).FilePath;
+                if (isFileLocked(filepath))
+                {
+                    e.Cancel = true;
+                }
+            }
+            catch
+            {
+            }
+        }
+
+        /// <summary>
+        /// 判断文件是否被占用
+        /// </summary>
+        /// <param name="pathName"></param>
+        /// <returns></returns>
+        public static bool isFileLocked(string pathName)
+        {
+            try
+            {
+                if (!File.Exists(pathName))
+                {
+                    return false;
+                }
+
+                using (var fs = new FileStream(pathName, FileMode.Open, FileAccess.Read, FileShare.None))
+                {
+                    fs.Close();
+                }
+            }
+            catch
+            {
+                return true;
+            }
+            return false;
+        }
+    }
+}

+ 2 - 1
PDF Office/StyleAndTemplateList.txt

@@ -69,9 +69,10 @@
                     if (result.Password != null)
                     {
                         string filePath = PDFViewer.Document.FilePath;
-                        PDFViewer.Document.Release();
+                        PDFViewer.CloseDocument();
                         PDFViewer.InitDocument(filePath);
                         PDFViewer.Document.UnlockWithPassword(result.Password);
+                        PDFViewer.Load();
                     }
                    ///TODO:
                    ///此处填入需要执行的代码

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

@@ -320,15 +320,18 @@
         <Setter Property="VerticalContentAlignment" Value="Center" />
         <Setter Property="MinWidth" Value="88" />
         <Setter Property="MinHeight" Value="0" />
+        <Setter Property="Background" Value="Transparent" />
         <Setter Property="AllowDrop" Value="False" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="ListViewItem">
-                    <ContentControl
-                        Width="{TemplateBinding Width}"
-                        HorizontalContentAlignment="Stretch"
-                        Content="{TemplateBinding Content}"
-                        ContentTemplate="{TemplateBinding ContentTemplate}" />
+                    <Border Background="{TemplateBinding Background}">
+                        <ContentControl
+                            Width="{TemplateBinding Width}"
+                            HorizontalContentAlignment="Stretch"
+                            Content="{TemplateBinding Content}"
+                            ContentTemplate="{TemplateBinding ContentTemplate}" />
+                    </Border>
                 </ControlTemplate>
             </Setter.Value>
         </Setter>

+ 15 - 1
PDF Office/ViewModels/BOTA/BOTAContentViewModel.cs

@@ -13,6 +13,7 @@ using DryIoc;
 using Prism.Services.Dialogs;
 using PDF_Office.Views.PageEdit;
 using PDF_Office.Properties;
+using PDF_Office.Helper;
 
 namespace PDF_Office.ViewModels.BOTA
 {
@@ -69,7 +70,7 @@ namespace PDF_Office.ViewModels.BOTA
         private void TabControlSelectionChangedEvent(object e)
         {
             var args = e as SelectionChangedEventArgs;
-            if (args != null)
+            if (args != null&&args.AddedItems.Count>0)
             {
                 if (!string.IsNullOrEmpty((args.AddedItems[0] as TabItem).Name))
                 {
@@ -109,6 +110,11 @@ namespace PDF_Office.ViewModels.BOTA
                 param.Add(ParameterNames.BOTAThumb, true);
             }
             regions.RequestNavigate(BOTAContentRegionName, viewNameByTabItem[currentBar], param);
+
+            var info =  SettingHelper.GetFileInfo(pdfViewer.Document.FilePath);
+            info.BOTASelectedTab = currentBar;
+            info.BOTASelectedInex = SelectedIndex;
+            SettingHelper.SetFileInfo(info);
         }
 
         #region Navigate
@@ -143,6 +149,14 @@ namespace PDF_Office.ViewModels.BOTA
                 viewContentViewModel.OpenBOTA = true;
             }
 
+            //记录上一次BOTA展开情况
+            if(Settings.Default.AppProperties.InitialVIew.RememberBOTA)
+            {
+                var info = SettingHelper.GetFileInfo(pdfview.Document.FilePath);
+                SelectedIndex = info.BOTASelectedInex;
+                EnterSelectedBar(info.BOTASelectedTab);
+                viewContentViewModel.OpenBOTA = true;
+            }
         }
 
         #endregion Navigate

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

@@ -85,7 +85,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                 SetProperty(ref T_copies, value);
             }
         }
-        
+
         private string T_blackAndWhite;
 
         public string T_BlackAndWhite
@@ -96,7 +96,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                 SetProperty(ref T_blackAndWhite, value);
             }
         }
-        
+
         private string T_printSettings;
 
         public string T_PrintSettings
@@ -142,7 +142,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
         }
 
 
-        private void  InitString()
+        private void InitString()
         {
             T_Title = App.MainPageLoader.GetString("Print_Title");
             T_Printer = App.MainPageLoader.GetString("Print_Printer");
@@ -359,6 +359,15 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
             }
         }
 
+        private string _customRangeString;
+        public string CustomRangeString
+        {
+            get => _customRangeString;
+            set
+            {
+                SetProperty(ref _customRangeString, value);
+            }
+        }
         public bool IsFirstOpen = true;
         string Unicode = null;
         #endregion
@@ -1007,13 +1016,12 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
 
         public void OnDialogOpened(IDialogParameters parameters)
         {
-             
             parameters.TryGetValue<CPDFViewer>(ParameterNames.PDFViewer, out PDFViewer);
 
             VerifyPasswordResult result = SecurityHelper.VerifyPasswordForSelectedPermissions(PDFViewer.Document, Model.Dialog.ToolsDialogs.SaftyDialogs.EnumPermissionsSet.StatusAllowsPrinting, printDialogs);
             if (result.IsDiscryptied)
             {
-                if (result.Password!=null)
+                if (result.Password != null)
                 {
                     string filePath = PDFViewer.Document.FilePath;
                     PDFViewer.CloseDocument();
@@ -1021,7 +1029,6 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                     PDFViewer.Document.UnlockWithPassword(result.Password);
                     PDFViewer.Load();
                 }
-
                 ///TODO:
                 ///此处填入需要执行的代码
             }
@@ -1033,8 +1040,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                 }));
             }
 
-
-            if (PDFViewer != null && PDFViewer.Document != null)
+            if (PDFViewer != null && PDFViewer.Document != null && result.IsDiscryptied)
             {
                 for (int temp = 0; temp < PDFViewer.Document.PageCount; temp++)
                 {
@@ -1052,9 +1058,28 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                 if (parameters.TryGetValue<List<int>>(ParameterNames.PageList, out PageList))
                 {
                     PageListString = CommonHelper.GetPageParmFromList(PageList);
+
                     if (!string.IsNullOrEmpty(PageListString))
                     {
-                        PrintSettingsInfo.PageRangeList = PageList;
+                        if (PageList.Count == 1)
+                        {
+                            System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
+                            {
+                                PageRangeSelectIndex = 1;
+                            }));
+
+                        }
+                        else
+                        {
+                            PrintSettingsInfo.PageRangeList = PageList;
+                            System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
+                            {
+                                CustomRangeString = PageListString;
+                                PageRangeSelectIndex = 4;
+
+                            }));
+
+                        }
                     }
                 }
 

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

@@ -250,10 +250,6 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                 InitBookletInfo();
                 SendBookletInfo();
             }
-            else
-            {
-                Trace.WriteLine("No Key Named{0}", "document");
-            }
         }
     }
 }

+ 2 - 1
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModMultipleContentViewModel.cs

@@ -316,7 +316,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
             }
             if (MultipleInfo != null)
             {
-                MultipleInfo.VerticalPageNumber = (int)VerticalPageNumber;
+                MultipleInfo.VerticalPageNumber = (int)VerticalPageNumber; 
                 MultipleInfo.HorizontalPageNumber = (int)HorizontalPageNumber;
                 MultipleInfo.IsAutoRotate = IsAutoRotate;
                 MultipleInfo.EnumPageOrder = (EnumPageOrder)PageOrderIndex;
@@ -340,3 +340,4 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
         }
     }
 }
+    

+ 31 - 0
PDF Office/ViewModels/Dialog/ServiceDialog/IAPCompareDialogViewModel.cs

@@ -0,0 +1,31 @@
+using Prism.Mvvm;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.ViewModels.Dialog.ServiceDialog
+{
+    public class IAPCompareDialogViewModel : BindableBase,IDialogAware
+    {
+        public string Title => "";
+
+        public event Action<IDialogResult> RequestClose;
+
+        public bool CanCloseDialog()
+        {
+            return true;
+        }
+
+        public void OnDialogClosed()
+        {
+           
+        }
+
+        public void OnDialogOpened(IDialogParameters parameters)
+        {
+        }
+    }
+}

+ 23 - 5
PDF Office/ViewModels/FillAndSign/FillAndSignContentViewModel.cs

@@ -100,12 +100,13 @@ namespace PDF_Office.ViewModels.FillAndSign
         /// </summary>
         public Dictionary<string, string> btnToProperty = new Dictionary<string, string>();
         #endregion
-
+        string Unicode = "";
         public FillAndSignContentViewModel(IRegionManager regionManager, IEventAggregator events)
         {
            
             regions = regionManager;
             this.events = events;
+            Unicode = App.mainWindowViewModel.SelectedItem.Unicode;
             CheckCommand = new DelegateCommand<RoutedEventArgs>(CheckedEvent);
             ToolExpandDict.Add("Freetext", AnnotArgsType.AnnotFreeText);
             InitDictionary();
@@ -122,7 +123,7 @@ namespace PDF_Office.ViewModels.FillAndSign
         #region 事件聚合器(来自AnnotToolContentViewModel)
         private void SubscribeEvent()
         {
-            events.GetEvent<FillAndSignEvent>().Subscribe(FromFillAndSign);
+            events.GetEvent<FillAndSignEvent>().Subscribe(FromFillAndSign, e => e.AppUnicode == Unicode);
         }
 
         private void FromFillAndSign(FillAndSigntEventArgs obj)
@@ -131,8 +132,25 @@ namespace PDF_Office.ViewModels.FillAndSign
             {
                 if(string.IsNullOrEmpty(obj.Unicode) == false)
                 {
-                    AnnotHandlerEventArgs annotArgs = null;
-                    FindAnnotTypeKey(obj.Unicode, ref annotArgs);
+                    if(obj.Unicode == "Clear")
+                    {
+                        viewContentViewModel.FillAndSign.Clear();
+                    }
+                    else
+                    {
+                        if(obj.Annots != null && obj.Annots.Count > 0)
+                        {
+                            if (obj.Annots[0].EventType == AnnotArgsType.AnnotFreehand)
+                            {
+                                GetFreehand(obj.Annots);
+                            }
+                            else if(obj.Annots[0].EventType == AnnotArgsType.AnnotFreeText)
+                            {
+                                GetFreetext(obj.Annots);
+                            }
+                        }
+                    }
+                   
                 }
             }
         }
@@ -835,7 +853,7 @@ namespace PDF_Office.ViewModels.FillAndSign
                     foreach (var itemAnnot in annots)
                     {
                         var eventitem = AnnotAttribEvent.GetAnnotAttribEvent(itemAnnot, annotAttribsList);
-                        PDFViewer.SelectAnnotation(itemAnnot.PageIndex, itemAnnot.AnnotIndex);
+                        //PDFViewer.SelectAnnotation(itemAnnot.PageIndex, itemAnnot.AnnotIndex);
                         propertyPanel.AnnotEvents.Add(eventitem);
 
                     }

+ 17 - 7
PDF Office/ViewModels/MainContentViewModel.cs

@@ -26,6 +26,7 @@ using System.Drawing.Imaging;
 using ComPDFKit.PDFDocument;
 using static PDF_Office.Model.Dialog.ToolsDialogs.SaftyDialogs.DeleteSafetySettintgsModel;
 using PDF_Office.Model.Dialog.ToolsDialogs.SaftyDialogs;
+using PDF_Office.Properties;
 
 namespace PDF_Office.ViewModels
 {
@@ -357,12 +358,17 @@ namespace PDF_Office.ViewModels
             }
 
             PDFViewer.Load();
+            PDFViewer.SetFormFieldHighlight(Settings.Default.AppProperties.InitialVIew.HighlightLink);
+            PDFViewer.SetBackgroundBrush(new System.Windows.Media.SolidColorBrush(Settings.Default.AppProperties.InitialVIew.BackGround));
 
             if (App.mainWindowViewModel != null)
             {
                 App.mainWindowViewModel.CurrentPDFViewer = PDFViewer;
             }
-            App.OpenedFileList.Add(path);
+            if (!App.OpenedFileList.Contains(path))
+            {
+                App.OpenedFileList.Add(path);
+            }
             return true;
         }
 
@@ -429,11 +435,11 @@ namespace PDF_Office.ViewModels
             }
 
             //设置背景色
-            ////PDFViewer.SetBackgroundBrush(new SolidColorBrush((Color)System.Windows.Media.ColorConverter.ConvertFromString(Settings.Default.AppProperties.InitialVIew.Background)));
+            PDFViewer.SetBackgroundBrush(new System.Windows.Media.SolidColorBrush(Settings.Default.AppProperties.InitialVIew.BackGround));
             PDFViewer.Load();
             PDFViewer.UndoManager.CanSave = true;
             FileChanged = Visibility.Visible;
-            PDFViewer.SetFormFieldHighlight(true);
+            PDFViewer.SetFormFieldHighlight(Settings.Default.AppProperties.InitialVIew.HighlightLink);
 
             NavigateToViewContent();
             return true;
@@ -571,11 +577,11 @@ namespace PDF_Office.ViewModels
 
                 PDFViewer.Document.ImportPages(tempdoc, "");
 
-                //PDFViewer.SetBackgroundBrush(new SolidColorBrush((Color)System.Windows.Media.ColorConverter.ConvertFromString(Settings.Default.AppProperties.InitialVIew.Background)));
+                PDFViewer.SetBackgroundBrush(new System.Windows.Media.SolidColorBrush(Settings.Default.AppProperties.InitialVIew.BackGround));
                 PDFViewer.Load();
                 PDFViewer.UndoManager.CanSave = true;
                 FileChanged = Visibility.Visible;
-                PDFViewer.SetFormFieldHighlight(true);
+                PDFViewer.SetFormFieldHighlight(Settings.Default.AppProperties.InitialVIew.HighlightLink);
 
                 await System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
                 {
@@ -644,6 +650,7 @@ namespace PDF_Office.ViewModels
         public async void OnNavigatedTo(NavigationContext navigationContext)
         {
             mainWindowViewModel = App.mainWindowViewModel;
+
             //因为是异步打开多个文件,需要先显示Home界面
             NavigationParameters parameters = new NavigationParameters();
             parameters.Add(ParameterNames.MainViewModel, this);
@@ -682,8 +689,11 @@ namespace PDF_Office.ViewModels
                     return;
                 }
 
-                //更新已打开的文件记录
-                App.OpenedFileList.Add(filepath);
+                if (!App.OpenedFileList.Contains(filepath))
+                {
+                    //更新已打开的文件记录
+                    App.OpenedFileList.Add(filepath);
+                }
             }
         }
 

+ 31 - 1
PDF Office/ViewModels/MainWindowViewModel.cs

@@ -241,7 +241,25 @@ namespace PDF_Office.ViewModels
             {
                 System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
                 {
-                    region.RequestNavigate(RegionNames.MainRegion, "MainContent");
+
+                    if (Settings.Default.AppProperties.NeedToOpenFileList != null && Settings.Default.AppProperties.NeedToOpenFileList.Count > 0)
+                    {
+                        List<string> files = Settings.Default.AppProperties.NeedToOpenFileList;
+
+
+                        foreach (var file in files)
+                        {
+                            this.AddTabItem(file);
+                        }
+
+                        Settings.Default.AppProperties.NeedToOpenFileList.Clear();
+                        Settings.Default.Save();
+                        return;
+                    }
+                    else
+                    {
+                        region.RequestNavigate(RegionNames.MainRegion, "MainContent");
+                    }
 
                     try
                     {
@@ -361,6 +379,13 @@ namespace PDF_Office.ViewModels
         /// </summary>
         public bool closeAllTabItem()
         {
+            //下一次重新打开未关闭的文档
+            if (Settings.Default.AppProperties.Description.OpenUnClosedFileWhenOpen)
+            {
+                Settings.Default.AppProperties.NeedToOpenFileList = App.OpenedFileList;
+                Settings.Default.Save();
+            }
+
             while (region.Regions[RegionNames.MainRegion].Views.Count() > 0)
             {
                 if (CurrentPDFViewer != null && CurrentPDFViewer.UndoManager.CanSave)
@@ -466,6 +491,11 @@ namespace PDF_Office.ViewModels
         /// <returns></returns>
         private ContentResult ShowSaveDialog(ViewContentViewModel viewContentViewModel)
         {
+            if(Settings.Default.AppProperties.Description.NotShowSaveWhenClose)
+            {
+                //偏好设置里选择自动保存时
+                return ContentResult.Ok;
+            }
             AlertsMessage alertsMessage = new AlertsMessage();
             alertsMessage.ShowDialog("关闭提示", "当前文档有为保存的操作,是否需要保存?", "Cancel", "No", "Ok");
             var result = alertsMessage.result;

+ 2 - 0
PDF Office/ViewModels/PropertyPanel/ViewModular/ReadViewContentViewModel.cs

@@ -1,5 +1,6 @@
 using ComPDFKitViewer.PdfViewer;
 using PDF_Office.Model;
+using PDF_Office.Properties;
 using Prism.Commands;
 using Prism.Mvvm;
 using Prism.Regions;
@@ -152,6 +153,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.ViewModular
         public async void OnNavigatedTo(NavigationContext navigationContext)
         {
             var pdfview = navigationContext.Parameters[ParameterNames.PDFViewer] as CPDFViewer;
+            pdfview.SetBackgroundBrush(new System.Windows.Media.SolidColorBrush(Settings.Default.AppProperties.InitialVIew.BackGroundInFulWindow));
             ViewContentViewModel viewContentView = navigationContext.Parameters[ParameterNames.ViewContentViewModel] as ViewContentViewModel;
             if (pdfview != null)
             {

+ 9 - 2
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Command.cs

@@ -30,8 +30,8 @@ namespace PDF_Office.ViewModels.Tools
 {
     public sealed partial class AnnotToolContentViewModel : BindableBase, INavigationAware
     {
-        #region 事件绑定和解绑
 
+        #region 事件绑定和解绑
         private void BindingEvent()
         {
             //属性面板与注释工具栏绑定:属性面板的属性变化,会同步注释工具栏的属性值
@@ -151,7 +151,14 @@ namespace PDF_Office.ViewModels.Tools
             if (e.ClickCount == 2)
             {
                 if (CurrentSelectedAnnot != null)
-                    PopAnnotNoteText(CurrentSelectedAnnot);
+                {
+                    var type = CurrentSelectedAnnot.EventType;
+                    if (type != AnnotArgsType.AnnotSticky && type != AnnotArgsType.AnnotFreeText &&
+                        type != AnnotArgsType.AnnotHighlight && type != AnnotArgsType.AnnotUnderline && type != AnnotArgsType.AnnotStrikeout)
+                  
+                        PopAnnotNoteText(CurrentSelectedAnnot);
+                }
+                   
             }
         }
 

+ 6 - 6
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Function.cs

@@ -507,7 +507,7 @@ namespace PDF_Office.ViewModels.Tools
             else
             {
                 freehandArgs = selectedArgs[0] as FreehandAnnotArgs;
-                if (NavigatedToFillAndSignVM(freehandArgs, "Freehand"))
+                if (NavigatedToFillAndSignVM(selectedArgs, "Freehand"))
                 {
                     return freehandArgs;
                 }
@@ -591,7 +591,7 @@ namespace PDF_Office.ViewModels.Tools
                 freetextArgs = selectedArgs[0] as FreeTextAnnotArgs;
                 textAlignment = freetextArgs.Align;
 
-                if(NavigatedToFillAndSignVM(freetextArgs, "Freetext"))
+                if(NavigatedToFillAndSignVM(selectedArgs, "Freetext"))
                 {
                     return freetextArgs;
                 }
@@ -602,14 +602,14 @@ namespace PDF_Office.ViewModels.Tools
         }
 
         //Event导航到填写与签名的属性面板
-        private bool NavigatedToFillAndSignVM(AnnotHandlerEventArgs annot, string tag)
+        private bool NavigatedToFillAndSignVM(List<AnnotHandlerEventArgs> annots, string tag)
         {
-            if (viewContentViewModel.FillAndSign != null && viewContentViewModel.FillAndSign.Count > 0)
+            if (viewContentViewModel.FillAndSign != null && viewContentViewModel.FillAndSign.Count > 0 && annots != null && annots.Count > 0)
             {
-                var annotFillAndSign = viewContentViewModel.FillAndSign.FirstOrDefault(temp => temp.Item1 == annot.PageIndex && temp.Item2 == annot.AnnotIndex);
+                var annotFillAndSign = viewContentViewModel.FillAndSign.FirstOrDefault(temp => temp.Item1 == annots[0].PageIndex && temp.Item2 == annots[0].AnnotIndex);
                 if (annotFillAndSign != null)
                 {
-                    this.events.GetEvent<FillAndSignEvent>().Publish(new FillAndSigntEventArgs { Unicode = tag });
+                    this.events.GetEvent<FillAndSignEvent>().Publish(new FillAndSigntEventArgs { Unicode = tag , AppUnicode = App.mainWindowViewModel.SelectedItem.Unicode, Annots = annots });
                     return true;
                 }
             }

+ 1 - 0
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Properties.cs

@@ -279,6 +279,7 @@ namespace PDF_Office.ViewModels.Tools
         private AnnotPropertyPanel propertyPanel = new AnnotPropertyPanel();
         private Dictionary<string, AnnotArgsType> ToolExpandDict = new Dictionary<string, AnnotArgsType>();
         private Dictionary<string, string> ToolTipDict = new Dictionary<string, string>();
+       //private List<Tuple<int,int>> AnnotStamp
         private StickyNotePopup customStickyPopup;
 
         //private bool isHiddenAnnot = true;

+ 18 - 2
PDF Office/ViewModels/ViewContentViewModel.cs

@@ -539,6 +539,9 @@ namespace PDF_Office.ViewModels
             get { return canSave; }
             set
             {
+                if (events != null && canSave == false)
+                    this.events.GetEvent<FillAndSignEvent>().Publish(new FillAndSigntEventArgs { Unicode = "Clear", AppUnicode = unicode });
+
                 SetProperty(ref canSave, value);
             }
         }
@@ -722,6 +725,7 @@ namespace PDF_Office.ViewModels
 
         public DelegateCommand CreateBlankFileCommand { get; set; }
 
+        public DelegateCommand ClosePropertyCommand { get; set; }
         #endregion 命令
 
         public ViewContentViewModel(IRegionManager regionManager, IDialogService dialogService, IEventAggregator eventAggregator)
@@ -765,7 +769,7 @@ namespace PDF_Office.ViewModels
 
             SettingsCommand = new DelegateCommand(SettingsEvent);
             CreateLinkCommand = new DelegateCommand<object>(CreateLinkEvent);
-
+            ClosePropertyCommand = new DelegateCommand(CloseProperty);
             //未显示时无法注册上Region名称
             ToolContentVisible = Visibility.Visible;
             ToolsBarContentVisible = Visibility.Visible;
@@ -1189,6 +1193,11 @@ namespace PDF_Office.ViewModels
             }
         }
 
+        private void CloseProperty()
+        {
+            IsPropertyOpen = false;
+        }
+
         /// <summary>
         /// 在文件资源管理器中显示
         /// </summary>
@@ -1222,6 +1231,10 @@ namespace PDF_Office.ViewModels
         private void SettingsEvent()
         {
             dialogs.ShowDialog(DialogNames.SettingsDialog, null, null);
+            if(PDFViewer!=null)
+            {
+                PDFViewer.SetBackgroundBrush(new System.Windows.Media.SolidColorBrush(Settings.Default.AppProperties.InitialVIew.BackGround));
+            }
         }
 
         private bool CanSaveExcute()
@@ -1452,6 +1465,8 @@ namespace PDF_Office.ViewModels
                     var contentRegion = region.Regions[ViwerRegionName];
                     contentRegion.Remove(PDFViewer);
                 }
+                //还原背景色
+                PDFViewer.SetBackgroundBrush(new System.Windows.Media.SolidColorBrush(Settings.Default.AppProperties.InitialVIew.BackGround));
                 region.AddToRegion(ViwerRegionName, PDFViewer);
             }
             if (string.IsNullOrEmpty(CurrentBar) || CurrentBar.Equals("TabItemPageEdit", StringComparison.OrdinalIgnoreCase))
@@ -1760,7 +1775,8 @@ namespace PDF_Office.ViewModels
         private void GetOpenFileInfo()
         {
             OpenFileInfo = SettingHelper.GetFileInfo(PDFViewer.Document.FilePath);
-            if (OpenFileInfo != null)
+            //偏好设置里设置了记录上次视图设置时
+            if (OpenFileInfo != null&&Settings.Default.AppProperties.Description.RecoveryViewWhenOpen)
             {
                 if (OpenFileInfo.LastViewMode != PDFViewer.ModeView)
                 {

+ 4 - 1
PDF Office/Views/BOTA/BOTAContent.xaml

@@ -21,7 +21,10 @@
             <convert:BoolToVisible x:Key="BoolToVisibleConvert" />
         </ResourceDictionary>
     </UserControl.Resources>
-    <Grid Background="{StaticResource color.sys.layout.mg}">
+
+
+
+        <Grid Background="{StaticResource color.sys.layout.mg}">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="48" />
             <ColumnDefinition />

+ 5 - 0
PDF Office/Views/BOTA/BOTAContent.xaml.cs

@@ -53,5 +53,10 @@ namespace PDF_Office.Views.BOTA
                 (this.DataContext as BOTAContentViewModel).viewContentViewModel.OpenBOTA = !(this.DataContext as BOTAContentViewModel).viewContentViewModel.OpenBOTA;
             }
         }
+
+        private void CloseBOTACommand_Executed(object sender, ExecutedRoutedEventArgs e)
+        {
+           
+        }
     }
 }

+ 9 - 5
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDialog.xaml

@@ -19,7 +19,7 @@
                         <ControlTemplate.Triggers>
                             <Trigger Property="IsMouseOver" Value="True">
                                 <Setter Property="Background" TargetName="PageSettingsBtnBorder" Value="{StaticResource color.btn.sec.bg.hov}"></Setter>
-                             </Trigger>
+                            </Trigger>
                             <Trigger Property="IsPressed" Value="True">
                                 <Setter Property="Background" TargetName="PageSettingsBtnBorder" Value="{StaticResource color.btn.sec.bg.act}"></Setter>
                             </Trigger>
@@ -71,14 +71,17 @@
                 <Grid Grid.Column="1">
                     <Grid>
                         <Grid.RowDefinitions>
-                            <RowDefinition Height="310"></RowDefinition>
+                            <!--310 - 88-->
+                                <RowDefinition Height="222"></RowDefinition>
                             <RowDefinition Height="216"></RowDefinition>
                         </Grid.RowDefinitions>
                         <Grid Grid.Row="0" Margin="0,0,0,0" >
                             <Grid.RowDefinitions>
+                                <!--61 、27 -->
                                 <RowDefinition  Height="72"></RowDefinition>
                                 <RowDefinition Height="150"></RowDefinition>
-                                <RowDefinition Height="*"></RowDefinition>
+                                <RowDefinition Height="0"></RowDefinition>
+                                <RowDefinition Height="0"/>
                             </Grid.RowDefinitions>
                             <StackPanel Grid.Row="0" Orientation="Vertical">
                                 <StackPanel Orientation="Horizontal">
@@ -109,7 +112,7 @@
                                 <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                                     <StackPanel Orientation="Horizontal">
                                         <TextBlock Text="Page range:" FontFamily="Segoe UI" FontSize="14" Height="22" Width="80"></TextBlock>
-                                        <cus:WritableComboBox  x:Name="PageRangeComboBox" Loaded="PageRangeComboBox_Loaded" Width="132" Height="32" Margin="16,0,0,0" MaxPageRange="{Binding MaxPageRange, Mode=TwoWay}"  SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}">
+                                        <cus:WritableComboBox  x:Name="PageRangeComboBox" Loaded="PageRangeComboBox_Loaded" Text="{Binding CustomRangeString, Mode=TwoWay}" Width="132" Height="32" Margin="16,0,0,0" MaxPageRange="{Binding MaxPageRange, Mode=TwoWay}"  SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}">
                                             <i:Interaction.Triggers>
                                                 <i:EventTrigger EventName="SelectionChanged">
                                                     <i:InvokeCommandAction Command="{Binding SetPageRangeSelectionIndexCommand}" CommandParameter="{Binding ElementName=PageRangeComboBox}"></i:InvokeCommandAction>
@@ -150,7 +153,8 @@
                                     </CheckBox>
                                 </StackPanel>
                             </StackPanel>
-                            <StackPanel Grid.Row="2" Orientation="Vertical" Margin="0,18,0,0">
+                            <!--TODO: Visibility解锁多功能打印-->
+                            <StackPanel Grid.Row="2" Orientation="Vertical" Margin="0,18,0,0" Visibility="Collapsed" Grid.RowSpan="2">
                                 <StackPanel Orientation="Horizontal">
                                     <TextBlock Text="Page Sizing &amp; Handling" FontFamily="Segoe UI" FontSize="12" Foreground="#616469"/>
                                     <Label Padding="0,0,0,0" Margin="9,0,0,0">

+ 21 - 0
PDF Office/Views/Dialog/ServiceDialog/IAPCompareDialog.xaml

@@ -0,0 +1,21 @@
+<UserControl
+    x:Class="PDF_Office.Views.Dialog.ServiceDialog.IAPCompareDialog"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:local="clr-namespace:PDF_Office.Views.Dialog.ServiceDialog"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    xmlns:prism="http://prismlibrary.com/"
+    Width="586"
+    Height="800"
+    d:DesignHeight="450"
+    d:DesignWidth="800"
+    prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
+    mc:Ignorable="d">
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition />
+            <RowDefinition />
+        </Grid.RowDefinitions>
+    </Grid>
+</UserControl>

+ 28 - 0
PDF Office/Views/Dialog/ServiceDialog/IAPCompareDialog.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PDF_Office.Views.Dialog.ServiceDialog
+{
+    /// <summary>
+    /// IAPCompareDialog.xaml 的交互逻辑
+    /// </summary>
+    public partial class IAPCompareDialog : UserControl
+    {
+        public IAPCompareDialog()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 179 - 164
PDF Office/Views/Dialog/SettingsDialog.xaml

@@ -176,8 +176,11 @@
                                         Foreground="{StaticResource color.sys.text.neutral.lv3}"
                                         Text="10 to 50" />
                                 </StackPanel>
-                                <Rectangle Width="446" Height="1" Fill="{StaticResource color.sys.layout.divider}"></Rectangle>
-                                    <StackPanel Margin="8" Orientation="Horizontal">
+                                <Rectangle
+                                    Width="446"
+                                    Height="1"
+                                    Fill="{StaticResource color.sys.layout.divider}" />
+                                <StackPanel Margin="8" Orientation="Horizontal">
                                     <CheckBox
                                         Name="ChkAutoSave"
                                         Content="APP自动保存文件,频次为每"
@@ -235,25 +238,25 @@
                             </StackPanel>
                         </Border>
                         <Grid Visibility="Collapsed">
-                        <Label Content="打开图片文档" Style="{StaticResource Label}" />
-                        <Border
-                            Margin="0,10,0,18"
-                            Background="{StaticResource color.sys.layout.mg}"
-                            CornerRadius="6">
-                            <StackPanel>
-                                <RadioButton
-                                    Margin="9,12,0,0"
-                                    Content="自动扫描并识别文本"
-                                    IsChecked="{Binding Descript.AutoScanImageFile, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                                    Style="{DynamicResource RadioButtonStyle1}" />
-                                <RadioButton
-                                    Grid.Row="1"
-                                    Margin="9,10"
-                                    Content="提示扫描并识别文本"
-                                    IsChecked="{Binding Descript.TipScanImageFile, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                                    Style="{DynamicResource RadioButtonStyle1}" />
-                            </StackPanel>
-                        </Border>
+                            <Label Content="打开图片文档" Style="{StaticResource Label}" />
+                            <Border
+                                Margin="0,10,0,18"
+                                Background="{StaticResource color.sys.layout.mg}"
+                                CornerRadius="6">
+                                <StackPanel>
+                                    <RadioButton
+                                        Margin="9,12,0,0"
+                                        Content="自动扫描并识别文本"
+                                        IsChecked="{Binding Descript.AutoScanImageFile, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                        Style="{DynamicResource RadioButtonStyle1}" />
+                                    <RadioButton
+                                        Grid.Row="1"
+                                        Margin="9,10"
+                                        Content="提示扫描并识别文本"
+                                        IsChecked="{Binding Descript.TipScanImageFile, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                        Style="{DynamicResource RadioButtonStyle1}" />
+                                </StackPanel>
+                            </Border>
                         </Grid>
                         <WrapPanel>
                             <Label
@@ -346,11 +349,12 @@
                                     Content="打开APP记住上次选择"
                                     IsChecked="{Binding View.RememberBOTA, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                     Style="{DynamicResource RadioButtonStyle1}" />
-                                <CheckBox
+                                <RadioButton
                                     Margin="8,8,0,8"
                                     Content="有大纲时默认显示大纲列表"
                                     Foreground="{StaticResource color.sys.text.neutral.lv1}"
-                                    IsChecked="{Binding View.ShowOutLine}" />
+                                    IsChecked="{Binding View.ShowOutLine, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                    Style="{DynamicResource RadioButtonStyle1}" />
                             </StackPanel>
                         </Border>
 
@@ -380,28 +384,33 @@
                         <WrapPanel Margin="0,8,0,16">
                             <Label Content="正常:" Style="{StaticResource Label2}" />
                             <compositecontrol:ColorContent SelectedColor="{Binding View.BackGround, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ShowColorList="Collapsed" />
-                            <Label Content="全屏:" Style="{StaticResource Label}" Margin="16,0,0,0"/>
+                            <Label
+                                Margin="16,0,0,0"
+                                Content="全屏:"
+                                Style="{StaticResource Label}" />
                             <compositecontrol:ColorContent SelectedColor="{Binding View.BackGroundInFulWindow, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ShowColorList="Collapsed" />
                         </WrapPanel>
-                        <CheckBox
+                        <!--<CheckBox
                             Margin="5,0,0,8"
                             Content="高亮表单"
                             Foreground="{StaticResource color.sys.text.neutral.lv1}"
                             IsChecked="{Binding View.HignlightForm, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
-                        <!--域高亮色-->
-                        <!--<WrapPanel>
+                        -->
+                        <!--  域高亮色  -->
+                        <!--
+                        <WrapPanel>
                             <Label Content="域高亮色:" Style="{StaticResource Label2}" />
                             <compositecontrol:ColorContent SelectedColor="{Binding View.FormHighLightColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ShowColorList="Collapsed" />
                         </WrapPanel>
                         <WrapPanel>
                             <Label Content="必填栏高亮色:" Style="{StaticResource Label2}" />
                             <compositecontrol:ColorContent SelectedColor="{Binding View.RequiredFieldsColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ShowColorList="Collapsed" />
-                        </WrapPanel>
+                        </WrapPanel>-->
                         <CheckBox
                             Margin="5,0,0,8"
                             Content="高亮链接"
                             Foreground="{StaticResource color.sys.text.neutral.lv1}"
-                            IsChecked="{Binding View.HighlightLink, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />-->
+                            IsChecked="{Binding View.HighlightLink, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                     </StackPanel>
                 </ScrollViewer>
             </TabItem>
@@ -427,10 +436,10 @@
                             CornerRadius="6">
                             <Grid Margin="8,4,8,4">
                                 <Grid.ColumnDefinitions>
-                                    <ColumnDefinition Width="148"/>
-                                    <ColumnDefinition Width="88"/>
-                                    <ColumnDefinition Width="*"/>
-                                    <ColumnDefinition Width="56"/>
+                                    <ColumnDefinition Width="148" />
+                                    <ColumnDefinition Width="88" />
+                                    <ColumnDefinition Width="*" />
+                                    <ColumnDefinition Width="56" />
                                 </Grid.ColumnDefinitions>
                                 <Grid.RowDefinitions>
                                     <RowDefinition />
@@ -445,8 +454,9 @@
                                 <compositecontrol:ColorContent
                                     Grid.Column="1"
                                     Height="40"
+                                    HorizontalAlignment="Left"
                                     SelectedColor="{Binding Annote.HighLightColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                                    ShowColorList="Collapsed" HorizontalAlignment="Left"/>
+                                    ShowColorList="Collapsed" />
 
                                 <Label
                                     Grid.Column="2"
@@ -465,8 +475,9 @@
                                     Grid.Row="1"
                                     Grid.Column="1"
                                     Height="40"
+                                    HorizontalAlignment="Left"
                                     SelectedColor="{Binding Annote.StrikethroughColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                                    ShowColorList="Collapsed"  HorizontalAlignment="Left"/>
+                                    ShowColorList="Collapsed" />
                                 <Label
                                     Grid.Row="1"
                                     Grid.Column="2"
@@ -486,8 +497,9 @@
                                     Grid.Row="2"
                                     Grid.Column="1"
                                     Height="40"
+                                    HorizontalAlignment="Left"
                                     SelectedColor="{Binding Annote.UnderLineColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                                    ShowColorList="Collapsed"  HorizontalAlignment="Left"/>
+                                    ShowColorList="Collapsed" />
                                 <Label
                                     Grid.Row="2"
                                     Grid.Column="2"
@@ -507,8 +519,9 @@
                                     Grid.Row="3"
                                     Grid.Column="1"
                                     Height="40"
+                                    HorizontalAlignment="Left"
                                     SelectedColor="{Binding Annote.FreeHandColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                                    ShowColorList="Collapsed"  HorizontalAlignment="Left"/>
+                                    ShowColorList="Collapsed" />
                                 <Label
                                     Grid.Row="3"
                                     Grid.Column="2"
@@ -528,8 +541,9 @@
                                     Grid.Row="4"
                                     Grid.Column="1"
                                     Height="40"
+                                    HorizontalAlignment="Left"
                                     SelectedColor="{Binding Annote.TextAnnoteColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                                    ShowColorList="Collapsed"  HorizontalAlignment="Left"/>
+                                    ShowColorList="Collapsed" />
                                 <Label
                                     Grid.Row="4"
                                     Grid.Column="2"
@@ -538,7 +552,7 @@
                                 <compositecontrol:ColorContent
                                     Grid.Row="4"
                                     Grid.Column="3"
-                                   Height="40"
+                                    Height="40"
                                     SelectedColor="{Binding Annote.CircleFillColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                     ShowColorList="Collapsed" />
                                 <Label
@@ -549,8 +563,9 @@
                                     Grid.Row="5"
                                     Grid.Column="1"
                                     Height="40"
+                                    HorizontalAlignment="Left"
                                     SelectedColor="{Binding Annote.NoteAnnoteColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                                    ShowColorList="Collapsed"  HorizontalAlignment="Left"/>
+                                    ShowColorList="Collapsed" />
                             </Grid>
                         </Border>
 
@@ -559,166 +574,166 @@
                             Margin="0,2,0,0"
                             Background="{StaticResource color.sys.layout.mg}"
                             CornerRadius="6">
-                            <WrapPanel >
+                            <WrapPanel>
                                 <WrapPanel>
                                     <Label Content="文本:" Style="{StaticResource Label2}" />
                                     <ComboBox
-                                    Width="228"
-                                    Height="30"
-                                    ItemsSource="{Binding AnnoteFamilyList}"
-                                    SelectedIndex="{Binding AnnoteSelectedIndex}" />
+                                        Width="228"
+                                        Height="30"
+                                        ItemsSource="{Binding AnnoteFamilyList}"
+                                        SelectedIndex="{Binding AnnoteSelectedIndex}" />
                                     <RadioButton
-                                    Name="RbtLeft"
-                                    Width="32"
-                                    Height="32"
-                                    Margin="8,8,0,8"
-                                    HorizontalAlignment="Center"
-                                    VerticalAlignment="Center"
-                                    IsChecked="{Binding LeftSelected}"
-                                    Style="{StaticResource GreyBgRadioBtnStyle}">
+                                        Name="RbtLeft"
+                                        Width="32"
+                                        Height="32"
+                                        Margin="8,8,0,8"
+                                        HorizontalAlignment="Center"
+                                        VerticalAlignment="Center"
+                                        IsChecked="{Binding LeftSelected}"
+                                        Style="{StaticResource GreyBgRadioBtnStyle}">
                                         <Grid Width="32" Height="32">
                                             <Canvas Margin="5,10,0,0">
                                                 <Rectangle
-                                                Canvas.Top="0.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=RbtLeft, Path=Foreground}"
-                                                StrokeThickness="1.5" />
+                                                    Canvas.Top="0.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=RbtLeft, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
                                                 <Rectangle
-                                                Canvas.Top="4.25"
-                                                Width="8"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=RbtLeft, Path=Foreground}"
-                                                StrokeThickness="1.5" />
+                                                    Canvas.Top="4.25"
+                                                    Width="8"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=RbtLeft, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
                                                 <Rectangle
-                                                Canvas.Top="12.25"
-                                                Width="8"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=RbtLeft, Path=Foreground}"
-                                                StrokeThickness="1.5" />
+                                                    Canvas.Top="12.25"
+                                                    Width="8"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=RbtLeft, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
                                                 <Rectangle
-                                                Canvas.Top="8.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=RbtLeft, Path=Foreground}"
-                                                StrokeThickness="1.5" />
+                                                    Canvas.Top="8.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=RbtLeft, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
                                             </Canvas>
                                         </Grid>
                                     </RadioButton>
                                     <RadioButton
-                                    Name="RbtCenter"
-                                    Width="32"
-                                    Height="32"
-                                    Margin="8"
-                                    HorizontalAlignment="Center"
-                                    VerticalAlignment="Center"
-                                    IsChecked="{Binding CenterSelected}"
-                                    Style="{StaticResource GreyBgRadioBtnStyle}">
+                                        Name="RbtCenter"
+                                        Width="32"
+                                        Height="32"
+                                        Margin="8"
+                                        HorizontalAlignment="Center"
+                                        VerticalAlignment="Center"
+                                        IsChecked="{Binding CenterSelected}"
+                                        Style="{StaticResource GreyBgRadioBtnStyle}">
                                         <Grid Width="32" Height="32">
                                             <Canvas Margin="5,10,0,0">
                                                 <Rectangle
-                                                Canvas.Top="0.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=RbtCenter, Path=Foreground}"
-                                                StrokeThickness="1.5" />
+                                                    Canvas.Top="0.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=RbtCenter, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
                                                 <Rectangle
-                                                Canvas.Left="3"
-                                                Canvas.Top="4.25"
-                                                Width="8"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=RbtCenter, Path=Foreground}"
-                                                StrokeThickness="1.5" />
+                                                    Canvas.Left="3"
+                                                    Canvas.Top="4.25"
+                                                    Width="8"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=RbtCenter, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
                                                 <Rectangle
-                                                Canvas.Left="3"
-                                                Canvas.Top="12.25"
-                                                Width="8"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=RbtCenter, Path=Foreground}"
-                                                StrokeThickness="1.5" />
+                                                    Canvas.Left="3"
+                                                    Canvas.Top="12.25"
+                                                    Width="8"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=RbtCenter, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
                                                 <Rectangle
-                                                Canvas.Top="8.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=RbtCenter, Path=Foreground}"
-                                                StrokeThickness="1.5" />
+                                                    Canvas.Top="8.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=RbtCenter, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
                                             </Canvas>
                                         </Grid>
                                     </RadioButton>
                                     <RadioButton
-                                    Name="RbtRight"
-                                    Width="32"
-                                    Height="32"
-                                    Margin="0,8,8,8"
-                                    HorizontalAlignment="Center"
-                                    VerticalAlignment="Center"
-                                    IsChecked="{Binding RightSelected}"
-                                    Style="{StaticResource GreyBgRadioBtnStyle}">
+                                        Name="RbtRight"
+                                        Width="32"
+                                        Height="32"
+                                        Margin="0,8,8,8"
+                                        HorizontalAlignment="Center"
+                                        VerticalAlignment="Center"
+                                        IsChecked="{Binding RightSelected}"
+                                        Style="{StaticResource GreyBgRadioBtnStyle}">
                                         <Grid Width="32" Height="32">
                                             <Canvas Margin="5,10,0,0">
                                                 <Rectangle
-                                                Canvas.Top="0.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=RbtRight, Path=Foreground}"
-                                                StrokeThickness="1.5" />
+                                                    Canvas.Top="0.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=RbtRight, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
                                                 <Rectangle
-                                                Canvas.Left="6"
-                                                Canvas.Top="4.25"
-                                                Width="8"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=RbtRight, Path=Foreground}"
-                                                StrokeThickness="1.5" />
+                                                    Canvas.Left="6"
+                                                    Canvas.Top="4.25"
+                                                    Width="8"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=RbtRight, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
                                                 <Rectangle
-                                                Canvas.Left="6"
-                                                Canvas.Top="12.25"
-                                                Width="8"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=RbtRight, Path=Foreground}"
-                                                StrokeThickness="1.5" />
+                                                    Canvas.Left="6"
+                                                    Canvas.Top="12.25"
+                                                    Width="8"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=RbtRight, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
                                                 <Rectangle
-                                                Canvas.Top="8.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=RbtRight, Path=Foreground}"
-                                                StrokeThickness="1.5" />
+                                                    Canvas.Top="8.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=RbtRight, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
                                             </Canvas>
                                         </Grid>
                                     </RadioButton>
                                     <RadioButton
-                                    Name="RbtnStrech"
-                                    Width="32"
-                                    Height="32"
-                                    HorizontalAlignment="Center"
-                                    VerticalAlignment="Center"
-                                    IsChecked="{Binding StrechSelected}"
-                                    Style="{StaticResource GreyBgRadioBtnStyle}">
+                                        Name="RbtnStrech"
+                                        Width="32"
+                                        Height="32"
+                                        HorizontalAlignment="Center"
+                                        VerticalAlignment="Center"
+                                        IsChecked="{Binding StrechSelected}"
+                                        Style="{StaticResource GreyBgRadioBtnStyle}">
                                         <Grid Width="32" Height="32">
                                             <Canvas Margin="5,10,0,0">
                                                 <Rectangle
-                                                Canvas.Top="0.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=RbtnStrech, Path=Foreground}"
-                                                StrokeThickness="1.5" />
+                                                    Canvas.Top="0.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=RbtnStrech, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
                                                 <Rectangle
-                                                Canvas.Top="8.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=RbtnStrech, Path=Foreground}"
-                                                StrokeThickness="1.5" />
+                                                    Canvas.Top="8.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=RbtnStrech, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
                                                 <Rectangle
-                                                Canvas.Top="4.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=RbtnStrech, Path=Foreground}"
-                                                StrokeThickness="1.5" />
+                                                    Canvas.Top="4.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=RbtnStrech, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
                                                 <Rectangle
-                                                Canvas.Top="12.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=RbtnStrech, Path=Foreground}"
-                                                StrokeThickness="1.5" />
+                                                    Canvas.Top="12.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=RbtnStrech, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
                                             </Canvas>
                                         </Grid>
                                     </RadioButton>
@@ -726,10 +741,10 @@
                                 <WrapPanel Margin="0,0,0,8">
                                     <Label Content="便签:" Style="{StaticResource Label2}" />
                                     <ComboBox
-                                    Width="228"
-                                    Height="30"
-                                    ItemsSource="{Binding AnnoteFamilyList}"
-                                    SelectedIndex="{Binding NoteSelectedIndex, Mode=TwoWay}" />
+                                        Width="228"
+                                        Height="30"
+                                        ItemsSource="{Binding AnnoteFamilyList}"
+                                        SelectedIndex="{Binding NoteSelectedIndex, Mode=TwoWay}" />
                                 </WrapPanel>
                             </WrapPanel>
                         </Border>

+ 4 - 1
PDF Office/Views/HomeContent.xaml.cs

@@ -23,10 +23,13 @@ namespace PDF_Office.Views
     {
         public string ImagePath { get; set; }
         public string Content { get; set; }
-        public PromotionBanner(string ImagePath,string Content)
+
+        public string Uri { get; set; }
+        public PromotionBanner(string ImagePath,string Content,string uri)
         {
             this.ImagePath = ImagePath;
             this.Content = Content;
+            this.Uri = uri;
         }
 
     }

+ 36 - 13
PDF Office/Views/HomePanel/PromotionContent.xaml

@@ -38,7 +38,11 @@
     </UserControl.Resources>
     <ScrollViewer VerticalScrollBarVisibility="Auto">
         <Grid>
-            <StackPanel Margin="0,0,0,252">
+            <Grid.RowDefinitions>
+                <RowDefinition Height="*" />
+                <RowDefinition Height="auto" />
+            </Grid.RowDefinitions>
+            <StackPanel>
                 <Expander
                     x:Name="PDFProSeriesExpander"
                     Margin="20,20,0,0"
@@ -60,8 +64,18 @@
                                 HorizontalAlignment="Stretch"
                                 Background="Transparent"
                                 BorderThickness="0"
-                                ItemContainerStyle="{StaticResource EmptyListViewItem}"
-                                ItemTemplate="{StaticResource PromotionDataTemplate}" />
+                                ItemTemplate="{StaticResource PromotionDataTemplate}">
+                                <ListView.ItemContainerStyle>
+                                    <Style BasedOn="{StaticResource EmptyListViewItem}" TargetType="{x:Type ListViewItem}">
+                                        <Style.Triggers>
+                                            <Trigger Property="IsMouseOver" Value="True">
+                                                <Setter Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
+                                            </Trigger>
+                                        </Style.Triggers>
+                                        <EventSetter Event="PreviewMouseLeftButtonDown" Handler="FrameworkElement_PreviewMouseLeftButtonDown" />
+                                    </Style>
+                                </ListView.ItemContainerStyle>
+                            </ListView>
                         </Grid>
                     </Border>
 
@@ -88,23 +102,32 @@
                                 HorizontalAlignment="Stretch"
                                 Background="Transparent"
                                 BorderThickness="0"
-                                ItemContainerStyle="{StaticResource EmptyListViewItem}"
-                                ItemTemplate="{StaticResource PromotionDataTemplate}" />
+                                ItemTemplate="{StaticResource PromotionDataTemplate}">
+                                <ListView.ItemContainerStyle>
+                                    <Style BasedOn="{StaticResource EmptyListViewItem}" TargetType="{x:Type ListViewItem}">
+                                        <Style.Triggers>
+                                            <Trigger Property="IsMouseOver" Value="True">
+                                                <Setter Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
+                                            </Trigger>
+                                        </Style.Triggers>
+                                        <EventSetter Event="PreviewMouseLeftButtonDown" Handler="FrameworkElement_PreviewMouseLeftButtonDown" />
+                                    </Style>
+                                </ListView.ItemContainerStyle>
+                            </ListView>
                         </Grid>
                     </Border>
 
                 </Expander>
 
             </StackPanel>
-            <Rectangle
-                x:Name="promtionRect"
-                Width="216"
-                Height="216"
-                Margin="0,23"
+            <Image
+                x:Name="ImgeActivity"
+                Grid.Row="1"
+                Width="184"
+                Height="243"
+                Margin="0,30"
                 VerticalAlignment="Bottom"
-                Fill="#EBEBEB"
-                RadiusX="8"
-                RadiusY="8" />
+                PreviewMouseLeftButtonDown="ImgeActivity_PreviewMouseLeftButtonDown" />
         </Grid>
     </ScrollViewer>
 </UserControl>

+ 69 - 11
PDF Office/Views/HomePanel/PromotionContent.xaml.cs

@@ -23,32 +23,60 @@ namespace PDF_Office.Views.HomePanel
     {
         private ObservableCollection<PromotionBanner> PDFProPromotion = new ObservableCollection<PromotionBanner>();
         private ObservableCollection<PromotionBanner> OthersPromotion = new ObservableCollection<PromotionBanner>();
+
+        /// <summary>
+        /// 活动链接
+        /// </summary>
+        public string ActiveUri = @"https://apps.apple.com/app/apple-store/id1475051178?pt=118745145&ct=pdfmac-promo&mt=8";
+
+        public string WindowsUri = @"https://www.pdfreaderpro.com/windows";
+
+        public string iPad = @"https://www.pdfreaderpro.com/ios";
+
+        public string Mac = @"https://www.pdfreaderpro.com/mac";
+
+        public string Android = @"https://www.pdfreaderpro.com/android";
+
+        public string ComPDFKit = @"https://www.compdf.com?utm_source=macapp&utm_medium=pdfmac&utm_campaign=compdfkit-promp";
+
+        public string ComVideoKit = @"https://www.filmagepro.com/video-sdk?utm_source=macapp&utm_medium=pdfmac&utm_campaign=comvideosdk-promo";
+
+        public string SignFlow = @"https://apps.apple.com/app/apple-store/id1584624017?pt=118745145&ct=pdfmac-promo&mt=8";
+
+        public string FilmageEditor = @"https://apps.apple.com/app/apple-store/id1475051178?pt=118745145&ct=pdfmac-promo&mt=8";
+
+        public string FilmageScreen = @"https://apps.apple.com/app/apple-store/id1475049179?pt=118745145&ct=pdfmac-promo&mt=8";
+
+        public string FreePDFTemplates = @"https://www.pdfreaderpro.com/templates?utm_source=MacApp&utm_campaign=PDFProMac&utm_medium=pdfmac_promo";
+
         public PromotionContent()
         {
             InitializeComponent();
             InitPromotionBanner();
             LoadPromotionContents();
+
+            ImgeActivity.Source = new BitmapImage(new Uri("pack://application:,,,/Resources/PromotionIcon/black_pdfreaderpro_home_en.png"));
         }
 
         private void InitPromotionBanner()
         {
-            PDFProPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/Windows.png", "Windows"));
-            PDFProPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/IPhoneiPad.png", "IPhone /iPad"));
-            PDFProPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/Android.png", "Android"));
+            PDFProPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/Windows.png", "Mac",Mac));
+            PDFProPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/IPhoneiPad.png", "IPhone /iPad",iPad));
+            PDFProPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/Android.png", "Android",Android));
             PDFProListview.ItemsSource = PDFProPromotion;
 
-            OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/ComPDFKit.png", "ComPDFKit"));
-            OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/ComVideoKit.png", "ComVideoKit"));
-            OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/SignFlow.png", "SignFlow"));
-            OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/FilmageEditor.png", "Filmage Editor"));
-            OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/FilmageScreen.png", "Filmage Screen"));
-            OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/FreePDFTemplates.png", "Free PDF Templates"));
+            OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/ComPDFKit.png", "ComPDFKit",ComPDFKit));
+            OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/ComVideoKit.png", "ComVideoKit",ComVideoKit));
+            OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/SignFlow.png", "SignFlow",SignFlow));
+            OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/FilmageEditor.png", "Filmage Editor",FilmageEditor));
+            OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/FilmageScreen.png", "Filmage Screen",FilmageEditor));
+            OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/FreePDFTemplates.png", "Free PDF Templates",FreePDFTemplates));
             OthersListview.ItemsSource = OthersPromotion;
         }
 
-        private void LoadPromotionContents()
+        private void LoadPromotionContents()                                          
         {
-            if(promtionRect.Visibility == Visibility.Visible)
+            if(ImgeActivity.Visibility == Visibility.Visible)
             {
 
             }
@@ -64,5 +92,35 @@ namespace PDF_Office.Views.HomePanel
         {
 
         }
+
+        private void FrameworkElement_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+        {
+            var item = sender as ListViewItem;
+            if(item!=null)
+            {
+                if(!string.IsNullOrEmpty((item.DataContext as PromotionBanner).Uri))
+                {
+                    GotoURI((item.DataContext as PromotionBanner).Uri);
+                }
+            }
+        }
+
+        private void ImgeActivity_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+        {
+            GotoURI(ActiveUri);
+        }
+
+        /// <summary>
+        /// 跳转到链接
+        /// </summary>
+        /// <param name="uri"></param>
+        private void GotoURI(string uri)
+        {
+            try
+            {
+                System.Diagnostics.Process.Start(uri);
+            }
+            catch { }
+        }
     }
 }

+ 442 - 442
PDF Office/Views/MainWindow.xaml

@@ -1,443 +1,443 @@
-<Window
-    x:Class="PDF_Office.Views.MainWindow"
-    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-    xmlns:convert="clr-namespace:PDF_Office.DataConvert"
-    xmlns:cus="clr-namespace:PDF_Office.CustomControl"
-    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-    xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz"
-    xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
-    xmlns:local="clr-namespace:PDF_Office"
-    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-    xmlns:prism="http://prismlibrary.com/"
-    xmlns:viewmodels="clr-namespace:PDF_Office.ViewModels"
-    Width="1280"
-    Height="800"
-    MinWidth="540"
-    MinHeight="460"
-    d:DataContext="{d:DesignInstance Type=viewmodels:MainWindowViewModel}"
-    prism:ViewModelLocator.AutoWireViewModel="True"
-    Activated="Window_Activated"
-    BorderBrush="{StaticResource color.sys.layout.bg.tabbar}"
-    BorderThickness="2"
-    Closed="Window_Closed"
-    Closing="Window_Closing"
-    PreviewMouseLeftButtonDown="Window_PreviewMouseLeftButtonDown"
-    SizeChanged="Window_SizeChanged"
-    Style="{StaticResource WindowStyle}"
-    UseLayoutRounding="True"
-    WindowStartupLocation="CenterScreen"
-    mc:Ignorable="d">
-    <Window.Resources>
-        <ResourceDictionary>
-            <Style x:Key="DragablzItemStyle" TargetType="{x:Type dragablz:DragablzItem}">
-                <Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
-                <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv2}" />
-                <Setter Property="Template">
-                    <Setter.Value>
-                        <ControlTemplate TargetType="dragablz:DragablzItem">
-                            <Grid x:Name="templateRoot">
-                                <Grid.ColumnDefinitions>
-                                    <ColumnDefinition Width="*" />
-                                    <ColumnDefinition Width="auto" />
-                                </Grid.ColumnDefinitions>
-                                <Border
-                                    x:Name="Title"
-                                    Width="184"
-                                    Height="34"
-                                    Margin="4,6,0,2"
-                                    BorderBrush="{StaticResource color.sys.border.neutral.lv3}"
-                                    BorderThickness="0"
-                                    CornerRadius="4,4,0,0"
-                                    WindowChrome.IsHitTestVisibleInChrome="True">
-                                    <Grid
-                                        Name="GridRoot"
-                                        Focusable="True"
-                                        WindowChrome.IsHitTestVisibleInChrome="True">
-                                        <Grid.ColumnDefinitions>
-                                            <ColumnDefinition Width="auto" />
-                                            <ColumnDefinition Width="*" MinWidth="10" />
-                                            <ColumnDefinition Width="auto" />
-                                        </Grid.ColumnDefinitions>
-                                        <StackPanel Orientation="Horizontal">
-                                            <Path
-                                                Name="Ico_Home"
-                                                Width="20"
-                                                Height="20"
-                                                Margin="8,7,0,7"
-                                                Data="M3.8655 5.79659C3.32363 6.16983 3 6.78571 3 7.44369V15.0001C3 16.1046 3.89543 17.0001 5 17.0001H9V12.1786H11V17.0001H15C16.1046 17.0001 17 16.1046 17 15.0001V7.44369C17 6.78571 16.6764 6.16983 16.1345 5.79659L11.1345 2.35266C10.4514 1.88212 9.54865 1.88212 8.8655 2.35266L3.8655 5.79659Z"
-                                                Fill="{TemplateBinding Foreground}"
-                                                Visibility="Collapsed" />
-                                            <TextBlock
-                                                x:Name="TextTitle"
-                                                MaxWidth="145"
-                                                Margin="8,7"
-                                                VerticalAlignment="Center"
-                                                FontFamily="Segoe UI,Microsoft YaHei"
-                                                Foreground="{TemplateBinding Foreground}"
-                                                Text="{Binding DataContext.FileName}"
-                                                TextTrimming="WordEllipsis" />
-                                        </StackPanel>
-                                        <Thumb
-                                            x:Name="PART_Thumb"
-                                            Grid.ColumnSpan="2"
-                                            HorizontalAlignment="Stretch"
-                                            VerticalContentAlignment="Stretch"
-                                            Background="Transparent"
-                                            FontFamily="Segoe UI,Microsoft YaHei"
-                                            ToolTip="{Binding DataContext.FileName}">
-                                            <Thumb.Template>
-                                                <ControlTemplate>
-                                                    <Grid Background="Transparent" />
-                                                </ControlTemplate>
-                                            </Thumb.Template>
-                                        </Thumb>
-                                        <TextBlock
-                                            x:Name="ChangeIcon"
-                                            Grid.Column="1"
-                                            Width="5"
-                                            Margin="3,4,2,0"
-                                            HorizontalAlignment="Left"
-                                            VerticalAlignment="Top"
-                                            Foreground="{TemplateBinding Foreground}"
-                                            IsHitTestVisible="False"
-                                            Text="*"
-                                            Visibility="{Binding DataContext.FileChanged}" />
-                                        <Button
-                                            Grid.Column="2"
-                                            Width="16"
-                                            Height="16"
-                                            Margin="0,4,8,4"
-                                            Background="Transparent"
-                                            BorderThickness="0"
-                                            Command="{Binding DataContext.CloseTab}"
-                                            CommandParameter="{Binding}">
-                                            <Path Data="M6.50006 7.06072L9.96973 10.5304L11.0304 9.46973L7.56072 6.00006L11.0304 2.53039L9.96973 1.46973L6.50006 4.9394L3.03039 1.46973L1.96973 2.53039L5.4394 6.00006L1.96973 9.46973L3.03039 10.5304L6.50006 7.06072Z" Fill="{StaticResource color.icon.base.neutral.norm.lv2}" />
-                                        </Button>
-
-                                        <TextBox
-                                            x:Name="TxtRename"
-                                            MaxWidth="145"
-                                            Margin="8,0,10,0"
-                                            VerticalContentAlignment="Center"
-                                            FontFamily="Segoe UI,Microsoft YaHei"
-                                            Foreground="{TemplateBinding Foreground}"
-                                            PreviewKeyDown="TxtRename_PreviewKeyDown"
-                                            Text="{Binding DataContext.FileName, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
-                                            Visibility="{Binding DataContext.IsReNameTextShow}"
-                                            WindowChrome.IsHitTestVisibleInChrome="True" />
-                                    </Grid>
-                                </Border>
-                                <Grid.ContextMenu>
-                                    <ContextMenu>
-                                        <MenuItem
-                                            Command="{Binding DataContext.RenameCommand}"
-                                            Header="{Binding DataContext.T_Rename}"
-                                            IsEnabled="{Binding DataContext.IsReNameEnable}" />
-                                        <MenuItem
-                                            Command="{Binding DataContext.ShowInFolderCommand}"
-                                            Header="{Binding DataContext.T_Floder}"
-                                            IsEnabled="{Binding DataContext.IsShowInFolderEnable}" />
-                                        <MenuItem
-                                            Command="{Binding DataContext.CloseTab}"
-                                            CommandParameter="{Binding}"
-                                            Header="{Binding DataContext.T_Close}" />
-                                        <MenuItem
-                                            Command="{Binding DataContext.mainWindowViewModel.CloseAllTabCommand}"
-                                            Header="{Binding DataContext.T_CloseAll}"
-                                            IsEnabled="{Binding DataContext.mainWindowViewModel.IsCloseAllEnable}" />
-                                        <MenuItem Header="Open In New Window" Visibility="Collapsed" />
-                                    </ContextMenu>
-                                </Grid.ContextMenu>
-                            </Grid>
-                            <ControlTemplate.Triggers>
-                                <Trigger Property="IsSelected" Value="True">
-                                    <Setter TargetName="Title" Property="Background" Value="{StaticResource color.sys.layout.mg}" />
-                                    <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
-                                    <Setter TargetName="Title" Property="BorderThickness" Value="0,0,0,1" />
-                                </Trigger>
-                                <Trigger Property="IsSelected" Value="False">
-                                    <Setter TargetName="Title" Property="Background" Value="TransParent" />
-                                </Trigger>
-                                <Trigger Property="IsMouseOver" Value="True">
-                                    <Setter TargetName="Title" Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
-                                </Trigger>
-                                <Trigger SourceName="TextTitle" Property="Text" Value="Home">
-                                    <Setter TargetName="Ico_Home" Property="Visibility" Value="Visible" />
-                                </Trigger>
-                                <MultiDataTrigger>
-                                    <MultiDataTrigger.Conditions>
-                                        <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false" />
-                                        <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true" />
-                                    </MultiDataTrigger.Conditions>
-                                    <Setter TargetName="Title" Property="Background" Value="#0D000000" />
-                                    <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
-                                    <!--<Setter TargetName="btnPath" Property="Path.Fill" Value="Black"/>-->
-                                </MultiDataTrigger>
-                            </ControlTemplate.Triggers>
-                        </ControlTemplate>
-                    </Setter.Value>
-                </Setter>
-            </Style>
-
-            <convert:UnVisivleConvert x:Key="UnvisibleConvert" />
-        </ResourceDictionary>
-    </Window.Resources>
-    <Grid Background="{StaticResource color.sys.layout.bg.tabbar}">
-        <Grid.RowDefinitions>
-            <RowDefinition Height="40" />
-            <RowDefinition Height="*" />
-        </Grid.RowDefinitions>
-        <dragablz:TabablzControl
-            Name="TabablzControl"
-            Grid.RowSpan="3"
-            BorderThickness="0"
-            FocusVisualStyle="{x:Null}"
-            ItemContainerStyle="{StaticResource DragablzItemStyle}"
-            SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
-            WindowChrome.IsHitTestVisibleInChrome="True">
-            <dragablz:TabablzControl.InterTabController>
-                <dragablz:InterTabController InterTabClient="{Binding InterTabClient}" />
-            </dragablz:TabablzControl.InterTabController>
-            <dragablz:TabablzControl.HeaderSuffixContent>
-                <Button
-                    x:Name="BtnAdd"
-                    Width="20"
-                    Height="20"
-                    Margin="8,13,200,7"
-                    Padding="0"
-                    HorizontalAlignment="Left"
-                    Background="Transparent"
-                    BorderThickness="0"
-                    Command="{Binding AddTab}"
-                    WindowChrome.IsHitTestVisibleInChrome="True">
-                    <Path
-                        Width="20"
-                        Height="20"
-                        Data="M9 11V16H11V11H16V9H11V4H9V9H4L4 11H9Z"
-                        Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
-                </Button>
-            </dragablz:TabablzControl.HeaderSuffixContent>
-            <dragablz:TabablzControl.HeaderPrefixContent>
-                <Grid
-                    Name="GridRoot"
-                    Width="16"
-                    Height="38"
-                    Margin="0,0,0,0"
-                    Background="Transparent" />
-            </dragablz:TabablzControl.HeaderPrefixContent>
-        </dragablz:TabablzControl>
-        <!--  标题栏右侧栏,关闭按钮,会员,试用等  -->
-        <StackPanel
-            Name="StkPnlRight"
-            HorizontalAlignment="Right"
-            Orientation="Horizontal"
-            WindowChrome.IsHitTestVisibleInChrome="True">
-
-            <Grid x:Name="Grid_Openhight" Visibility="{Binding OphVis,Mode=OneWay}">
-                <Border VerticalAlignment="Center">
-                    <Path Data="M0 4C0 1.79086 1.79086 0 4 0H132C134.209 0 136 1.79086 136 4V10.323C136 10.7319 136.249 11.0996 136.629 11.2514L141.179 13.0715C142.017 13.4068 142.017 14.5932 141.179 14.9285L136.629 16.7486C136.249 16.9004 136 17.2681 136 17.677V24C136 26.2091 134.209 28 132 28H4C1.79086 28 0 26.2091 0 24V4Z" Fill="#FFCF52" />
-                </Border>
-                <TextBlock
-                    HorizontalAlignment="Center"
-                    VerticalAlignment="Center"
-                    FontSize="12"
-                    Text="登录解锁高级功能" />
-            </Grid>
-
-            <Button
-                x:Name="Btn_Register"
-                Width="40"
-                Height="40"
-                Background="Transparent"
-                Command="{Binding OpenRegisterCommand}"
-                Style="{StaticResource subToolBar}"
-                Visibility="{Binding RegisterVis, Mode=TwoWay}">
-                <Grid>
-                    <Border
-                        x:Name="myBorder1"
-                        Width="24"
-                        Height="24"
-                        Background="White"
-                        CornerRadius="12" />
-                    <Border
-                        Width="24"
-                        Height="24"
-                        Background="{StaticResource color.icon.base.neutral.norm.lv1}"
-                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}">
-                        <Path Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z" Fill="White" />
-                        <Border.OpacityMask>
-                            <VisualBrush Visual="{Binding ElementName=myBorder1}" />
-                        </Border.OpacityMask>
-                    </Border>
-                    <Border
-                        Width="24"
-                        Height="24"
-                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}"
-                        BorderThickness="2"
-                        CornerRadius="100" />
-                </Grid>
-
-            </Button>
-
-            <Button
-                x:Name="Btn_Login"
-                Width="40"
-                Height="40"
-                Background="Transparent"
-                Command="{Binding OpenLoginCommand}"
-                Style="{StaticResource subToolBar}"
-                Visibility="{Binding LoginVis, Mode=TwoWay}">
-                <Grid>
-                    <Border
-                        x:Name="myBorder2"
-                        Width="24"
-                        Height="24"
-                        Background="White"
-                        CornerRadius="12" />
-                    <Border
-                        Width="24"
-                        Height="24"
-                        Background="{StaticResource color.icon.base.neutral.norm.lv1}"
-                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}">
-                        <Path Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z" Fill="White" />
-                        <Border.OpacityMask>
-                            <VisualBrush Visual="{Binding ElementName=myBorder2}" />
-                        </Border.OpacityMask>
-                    </Border>
-                    <Border
-                        Width="24"
-                        Height="24"
-                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}"
-                        BorderThickness="2"
-                        CornerRadius="100" />
-                </Grid>
-            </Button>
-            <Button
-                x:Name="Btn_User"
-                Width="40"
-                Height="40"
-                Background="Transparent"
-                Command="{Binding OpenUserCommand}"
-                Style="{StaticResource subToolBar}"
-                Visibility="{Binding UserVis, Mode=TwoWay}">
-                <Grid>
-                    <Border
-                        x:Name="myBorder3"
-                        Width="24"
-                        Height="24"
-                        Background="White"
-                        CornerRadius="12" />
-                    <Border
-                        Width="24"
-                        Height="24"
-                        Background="#1770F4"
-                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}">
-                        <Path Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z" Fill="White" />
-                        <Border.OpacityMask>
-                            <VisualBrush Visual="{Binding ElementName=myBorder3}" />
-                        </Border.OpacityMask>
-                    </Border>
-                    <Border
-                        Width="24"
-                        Height="24"
-                        BorderBrush="#1770F4"
-                        BorderThickness="2"
-                        CornerRadius="100" />
-                </Grid>
-            </Button>
-            <Separator BorderBrush="#94989C" BorderThickness="1">
-                <Separator.LayoutTransform>
-                    <RotateTransform Angle="90" />
-                </Separator.LayoutTransform>
-            </Separator>
-            <Button
-                Name="BtnMiniSize"
-                Width="40"
-                Height="40"
-                Background="Transparent"
-                BorderThickness="0"
-                Click="BtnMiniSize_Click"
-                Style="{StaticResource TitleBarBtn}">
-                <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="14 7 14 8 2 8 2 7">
-                    <Polygon.RenderTransform>
-                        <TransformGroup>
-                            <TranslateTransform Y="-3" />
-                        </TransformGroup>
-                    </Polygon.RenderTransform>
-                </Polygon>
-            </Button>
-            <Button
-                Name="BtnReStore"
-                Width="40"
-                Height="40"
-                Background="Transparent"
-                BorderThickness="0"
-                Click="BtnReStore_Click"
-                Style="{StaticResource TitleBarBtn}">
-                <Grid>
-                    <Path
-                        x:Name="ico_max"
-                        Data="M14,2 L14,14 L2,14 L2,2 L14,2 Z M13,3 L3,3 L3,13 L13,13 L13,3 Z"
-                        Fill="{StaticResource color.btn.sec.text.def}"
-                        Visibility="Collapsed" />
-                    <Grid x:Name="ico_mini" Visibility="{Binding ElementName=ico_max, Path=Visibility, Converter={StaticResource UnvisibleConvert}}">
-                        <Path Data="M11,5 L11,14 L2,14 L2,5 L11,5 Z M10,6 L3,6 L3,13 L10,13 L10,6 Z" Fill="{StaticResource color.btn.sec.text.def}" />
-                        <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="14 2 14 11 11 11 11 10 13 10 13 3 6 3 6 5 5 5 5 2" />
-                    </Grid>
-                </Grid>
-            </Button>
-            <Button
-                Name="BtnClose"
-                Width="40"
-                Height="40"
-                Background="Transparent"
-                BorderThickness="0"
-                Click="BtnClose_Click"
-                Style="{StaticResource CloseBtn}">
-                <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="11.2919922 12 12 11.2919922 6.70800781 6 12 0.708007813 11.2919922 0 6 5.29199219 0.708007812 9.76996262e-15 -2.27456942e-13 0.708007813 5.29199219 6 0 11.2919922 0.708007812 12 6 6.70800781" />
-            </Button>
-        </StackPanel>
-
-        <!--  OCR Progress Control  -->
-        <Grid Grid.RowSpan="2" Visibility="{Binding IsProcessVisible}">
-            <Grid.Background>
-                <SolidColorBrush Opacity="0.05" Color="Black" />
-            </Grid.Background>
-            <Border
-                Width="226"
-                Height="58"
-                
-                Background="{StaticResource color.sys.layout.dark.bg}"
-                BorderThickness="0"
-                CornerRadius="{StaticResource border-radius.8}"
-                Effect="{StaticResource shadow.neutral.m}">
-                <Grid Margin="16,13" Background="Transparent">
-                    <StackPanel Orientation="Horizontal">
-                        <TextBlock Foreground="{StaticResource color.sys.text.anti.norm}" Text="{Binding ProgressTitle}" />
-                        <TextBlock Foreground="{StaticResource color.sys.text.anti.norm}" Text="{Binding Value, StringFormat={}({0})}" />
-                    </StackPanel>
-                    <Button
-                        Width="12"
-                        Height="12"
-                        HorizontalAlignment="Right"
-                        VerticalAlignment="Top"
+<Window
+    x:Class="PDF_Office.Views.MainWindow"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:convert="clr-namespace:PDF_Office.DataConvert"
+    xmlns:cus="clr-namespace:PDF_Office.CustomControl"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz"
+    xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
+    xmlns:local="clr-namespace:PDF_Office"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    xmlns:prism="http://prismlibrary.com/"
+    xmlns:viewmodels="clr-namespace:PDF_Office.ViewModels"
+    Width="1280"
+    Height="800"
+    MinWidth="540"
+    MinHeight="460"
+    d:DataContext="{d:DesignInstance Type=viewmodels:MainWindowViewModel}"
+    prism:ViewModelLocator.AutoWireViewModel="True"
+    Activated="Window_Activated"
+    BorderBrush="{StaticResource color.sys.layout.bg.tabbar}"
+    BorderThickness="2"
+    Closed="Window_Closed"
+    Closing="Window_Closing"
+    PreviewMouseLeftButtonDown="Window_PreviewMouseLeftButtonDown"
+    SizeChanged="Window_SizeChanged"
+    Style="{StaticResource WindowStyle}"
+    UseLayoutRounding="True"
+    WindowStartupLocation="CenterScreen"
+    mc:Ignorable="d">
+    <Window.Resources>
+        <ResourceDictionary>
+            <Style x:Key="DragablzItemStyle" TargetType="{x:Type dragablz:DragablzItem}">
+                <Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
+                <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv2}" />
+                <Setter Property="Template">
+                    <Setter.Value>
+                        <ControlTemplate TargetType="dragablz:DragablzItem">
+                            <Grid x:Name="templateRoot">
+                                <Grid.ColumnDefinitions>
+                                    <ColumnDefinition Width="*" />
+                                    <ColumnDefinition Width="auto" />
+                                </Grid.ColumnDefinitions>
+                                <Border
+                                    x:Name="Title"
+                                    Width="184"
+                                    Height="34"
+                                    Margin="4,6,0,2"
+                                    BorderBrush="{StaticResource color.sys.border.neutral.lv3}"
+                                    BorderThickness="0"
+                                    CornerRadius="4,4,0,0"
+                                    WindowChrome.IsHitTestVisibleInChrome="True">
+                                    <Grid
+                                        Name="GridRoot"
+                                        Focusable="True"
+                                        WindowChrome.IsHitTestVisibleInChrome="True">
+                                        <Grid.ColumnDefinitions>
+                                            <ColumnDefinition Width="auto" />
+                                            <ColumnDefinition Width="*" MinWidth="10" />
+                                            <ColumnDefinition Width="auto" />
+                                        </Grid.ColumnDefinitions>
+                                        <StackPanel Orientation="Horizontal">
+                                            <Path
+                                                Name="Ico_Home"
+                                                Width="20"
+                                                Height="20"
+                                                Margin="8,7,0,7"
+                                                Data="M3.8655 5.79659C3.32363 6.16983 3 6.78571 3 7.44369V15.0001C3 16.1046 3.89543 17.0001 5 17.0001H9V12.1786H11V17.0001H15C16.1046 17.0001 17 16.1046 17 15.0001V7.44369C17 6.78571 16.6764 6.16983 16.1345 5.79659L11.1345 2.35266C10.4514 1.88212 9.54865 1.88212 8.8655 2.35266L3.8655 5.79659Z"
+                                                Fill="{TemplateBinding Foreground}"
+                                                Visibility="Collapsed" />
+                                            <TextBlock
+                                                x:Name="TextTitle"
+                                                MaxWidth="145"
+                                                Margin="8,7"
+                                                VerticalAlignment="Center"
+                                                FontFamily="Segoe UI,Microsoft YaHei"
+                                                Foreground="{TemplateBinding Foreground}"
+                                                Text="{Binding DataContext.FileName}"
+                                                TextTrimming="WordEllipsis" />
+                                        </StackPanel>
+                                        <Thumb
+                                            x:Name="PART_Thumb"
+                                            Grid.ColumnSpan="2"
+                                            HorizontalAlignment="Stretch"
+                                            VerticalContentAlignment="Stretch"
+                                            Background="Transparent"
+                                            FontFamily="Segoe UI,Microsoft YaHei"
+                                            ToolTip="{Binding DataContext.FileName}">
+                                            <Thumb.Template>
+                                                <ControlTemplate>
+                                                    <Grid Background="Transparent" />
+                                                </ControlTemplate>
+                                            </Thumb.Template>
+                                        </Thumb>
+                                        <TextBlock
+                                            x:Name="ChangeIcon"
+                                            Grid.Column="1"
+                                            Width="5"
+                                            Margin="3,4,2,0"
+                                            HorizontalAlignment="Left"
+                                            VerticalAlignment="Top"
+                                            Foreground="{TemplateBinding Foreground}"
+                                            IsHitTestVisible="False"
+                                            Text="*"
+                                            Visibility="{Binding DataContext.FileChanged}" />
+                                        <Button
+                                            Grid.Column="2"
+                                            Width="16"
+                                            Height="16"
+                                            Margin="0,4,8,4"
+                                            Background="Transparent"
+                                            BorderThickness="0"
+                                            Command="{Binding DataContext.CloseTab}"
+                                            CommandParameter="{Binding}">
+                                            <Path Data="M6.50006 7.06072L9.96973 10.5304L11.0304 9.46973L7.56072 6.00006L11.0304 2.53039L9.96973 1.46973L6.50006 4.9394L3.03039 1.46973L1.96973 2.53039L5.4394 6.00006L1.96973 9.46973L3.03039 10.5304L6.50006 7.06072Z" Fill="{StaticResource color.icon.base.neutral.norm.lv2}" />
+                                        </Button>
+
+                                        <TextBox
+                                            x:Name="TxtRename"
+                                            MaxWidth="145"
+                                            Margin="8,0,10,0"
+                                            VerticalContentAlignment="Center"
+                                            FontFamily="Segoe UI,Microsoft YaHei"
+                                            Foreground="{TemplateBinding Foreground}"
+                                            PreviewKeyDown="TxtRename_PreviewKeyDown"
+                                            Text="{Binding DataContext.FileName, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
+                                            Visibility="{Binding DataContext.IsReNameTextShow}"
+                                            WindowChrome.IsHitTestVisibleInChrome="True" />
+                                    </Grid>
+                                </Border>
+                                <Grid.ContextMenu>
+                                    <ContextMenu>
+                                        <MenuItem
+                                            Command="{Binding DataContext.RenameCommand}"
+                                            Header="{Binding DataContext.T_Rename}"
+                                            IsEnabled="{Binding DataContext.IsReNameEnable}" />
+                                        <MenuItem
+                                            Command="{Binding DataContext.ShowInFolderCommand}"
+                                            Header="{Binding DataContext.T_Floder}"
+                                            IsEnabled="{Binding DataContext.IsShowInFolderEnable}" />
+                                        <MenuItem
+                                            Command="{Binding DataContext.CloseTab}"
+                                            CommandParameter="{Binding}"
+                                            Header="{Binding DataContext.T_Close}" />
+                                        <MenuItem
+                                            Command="{Binding DataContext.mainWindowViewModel.CloseAllTabCommand}"
+                                            Header="{Binding DataContext.T_CloseAll}"
+                                            IsEnabled="{Binding DataContext.mainWindowViewModel.IsCloseAllEnable}" />
+                                        <MenuItem Header="Open In New Window" Visibility="Collapsed" />
+                                    </ContextMenu>
+                                </Grid.ContextMenu>
+                            </Grid>
+                            <ControlTemplate.Triggers>
+                                <Trigger Property="IsSelected" Value="True">
+                                    <Setter TargetName="Title" Property="Background" Value="{StaticResource color.sys.layout.mg}" />
+                                    <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
+                                    <Setter TargetName="Title" Property="BorderThickness" Value="0,0,0,1" />
+                                </Trigger>
+                                <Trigger Property="IsSelected" Value="False">
+                                    <Setter TargetName="Title" Property="Background" Value="TransParent" />
+                                </Trigger>
+                                <Trigger Property="IsMouseOver" Value="True">
+                                    <Setter TargetName="Title" Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
+                                </Trigger>
+                                <Trigger SourceName="TextTitle" Property="Text" Value="Home">
+                                    <Setter TargetName="Ico_Home" Property="Visibility" Value="Visible" />
+                                </Trigger>
+                                <MultiDataTrigger>
+                                    <MultiDataTrigger.Conditions>
+                                        <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false" />
+                                        <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true" />
+                                    </MultiDataTrigger.Conditions>
+                                    <Setter TargetName="Title" Property="Background" Value="#0D000000" />
+                                    <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
+                                    <!--<Setter TargetName="btnPath" Property="Path.Fill" Value="Black"/>-->
+                                </MultiDataTrigger>
+                            </ControlTemplate.Triggers>
+                        </ControlTemplate>
+                    </Setter.Value>
+                </Setter>
+            </Style>
+
+            <convert:UnVisivleConvert x:Key="UnvisibleConvert" />
+        </ResourceDictionary>
+    </Window.Resources>
+    <Grid Background="{StaticResource color.sys.layout.bg.tabbar}">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="40" />
+            <RowDefinition Height="*" />
+        </Grid.RowDefinitions>
+        <dragablz:TabablzControl
+            Name="TabablzControl"
+            Grid.RowSpan="3"
+            BorderThickness="0"
+            FocusVisualStyle="{x:Null}"
+            ItemContainerStyle="{StaticResource DragablzItemStyle}"
+            SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
+            WindowChrome.IsHitTestVisibleInChrome="True">
+            <dragablz:TabablzControl.InterTabController>
+                <dragablz:InterTabController InterTabClient="{Binding InterTabClient}" />
+            </dragablz:TabablzControl.InterTabController>
+            <dragablz:TabablzControl.HeaderSuffixContent>
+                <Button
+                    x:Name="BtnAdd"
+                    Width="20"
+                    Height="20"
+                    Margin="8,13,200,7"
+                    Padding="0"
+                    HorizontalAlignment="Left"
+                    Background="Transparent"
+                    BorderThickness="0"
+                    Command="{Binding AddTab}"
+                    WindowChrome.IsHitTestVisibleInChrome="True">
+                    <Path
+                        Width="20"
+                        Height="20"
+                        Data="M9 11V16H11V11H16V9H11V4H9V9H4L4 11H9Z"
+                        Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
+                </Button>
+            </dragablz:TabablzControl.HeaderSuffixContent>
+            <dragablz:TabablzControl.HeaderPrefixContent>
+                <Grid
+                    Name="GridRoot"
+                    Width="16"
+                    Height="38"
+                    Margin="0,0,0,0"
+                    Background="Transparent" />
+            </dragablz:TabablzControl.HeaderPrefixContent>
+        </dragablz:TabablzControl>
+        <!--  标题栏右侧栏,关闭按钮,会员,试用等  -->
+        <StackPanel
+            Name="StkPnlRight"
+            HorizontalAlignment="Right"
+            Orientation="Horizontal"
+            WindowChrome.IsHitTestVisibleInChrome="True">
+
+            <Grid x:Name="Grid_Openhight" Visibility="{Binding OphVis,Mode=OneWay}">
+                <Border VerticalAlignment="Center">
+                    <Path Data="M0 4C0 1.79086 1.79086 0 4 0H132C134.209 0 136 1.79086 136 4V10.323C136 10.7319 136.249 11.0996 136.629 11.2514L141.179 13.0715C142.017 13.4068 142.017 14.5932 141.179 14.9285L136.629 16.7486C136.249 16.9004 136 17.2681 136 17.677V24C136 26.2091 134.209 28 132 28H4C1.79086 28 0 26.2091 0 24V4Z" Fill="#FFCF52" />
+                </Border>
+                <TextBlock
+                    HorizontalAlignment="Center"
+                    VerticalAlignment="Center"
+                    FontSize="12"
+                    Text="登录解锁高级功能" />
+            </Grid>
+
+            <Button
+                x:Name="Btn_Register"
+                Width="40"
+                Height="40"
+                Background="Transparent"
+                Command="{Binding OpenRegisterCommand}"
+                Style="{StaticResource subToolBar}"
+                Visibility="{Binding RegisterVis, Mode=TwoWay}">
+                <Grid>
+                    <Border
+                        x:Name="myBorder1"
+                        Width="24"
+                        Height="24"
+                        Background="White"
+                        CornerRadius="12" />
+                    <Border
+                        Width="24"
+                        Height="24"
+                        Background="{StaticResource color.icon.base.neutral.norm.lv1}"
+                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}">
+                        <Path Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z" Fill="White" />
+                        <Border.OpacityMask>
+                            <VisualBrush Visual="{Binding ElementName=myBorder1}" />
+                        </Border.OpacityMask>
+                    </Border>
+                    <Border
+                        Width="24"
+                        Height="24"
+                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}"
+                        BorderThickness="2"
+                        CornerRadius="100" />
+                </Grid>
+
+            </Button>
+
+            <Button
+                x:Name="Btn_Login"
+                Width="40"
+                Height="40"
+                Background="Transparent"
+                Command="{Binding OpenLoginCommand}"
+                Style="{StaticResource subToolBar}"
+                Visibility="{Binding LoginVis, Mode=TwoWay}">
+                <Grid>
+                    <Border
+                        x:Name="myBorder2"
+                        Width="24"
+                        Height="24"
+                        Background="White"
+                        CornerRadius="12" />
+                    <Border
+                        Width="24"
+                        Height="24"
+                        Background="{StaticResource color.icon.base.neutral.norm.lv1}"
+                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}">
+                        <Path Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z" Fill="White" />
+                        <Border.OpacityMask>
+                            <VisualBrush Visual="{Binding ElementName=myBorder2}" />
+                        </Border.OpacityMask>
+                    </Border>
+                    <Border
+                        Width="24"
+                        Height="24"
+                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}"
+                        BorderThickness="2"
+                        CornerRadius="100" />
+                </Grid>
+            </Button>
+            <Button
+                x:Name="Btn_User"
+                Width="40"
+                Height="40"
+                Background="Transparent"
+                Command="{Binding OpenUserCommand}"
+                Style="{StaticResource subToolBar}"
+                Visibility="{Binding UserVis, Mode=TwoWay}">
+                <Grid>
+                    <Border
+                        x:Name="myBorder3"
+                        Width="24"
+                        Height="24"
+                        Background="White"
+                        CornerRadius="12" />
+                    <Border
+                        Width="24"
+                        Height="24"
+                        Background="#1770F4"
+                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}">
+                        <Path Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z" Fill="White" />
+                        <Border.OpacityMask>
+                            <VisualBrush Visual="{Binding ElementName=myBorder3}" />
+                        </Border.OpacityMask>
+                    </Border>
+                    <Border
+                        Width="24"
+                        Height="24"
+                        BorderBrush="#1770F4"
+                        BorderThickness="2"
+                        CornerRadius="100" />
+                </Grid>
+            </Button>
+            <Separator BorderBrush="#94989C" BorderThickness="1">
+                <Separator.LayoutTransform>
+                    <RotateTransform Angle="90" />
+                </Separator.LayoutTransform>
+            </Separator>
+            <Button
+                Name="BtnMiniSize"
+                Width="40"
+                Height="40"
+                Background="Transparent"
+                BorderThickness="0"
+                Click="BtnMiniSize_Click"
+                Style="{StaticResource TitleBarBtn}">
+                <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="14 7 14 8 2 8 2 7">
+                    <Polygon.RenderTransform>
+                        <TransformGroup>
+                            <TranslateTransform Y="-3" />
+                        </TransformGroup>
+                    </Polygon.RenderTransform>
+                </Polygon>
+            </Button>
+            <Button
+                Name="BtnReStore"
+                Width="40"
+                Height="40"
+                Background="Transparent"
+                BorderThickness="0"
+                Click="BtnReStore_Click"
+                Style="{StaticResource TitleBarBtn}">
+                <Grid>
+                    <Path
+                        x:Name="ico_max"
+                        Data="M14,2 L14,14 L2,14 L2,2 L14,2 Z M13,3 L3,3 L3,13 L13,13 L13,3 Z"
+                        Fill="{StaticResource color.btn.sec.text.def}"
+                        Visibility="Collapsed" />
+                    <Grid x:Name="ico_mini" Visibility="{Binding ElementName=ico_max, Path=Visibility, Converter={StaticResource UnvisibleConvert}}">
+                        <Path Data="M11,5 L11,14 L2,14 L2,5 L11,5 Z M10,6 L3,6 L3,13 L10,13 L10,6 Z" Fill="{StaticResource color.btn.sec.text.def}" />
+                        <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="14 2 14 11 11 11 11 10 13 10 13 3 6 3 6 5 5 5 5 2" />
+                    </Grid>
+                </Grid>
+            </Button>
+            <Button
+                Name="BtnClose"
+                Width="40"
+                Height="40"
+                Background="Transparent"
+                BorderThickness="0"
+                Click="BtnClose_Click"
+                Style="{StaticResource CloseBtn}">
+                <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="11.2919922 12 12 11.2919922 6.70800781 6 12 0.708007813 11.2919922 0 6 5.29199219 0.708007812 9.76996262e-15 -2.27456942e-13 0.708007813 5.29199219 6 0 11.2919922 0.708007812 12 6 6.70800781" />
+            </Button>
+        </StackPanel>
+
+        <!--  OCR Progress Control  -->
+        <Grid Grid.RowSpan="2" Visibility="{Binding IsProcessVisible}">
+            <Grid.Background>
+                <SolidColorBrush Opacity="0.05" Color="Black" />
+            </Grid.Background>
+            <Border
+                Width="226"
+                Height="58"
+                
+                Background="{StaticResource color.sys.layout.dark.bg}"
+                BorderThickness="0"
+                CornerRadius="{StaticResource border-radius.8}"
+                Effect="{StaticResource shadow.neutral.m}">
+                <Grid Margin="16,13" Background="Transparent">
+                    <StackPanel Orientation="Horizontal">
+                        <TextBlock Foreground="{StaticResource color.sys.text.anti.norm}" Text="{Binding ProgressTitle}" />
+                        <TextBlock Foreground="{StaticResource color.sys.text.anti.norm}" Text="{Binding Value, StringFormat={}({0})}" />
+                    </StackPanel>
+                    <Button
+                        Width="12"
+                        Height="12"
+                        HorizontalAlignment="Right"
+                        VerticalAlignment="Top"
                         BorderThickness="0"
-                    Background="{StaticResource color.sys.layout.dark.bg}"
-                        Command="{Binding CloseOCRCommand}" 
-                         Padding="0,0,1,1">
-                        <Path Data="M6.00006 7.06072L9.46973 10.5304L10.5304 9.46973L7.06072 6.00006L10.5304 2.53039L9.46973 1.46973L6.00006 4.9394L2.53039 1.46973L1.46973 2.53039L4.9394 6.00006L1.46973 9.46973L2.53039 10.5304L6.00006 7.06072Z" Fill="#CED0D4"></Path>
-                    </Button>
-                    <ProgressBar
-                        Height="4"
-                        Margin="0,0,0,4"
-                        VerticalAlignment="Bottom"
-                        BorderThickness="0"
-                        Foreground="{StaticResource color.slider.track-filled.norm}"
-                        Maximum="{Binding MaxValue}"
-                        Value="{Binding Value}" />
-                </Grid>
-            </Border>
-        </Grid>
-    </Grid>
-</Window>
+                    Background="{StaticResource color.sys.layout.dark.bg}"
+                        Command="{Binding CloseOCRCommand}" 
+                         Padding="0,0,1,1">
+                        <Path Data="M6.00006 7.06072L9.46973 10.5304L10.5304 9.46973L7.06072 6.00006L10.5304 2.53039L9.46973 1.46973L6.00006 4.9394L2.53039 1.46973L1.46973 2.53039L4.9394 6.00006L1.46973 9.46973L2.53039 10.5304L6.00006 7.06072Z" Fill="#CED0D4"></Path>
+                    </Button>
+                    <ProgressBar
+                        Height="4"
+                        Margin="0,0,0,4"
+                        VerticalAlignment="Bottom"
+                        BorderThickness="0"
+                        Foreground="{StaticResource color.slider.track-filled.norm}"
+                        Maximum="{Binding MaxValue}"
+                        Value="{Binding Value}" />
+                </Grid>
+            </Border>
+        </Grid>
+    </Grid>
+</Window>

+ 35 - 35
PDF Office/Views/Tools/ToolsBarContent.xaml.cs

@@ -1,37 +1,37 @@
-using System.Windows.Controls;
-
-namespace PDF_Office.Views.Tools
-{
-    /// <summary>
-    /// Interaction logic for ToolsBarContent
-    /// </summary>
-    public partial class ToolsBarContent : UserControl
-    {
-        public ToolsBarContent()
-        {
-            InitializeComponent();
-        }
-
-        private void SecurityButtonMore_Click(object sender, System.Windows.RoutedEventArgs e)
-        {
-            SecurityMenuMore.PlacementTarget = this.SecurityButtonMore;
-            SecurityMenuMore.IsOpen = true;
-        }
-
-        private void SecurityButtonMore_Initialized(object sender, System.EventArgs e)
-        {
-            this.SecurityButtonMore.ContextMenu = null;
+using System.Windows.Controls;
+
+namespace PDF_Office.Views.Tools
+{
+    /// <summary>
+    /// Interaction logic for ToolsBarContent
+    /// </summary>
+    public partial class ToolsBarContent : UserControl
+    {
+        public ToolsBarContent()
+        {
+            InitializeComponent();
+        }
+
+        private void SecurityButtonMore_Click(object sender, System.Windows.RoutedEventArgs e)
+        {
+            SecurityMenuMore.PlacementTarget = this.SecurityButtonMore;
+            SecurityMenuMore.IsOpen = true;
+        }
+
+        private void SecurityButtonMore_Initialized(object sender, System.EventArgs e)
+        {
+            this.SecurityButtonMore.ContextMenu = null;
+        }
+
+        private void CropPageMore_Click(object sender, System.Windows.RoutedEventArgs e)
+        {
+            CropPageMenu.PlacementTarget = this.SecurityButtonMore;
+            CropPageMenu.IsOpen = true;
         }
 
-        private void CropPageMore_Click(object sender, System.Windows.RoutedEventArgs e)
-        {
-            CropPageMenu.PlacementTarget = this.SecurityButtonMore;
-            CropPageMenu.IsOpen = true;
-        }
-
-        private void CropPageMore_Initialized(object sender, System.EventArgs e)
-        {
-            this.CropPageMenuMore.ContextMenu = null;
-        }
-    }
-}
+        private void CropPageMore_Initialized(object sender, System.EventArgs e)
+        {
+            this.CropPageMenuMore.ContextMenu = null;
+        }
+    }
+}

+ 12 - 2
PDF Office/Views/ViewContent.xaml

@@ -43,10 +43,20 @@
                 <Setter Property="Height" Value="20" />
             </Style>
             <convert:BoolToVisible x:Key="BoolToVisibleConvert" />
-      </ResourceDictionary>
+            <RoutedUICommand x:Key="CloseLeft" Text="CloseLeft"/>
+            <RoutedUICommand x:Key="CloseRight" Text="CloseRight"/>
+        </ResourceDictionary>
     </UserControl.Resources>
+    <UserControl.InputBindings>
+        <KeyBinding Command="{StaticResource CloseLeft}" Modifiers="Ctrl" Key="F4" />
+        <KeyBinding Command="{StaticResource CloseRight}" Modifiers="Ctrl+Shift" Key="F4" />
+    </UserControl.InputBindings>
+
+    <UserControl.CommandBindings>
+        <CommandBinding x:Name="CloseLeftCommand" Command="{StaticResource CloseLeft}" Executed="CloseLeftCommand_Executed"/>
+        <CommandBinding x:Name="CloseRightCommand" Command="{StaticResource CloseRight}" Executed="CloseRightCommand_Executed"/>
+    </UserControl.CommandBindings>
 
-    
     <Grid Background="{StaticResource color.sys.layout.mg}">
         <Grid.RowDefinitions>
             <RowDefinition Name="HeadRow" Height="40" />

+ 10 - 0
PDF Office/Views/ViewContent.xaml.cs

@@ -251,5 +251,15 @@ namespace PDF_Office.Views
             }
             catch { }
         }
+
+        private void CloseLeftCommand_Executed(object sender, ExecutedRoutedEventArgs e)
+        {
+            BOTASplitter.Visibility = Visibility.Collapsed;
+        }
+
+        private void CloseRightCommand_Executed(object sender, ExecutedRoutedEventArgs e)
+        {
+            viewModel.ClosePropertyCommand.Execute();
+        }
     }
 }

+ 5 - 8
PDFSettings/APPSettingProperties.cs

@@ -40,6 +40,7 @@ namespace PDFSettings
         /// </summary>
         public int RecentFileListMode = 0;
 
+
         /// <summary>
         /// 删除最近文件记录时是否显示询问弹窗
         /// </summary>
@@ -66,7 +67,7 @@ namespace PDFSettings
         /// <summary>
         /// 文档打开时恢复上次视图设置
         /// </summary>
-        public bool RecoveryViewWhenOpen = false;
+        public bool RecoveryViewWhenOpen = true;
 
         /// <summary>
         /// 最近打开中文档最多显示数量
@@ -132,15 +133,11 @@ namespace PDFSettings
         /// </summary>
         public bool RememberBOTA = false;
 
-        /// <summary>
-        /// 记录本次BOTA的展开状态
-        /// </summary>
-        public bool IsBOTAOpen = false;
 
         /// <summary>
         /// 有大纲时默认显示大纲列表
         /// </summary>
-        public bool ShowOutLine = true;
+        public bool ShowOutLine = false;
 
         /// <summary>
         ///属性面板 自动展开
@@ -155,12 +152,12 @@ namespace PDFSettings
         /// <summary>
         /// 阅读页背景色
         /// </summary>
-        public Color BackGround = Colors.White;
+        public Color BackGround = (Color)ColorConverter.ConvertFromString("#CED0D4");
 
         /// <summary>
         /// 全屏背景色
         /// </summary>
-        public Color BackGroundInFulWindow = Colors.White;
+        public Color BackGroundInFulWindow = (Color)ColorConverter.ConvertFromString("#36383B");
 
         /// <summary>
         ///高亮表单

+ 13 - 0
PDFSettings/RecentOpenFiles.cs

@@ -34,5 +34,18 @@ namespace PDFSettings.Settings
         public Color LastFillBrushColor = Brushes.White.Color;
 
         public bool IsGuidPDF { get; set; } = false;
+
+        /// <summary>
+        /// 记录展开的BOTA的选项
+        /// </summary>
+        public string BOTASelectedTab = "";
+
+        //记录展开的BOTA的索引
+        public int BOTASelectedInex = 0;
+
+        /// <summary>
+        /// 记录本次BOTA的展开状态
+        /// </summary>
+        public bool IsBOTAOpen = false;
     }
 }