Explorar o código

注释-属性面板显示、隐藏 bug

OYXH\oyxh hai 1 ano
pai
achega
1af6d8643e

+ 54 - 0
PDF Office/PDF Office.sln

@@ -0,0 +1,54 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.4.33205.214
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PDF Office", "PDF Office.csproj", "{F3A2111D-9EAF-4ECE-9A92-B7F21D429DCD}"
+	ProjectSection(ProjectDependencies) = postProject
+		{BEE73AAE-9A2C-446B-B64D-3A8F042C985D} = {BEE73AAE-9A2C-446B-B64D-3A8F042C985D}
+	EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PDFSettings", "..\PDFSettings\PDFSettings.csproj", "{BEE73AAE-9A2C-446B-B64D-3A8F042C985D}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|Any CPU = Release|Any CPU
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{F3A2111D-9EAF-4ECE-9A92-B7F21D429DCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{F3A2111D-9EAF-4ECE-9A92-B7F21D429DCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{F3A2111D-9EAF-4ECE-9A92-B7F21D429DCD}.Debug|x64.ActiveCfg = Debug|x64
+		{F3A2111D-9EAF-4ECE-9A92-B7F21D429DCD}.Debug|x64.Build.0 = Debug|x64
+		{F3A2111D-9EAF-4ECE-9A92-B7F21D429DCD}.Debug|x86.ActiveCfg = Debug|x86
+		{F3A2111D-9EAF-4ECE-9A92-B7F21D429DCD}.Debug|x86.Build.0 = Debug|x86
+		{F3A2111D-9EAF-4ECE-9A92-B7F21D429DCD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{F3A2111D-9EAF-4ECE-9A92-B7F21D429DCD}.Release|Any CPU.Build.0 = Release|Any CPU
+		{F3A2111D-9EAF-4ECE-9A92-B7F21D429DCD}.Release|x64.ActiveCfg = Release|x64
+		{F3A2111D-9EAF-4ECE-9A92-B7F21D429DCD}.Release|x64.Build.0 = Release|x64
+		{F3A2111D-9EAF-4ECE-9A92-B7F21D429DCD}.Release|x86.ActiveCfg = Release|x86
+		{F3A2111D-9EAF-4ECE-9A92-B7F21D429DCD}.Release|x86.Build.0 = Release|x86
+		{BEE73AAE-9A2C-446B-B64D-3A8F042C985D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{BEE73AAE-9A2C-446B-B64D-3A8F042C985D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{BEE73AAE-9A2C-446B-B64D-3A8F042C985D}.Debug|x64.ActiveCfg = Debug|x64
+		{BEE73AAE-9A2C-446B-B64D-3A8F042C985D}.Debug|x64.Build.0 = Debug|x64
+		{BEE73AAE-9A2C-446B-B64D-3A8F042C985D}.Debug|x86.ActiveCfg = Debug|x86
+		{BEE73AAE-9A2C-446B-B64D-3A8F042C985D}.Debug|x86.Build.0 = Debug|x86
+		{BEE73AAE-9A2C-446B-B64D-3A8F042C985D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{BEE73AAE-9A2C-446B-B64D-3A8F042C985D}.Release|Any CPU.Build.0 = Release|Any CPU
+		{BEE73AAE-9A2C-446B-B64D-3A8F042C985D}.Release|x64.ActiveCfg = Release|x64
+		{BEE73AAE-9A2C-446B-B64D-3A8F042C985D}.Release|x64.Build.0 = Release|x64
+		{BEE73AAE-9A2C-446B-B64D-3A8F042C985D}.Release|x86.ActiveCfg = Release|x86
+		{BEE73AAE-9A2C-446B-B64D-3A8F042C985D}.Release|x86.Build.0 = Release|x86
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {3FB3414D-2545-4F50-B787-20C332327ECC}
+	EndGlobalSection
+EndGlobal

+ 10 - 1
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Command.cs

@@ -271,7 +271,7 @@ namespace PDF_Master.ViewModels.Tools
                 case AnnotArgsType.AnnotLink:
                     //viewContentViewModel.IsCreateLink = false;
                     //e.IsAnnotCreateReset= true;
-                    if (btnLinkIsChecked == false)
+                    if (BtnLinkIsChecked == false)
                     {
                         propertyPanel.IsAddLink = false;
                     }
@@ -371,6 +371,10 @@ namespace PDF_Master.ViewModels.Tools
                         {
                             switch (annot.EventType)
                             {
+                                case AnnotArgsType.AnnotFreeText:
+                                    GetFreetext(e.AnnotItemsList);
+                                    PDFViewer.SetToolParam(annot);
+                                    break;
                                 case AnnotArgsType.AnnotSticky:
                                     customStickyPopup.GetCurrentAnnot = e.AnnotItemsList[0] as StickyAnnotArgs;
                                     customStickyPopup.GetPDFViewer = PDFViewer;
@@ -493,6 +497,11 @@ namespace PDF_Master.ViewModels.Tools
                             viewContentViewModel.SelectedPrpoertyPanel("PropertyPanelContent", null);
                         }
                     }
+                    else
+                    {
+                        if(propertyPanel.IsMultiSelected==false)
+                        viewContentViewModel.SelectedPrpoertyPanel("PropertyPanelContent", null);
+                    }
                 }
             }
         }

+ 2 - 0
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Function.cs

@@ -761,6 +761,8 @@ namespace PDF_Master.ViewModels.Tools
                 else
                 {
                     stickyAnnotArgs = propertyPanel.LastAnnotDict[AnnotArgsType.AnnotSticky] as StickyAnnotArgs;
+                    stickyAnnotArgs.Content=string.Empty;   
+                    stickyAnnotArgs.StickyNote= string.Empty;
                 }
 
                 if (stickyAnnotArgs != null)

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

@@ -188,11 +188,7 @@ namespace PDF_Master.ViewModels.Tools
                     PDFViewer.SetMouseMode(MouseModes.AnnotCreate);
                     PDFViewer.SetToolParam(annotArgs);
 
-                    #region 设计重新调整,阅读页空白处,右键菜单,添加链接需要显示,其他和pro mac一样的效果,不显示属性栏
-
-                    //isRightMenuAddAnnot = false;
-
-                    #endregion 设计重新调整,阅读页空白处,右键菜单,添加链接需要显示,其他和pro mac一样的效果,不显示属性栏
+                    
                 }
             }
             else
@@ -201,6 +197,7 @@ namespace PDF_Master.ViewModels.Tools
                 propertyPanel.IsAddLink = false;
                 propertyPanel.IsLocationLink = false;
                 PDFViewer.ToolManager.EnableClickCreate = false;
+                ShowPropertyPanel(false);
             }
 
             if (dictVar["isTemplateAnnot"] == false && annotArgs == null)

+ 8 - 0
PDF Office/Views/PropertyPanel/AnnotPanel/StickyNotePopup.xaml.cs

@@ -8,6 +8,7 @@ using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.Linq;
 using System.Text;
+using System.Text.RegularExpressions;
 using System.Threading.Tasks;
 using System.Windows;
 using System.Windows.Controls;
@@ -15,6 +16,7 @@ using System.Windows.Controls.Primitives;
 using System.Windows.Data;
 using System.Windows.Documents;
 using System.Windows.Input;
+using System.Windows.Markup;
 using System.Windows.Media;
 using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
@@ -318,6 +320,12 @@ namespace PDF_Master.Views.PropertyPanel.AnnotPanel
         public override void SetDateText(string dateText)
         {
             base.SetDateText(dateText);
+            if (Regex.IsMatch(dateText, "(?<=D\\:)[0-9]+(?=[\\+\\-])"))
+            {
+                string dateStr = Regex.Match(dateText, "(?<=D\\:)[0-9]+(?=[\\+\\-])").Value;
+                dateText = dateStr.Substring(4, 2)+ "/" + dateStr.Substring(6, 2) +"/" + dateStr.Substring(0, 4)  + " " + dateStr.Substring(8, 2) + ":" +
+                    dateStr.Substring(10, 2) + ":" + dateStr.Substring(12, 2);
+            }
             StickyDate = dateText;
         }