소스 검색

ComPDFKit(win) - 添加自定义命令:不带样式粘贴

weixiangjie 8 달 전
부모
커밋
ee53a2a413
1개의 변경된 파일3개의 추가작업 그리고 40개의 파일을 삭제
  1. 3 40
      Demo/Examples/Compdfkit_Tools/Edit/ContentEditCOntrol/ContentEditControl.xaml.cs

+ 3 - 40
Demo/Examples/Compdfkit_Tools/Edit/ContentEditCOntrol/ContentEditControl.xaml.cs

@@ -587,51 +587,13 @@ namespace Compdfkit_Tools.PDFControl
                     break;
                 default:
                     ContextMenu.Items.Add(new MenuItem() { Header = LanguageHelper.CommonManager.GetString("Menu_Paste"), Command = ApplicationCommands.Paste, CommandTarget = (UIElement)sender });
+                    ContextMenu.Items.Add(new MenuItem() { Header = LanguageHelper.CommonManager.GetString("Menu_MatchPaste"), Command = CustomCommands.PasteWithoutStyle, CommandTarget = (UIElement)sender });
                     break;
             }
             PdfViewControl.SetRightMenu(ContextMenu);
         }
         #endregion
-
-        //private void PDFEditMultiActiveHandler(object sender, List<PDFEditEvent> e)
-        //{
-        //    imageArea = null;
-        //    lastPDFEditMultiEvents = e;
-        //    if(e==null)
-        //    {
-        //        PDFEditEmptyPanel();
-        //        return;
-        //    }
-
-        //    if(e.Count>1)
-        //    {
-        //       List<CPDFEditType> editList= e.AsEnumerable().Select(x=>x.EditType).Distinct().ToList();
-
-        //        if(editList.Count>1)
-        //        {
-        //            PDFEditEmptyPanel();
-        //            return;
-        //        }
-
-        //        if (editList[0]==CPDFEditType.EditText)
-        //        {
-        //            pdfContentEditControl.SetPDFTextMultiEditData(e);
-        //            return;
-        //        }
-
-        //        if (editList[0]==CPDFEditType.EditImage)
-        //        {
-        //            UIElement pageView = sender as UIElement;
-        //            if (pageView != null)
-        //            {
-        //                pageView.MouseLeftButtonUp += PageView_MouseLeftButtonUp;
-        //            }
-        //            pdfContentEditControl.SetPDFImageMultiEditData(e);
-        //        }
-        //    }
-        //}
-
-         
+        
         #region Property changed
         protected void OnPropertyChanged([CallerMemberName] string name = null)
         {
@@ -815,6 +777,7 @@ namespace Compdfkit_Tools.PDFControl
             else
             {
                 menu.Items.Add(new MenuItem() { Header = LanguageHelper.CommonManager.GetString("Menu_Paste"), Command = ApplicationCommands.Paste, CommandTarget = (UIElement)sender });
+                menu.Items.Add(new MenuItem() { Header = LanguageHelper.CommonManager.GetString("Menu_MatchPaste"), Command = CustomCommands.PasteWithoutStyle, CommandTarget = (UIElement)sender });
             }
         }