ソースを参照

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

liuaoran 2 年 前
コミット
8600e8db3a
30 ファイル変更730 行追加247 行削除
  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. 8 5
      PDF Office/Styles/ListViewStyle.xaml
  9. 3 2
      PDF Office/ViewModels/BOTA/AnnotationContentViewModel.cs
  10. 15 1
      PDF Office/ViewModels/BOTA/BOTAContentViewModel.cs
  11. 31 0
      PDF Office/ViewModels/Dialog/ServiceDialog/IAPCompareDialogViewModel.cs
  12. 23 5
      PDF Office/ViewModels/FillAndSign/FillAndSignContentViewModel.cs
  13. 17 7
      PDF Office/ViewModels/MainContentViewModel.cs
  14. 31 1
      PDF Office/ViewModels/MainWindowViewModel.cs
  15. 15 4
      PDF Office/ViewModels/PropertyPanel/AnnotPanel/LinkAnnotPropertyViewModel.cs
  16. 2 0
      PDF Office/ViewModels/PropertyPanel/ViewModular/ReadViewContentViewModel.cs
  17. 82 7
      PDF Office/ViewModels/PropertyPanel/ViewModular/ViewModularContentViewModel.cs
  18. 9 2
      PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Command.cs
  19. 6 6
      PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Function.cs
  20. 1 0
      PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Properties.cs
  21. 31 5
      PDF Office/ViewModels/Tools/AnnotToolContentViewModel.cs
  22. 11 1
      PDF Office/ViewModels/ViewContentViewModel.cs
  23. 21 0
      PDF Office/Views/Dialog/ServiceDialog/IAPCompareDialog.xaml
  24. 28 0
      PDF Office/Views/Dialog/ServiceDialog/IAPCompareDialog.xaml.cs
  25. 179 164
      PDF Office/Views/Dialog/SettingsDialog.xaml
  26. 4 1
      PDF Office/Views/HomeContent.xaml.cs
  27. 36 13
      PDF Office/Views/HomePanel/PromotionContent.xaml
  28. 69 11
      PDF Office/Views/HomePanel/PromotionContent.xaml.cs
  29. 5 8
      PDFSettings/APPSettingProperties.cs
  30. 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;
+        }
+    }
+}

+ 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>

+ 3 - 2
PDF Office/ViewModels/BOTA/AnnotationContentViewModel.cs

@@ -249,6 +249,7 @@ namespace PDF_Office.ViewModels.BOTA
         public void DisplayAnnot()
         {
             AnnotationListItems = GetDocumentAnnotionList();
+            CurrentAnnotationLists = GetDocumentAnnotionList();
             RefreshAnnotationListItems();
         }
 
@@ -551,7 +552,7 @@ namespace PDF_Office.ViewModels.BOTA
         /// 刷新列表数据
         /// </summary>
         /// <param name="button"></param>
-        private async void RefreshAnnotationListItems(System.Windows.Controls.Button button = null)
+        public async void RefreshAnnotationListItems(System.Windows.Controls.Button button = null)
         {
             switch (AnnotationSortOrder)
             {
@@ -1281,7 +1282,7 @@ namespace PDF_Office.ViewModels.BOTA
         /// 获取listbox绑定数据
         /// </summary>
         /// <returns></returns>
-        private ObservableCollection<AnnotationHandlerEventArgs> GetDocumentAnnotionList()
+        public ObservableCollection<AnnotationHandlerEventArgs> GetDocumentAnnotionList()
         {
             ObservableCollection<AnnotationHandlerEventArgs> list = new ObservableCollection<AnnotationHandlerEventArgs>();
             for (int i = 0; i < PdfViewer.Document.PageCount; i++)

+ 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

+ 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;

+ 15 - 4
PDF Office/ViewModels/PropertyPanel/AnnotPanel/LinkAnnotPropertyViewModel.cs

@@ -39,7 +39,6 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
 {
     internal class LinkAnnotPropertyViewModel : BindableBase, INavigationAware
     {
-
         #region 文案
 
         private string T_title;
@@ -70,7 +69,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
             T_Page = App.MainPageLoader.GetString("Link_Page");
         }
 
-        #endregion
+        #endregion 文案
 
         public AnnotAttribEvent AnnotAttribEvent { get; set; }
 
@@ -751,7 +750,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
                 var isHas = views.FindFirst(q => q is Views.TipContent.LinkAnnotTip);
                 if (isHas != null)
                 {
-                    isExist=true;
+                    isExist = true;
                 }
                 //foreach (var item in views)
                 //{
@@ -1214,7 +1213,19 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
                         }
                     }
                 }
-
+                if (pdfViewer != null && pdfViewer.ToolManager != null && pdfViewer.ToolManager.CurrentAnnotArgs?.EventType == AnnotArgsType.AnnotLink)
+                {
+                    LinkAnnotArgs = pdfViewer.ToolManager.CurrentAnnotArgs as LinkAnnotArgs;
+                    if (LinkAnnotArgs == null)
+                    {
+                        LinkAnnotArgs = (LinkAnnotArgs)propertyPanel.annot;
+                        backPageIndex = pdfViewer.CurrentIndex;
+                    }
+                    else
+                    {
+                        LinkAnnotArgs.PageIndex = pdfViewer.CurrentIndex;
+                    }
+                }
                 if (LinkAnnotArgs == null)
                 {
                     LinkAnnotArgs = (LinkAnnotArgs)propertyPanel.annot;

+ 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)
             {

+ 82 - 7
PDF Office/ViewModels/PropertyPanel/ViewModular/ViewModularContentViewModel.cs

@@ -1,11 +1,14 @@
 using ComPDFKitViewer;
+using ComPDFKitViewer.AnnotEvent;
 using ComPDFKitViewer.PdfViewer;
 using Microsoft.Office.Interop.Word;
 using PDF_Office.CustomControl;
 using PDF_Office.Helper;
 using PDF_Office.Model;
+using PDF_Office.Model.BOTA;
 using PDF_Office.ViewModels.BOTA;
 using PDF_Office.Views;
+using PDF_Office.Views.BOTA;
 using PDFSettings.Settings;
 using Prism.Commands;
 using Prism.Mvvm;
@@ -13,6 +16,7 @@ using Prism.Regions;
 using Prism.Services.Dialogs;
 using System;
 using System.Collections.Generic;
+using System.Collections.ObjectModel;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -23,8 +27,8 @@ namespace PDF_Office.ViewModels.PropertyPanel.ViewModular
 {
     public class ViewModularContentViewModel : BindableBase, INavigationAware
     {
-
         #region 文案
+
         private string T_title;
 
         public string T_Title
@@ -135,8 +139,6 @@ namespace PDF_Office.ViewModels.PropertyPanel.ViewModular
             }
         }
 
-
-
         private void InitString()
         {
             T_Title = App.MainPageLoader.GetString("ViewProperties_Title");
@@ -151,8 +153,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.ViewModular
             T_RotateTitle = App.MainPageLoader.GetString("ViewProperties_RotateTitle");
         }
 
-
-        #endregion
+        #endregion 文案
 
         private IRegionManager region;
 
@@ -344,10 +345,84 @@ namespace PDF_Office.ViewModels.PropertyPanel.ViewModular
             {
                 SplitScreenPDFViewer.RotatePage(PageRotate.Rotate90, right, SplitScreenPDFViewer.CurrentIndex);
             }
-
+            PDFViewer.UndoManager.CanSave = true;
             //后续需要添加,缩略图旋转改变
 
-            PDFViewer.UndoManager.CanSave = true;
+            if (ViewContentViewModel.OpenBOTA == true)
+            {
+                UpdateTabItemAnnotation();
+            }
+        }
+
+        private void UpdateTabItemAnnotation()
+        {
+            bool isTabItemAnnotation = IsBOTATabItemShow(out BOTAContentViewModel bOTAContentViewModel, out BOTAContent bOTAContent, "TabItemAnnotation");
+
+            if (isTabItemAnnotation == true && bOTAContent.TabItemAnnotation.IsSelected == true)
+            {
+                AnnotationContentViewModel viewModel = GetAnnotationContentViewModel(bOTAContentViewModel, out AnnotationContent annotation);
+
+                if (viewModel != null)
+                {
+                    if (viewModel.AnnotationListItems.Count > 0)
+                    {
+                        var list = viewModel.AnnotationListItems.Where(q => q.AnnotHandlerEventArgs is FreehandAnnotArgs).ToList();
+                        if (list.Count() > 0)
+                        {
+                            for (int i = 0; i < list.Count(); i++)
+                            {
+                                var item = list[i];
+                                viewModel.UpdateModifiedAnnot(item.PageIndex, item.AnnotIndex, false);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        private AnnotationContentViewModel GetAnnotationContentViewModel(BOTAContentViewModel bOTAContentViewModel, out AnnotationContent annotation)
+        {
+            AnnotationContentViewModel viewModel = null;
+            annotation = null;
+            if (bOTAContentViewModel != null)
+            {
+                if (region.Regions.ContainsRegionWithName(bOTAContentViewModel.BOTAContentRegionName))
+                {
+                    var views = region.Regions[bOTAContentViewModel.BOTAContentRegionName].Views;
+                    foreach (var item in views)
+                    {
+                        if (item is AnnotationContent annotation1)
+                        {
+                            annotation = annotation1;
+                            viewModel = annotation1.DataContext as AnnotationContentViewModel;
+                            break;
+                        }
+                    }
+                }
+            }
+            return viewModel;
+        }
+
+        private bool IsBOTATabItemShow(out BOTAContentViewModel bOTAContentViewModel, out BOTAContent bOTAContent, string tabItemText)
+        {
+            bool isTabItem = false;
+            bOTAContentViewModel = null;
+            bOTAContent = null;
+            if (region.Regions.ContainsRegionWithName(ViewContentViewModel.BOTARegionName))
+            {
+                var views = region.Regions[ViewContentViewModel.BOTARegionName].Views;
+                var model = views.FirstOrDefault(q => q is BOTAContent);
+                if (model is BOTAContent bOTAContent1)
+                {
+                    bOTAContent = bOTAContent1;
+                    bOTAContentViewModel = bOTAContent.DataContext as BOTAContentViewModel;
+                    if (bOTAContentViewModel.CurrentBar == tabItemText)
+                    {
+                        isTabItem = true;
+                    }
+                }
+            }
+            return isTabItem;
         }
 
         /// <summary>

+ 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;

+ 31 - 5
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.cs

@@ -151,11 +151,15 @@ namespace PDF_Office.ViewModels.Tools
                     var annotArgs = new SelectToolArgs();
                     PDFViewer.SetToolParam(annotArgs);
                 }
+                else
+                {
+                    PDFViewer.SetMouseMode(MouseModes.PanTool);
+                }
             }
             else
             {
                 //鼠标滚动页面
-                PDFViewer.SetMouseMode(MouseModes.PanTool);
+                PDFViewer.SetMouseMode(MouseModes.Scroll);
                 PDFViewer.SetToolParam(new AnnotHandlerEventArgs());
             }
         }
@@ -336,6 +340,7 @@ namespace PDF_Office.ViewModels.Tools
             {
                 if (item is MenuItem menuItem)
                 {
+                    menuItem.IsCheckable = false;
                     menuItem.Click -= PageDisplay_Click;
                     menuItem.Click += PageDisplay_Click;
                 }
@@ -377,7 +382,25 @@ namespace PDF_Office.ViewModels.Tools
             {
                 if (item is MenuItem menuItem)
                 {
-                    menuItem.Click -= PageDisplay_Click;
+                    //switch (PDFViewer.ModeFit)
+                    //{
+                    //    case FitMode.FitWidth:
+                    //        break;
+
+                    //    case FitMode.FitHeight:
+                    //        break;
+
+                    //    case FitMode.FitSize:
+                    //        break;
+
+                    //    case FitMode.FitFree:
+                    //        break;
+
+                    //    default:
+                    //        break;
+                    //}
+                    menuItem.IsCheckable = false;
+                    menuItem.Click -= ViewZoom_Click;
                     menuItem.Click += ViewZoom_Click;
                 }
             }
@@ -391,6 +414,7 @@ namespace PDF_Office.ViewModels.Tools
                 {
                     case "FitWidth":
                         PDFViewer.ChangeFitMode(FitMode.FitWidth);
+
                         break;
 
                     case "FitHeight":
@@ -430,6 +454,7 @@ namespace PDF_Office.ViewModels.Tools
             {
                 if (item is MenuItem menuItem)
                 {
+                    menuItem.IsCheckable = false;
                     menuItem.Click -= ToolMode_Click;
                     menuItem.Click += ToolMode_Click;
                 }
@@ -443,14 +468,14 @@ namespace PDF_Office.ViewModels.Tools
                 switch (menuItem.Tag.ToString())
                 {
                     case "default":
-                        PDFViewer.SetMouseMode(MouseModes.Default);
+                        PDFViewer.SetMouseMode(MouseModes.PanTool);
                         //viewContentViewModel.SelectedPrpoertyPanel("PropertyPanelContent", null);
                         BtnHandIsChecked = false;
                         ShowPropertyPanel(false);
                         break;
 
                     case "roll":
-                        PDFViewer.SetMouseMode(MouseModes.PanTool);
+                        PDFViewer.SetMouseMode(MouseModes.Scroll);
                         //viewContentViewModel.SelectedPrpoertyPanel("PropertyPanelContent", null);
                         BtnHandIsChecked = true;
                         ShowPropertyPanel(false);
@@ -466,6 +491,7 @@ namespace PDF_Office.ViewModels.Tools
                             PDFViewer.SetToolParam(annotHandler);
                             ShowPropertyPanel(false);
                         }
+
                         break;
 
                     default:
@@ -762,7 +788,7 @@ namespace PDF_Office.ViewModels.Tools
             BindingPDFViewerHandler();
             BindingEvent();
             LoaedStickyNotePopup();
-            BtnHandIsChecked = (PDFViewer.MouseMode == MouseModes.Scroll? true:false);
+            BtnHandIsChecked = (PDFViewer.MouseMode == MouseModes.Scroll ? true : false);
         }
 
         #endregion Navigation

+ 11 - 1
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);
             }
         }
@@ -1228,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()
@@ -1458,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))
@@ -1766,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)
                 {

+ 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 { }
+        }
     }
 }

+ 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;
     }
 }