Sfoglia il codice sorgente

标记密文-完善标记密文部分逻辑

ZhouJieSheng 2 anni fa
parent
commit
d79e1a554b

+ 6 - 1
PDF Office/ViewModels/Dialog/Redaction/PageMarkDialogViewModel.cs

@@ -108,7 +108,7 @@ namespace PDF_Office.ViewModels.Dialog.Redaction
         {
             switch (args)
             {
-                case "Old":
+                case "Odd":
                     PageList = new List<int>();
                     for (int i = 1; i <=pageCount; i++)
                     {
@@ -168,6 +168,11 @@ namespace PDF_Office.ViewModels.Dialog.Redaction
                 PageCount = "/ " + page;
                 pageCount = page;
             }
+            PageList = new List<int>();
+            for (int i = 0; i < pageCount; i++)
+            {
+                PageList.Add(i);
+            }
             CurrentPageIndex = parameters.GetValue<int>(ParameterNames.CurrentPageIndex);
         }
     }

+ 6 - 1
PDF Office/ViewModels/Dialog/Redaction/RepeatMarkDialogViewModel.cs

@@ -65,7 +65,7 @@ namespace PDF_Office.ViewModels.Dialog.Redaction
         {
             switch (args)
             {
-                case "Old":
+                case "Odd":
                     PageList = new List<int>();
                     for (int i = 1; i <= pageCount; i++)
                     {
@@ -141,6 +141,11 @@ namespace PDF_Office.ViewModels.Dialog.Redaction
         public void OnDialogOpened(IDialogParameters parameters)
         {
            PageCount = parameters.GetValue<int>(ParameterNames.PageCount);
+            PageList = new List<int>();
+            for (int i = 0; i < pageCount; i++)
+            {
+                PageList.Add(i);
+            }
         }
     }
 }

+ 4 - 1
PDF Office/ViewModels/EditTools/Redaction/RedactionContentViewModel.cs

@@ -130,7 +130,7 @@ namespace PDF_Office.ViewModels.EditTools.Redaction
                     {
                         case "MenuDelete":
                             item.Command = ApplicationCommands.Delete;
-                            item.CommandParameter = (UIElement)item;
+                            item.CommandParameter = (UIElement)obj.Sender;
                             break;
                         case "MenuSetDeufalt":
                             item.Command = new DelegateCommand<RedactionCommandEventArgs>(SetDefualtProperty);
@@ -169,6 +169,9 @@ namespace PDF_Office.ViewModels.EditTools.Redaction
             keyValues.Add(ParameterNames.DataModel,args.args.AnnotEventArgsList[0] as RedactionAnnotArgs);
 
             Settings.Default.RedactionsSettings.SetDefualtValue(annoteargs.Content, annoteargs.LineColor,annoteargs.BgColor,annoteargs.FontColor, (int)annoteargs.FontSize,string.IsNullOrEmpty(annoteargs.Content) ? false : true, annoteargs.Align, annoteargs.FontFamily.ToString(),annoteargs.FontWeight);
+
+            PDFViewer.SetMouseMode(MouseModes.AnnotCreate);
+            PDFViewer.SetToolParam(annoteargs);
         }
 
         /// <summary>