Kaynağa Gözat

ComPDFKit(win) - 搜索结果显示,添加测量刷新列表

weixiangjie 7 ay önce
ebeveyn
işleme
4db7bdd3ca

+ 4 - 1
Demo/Examples/Compdfkit_Tools/PDFView/PDFSearch/PDFSearchUI/CPDFSearchInputUI.xaml.cs

@@ -1,4 +1,5 @@
 using System;
+using System.Text.RegularExpressions;
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Input;
@@ -92,7 +93,9 @@ namespace Compdfkit_Tools.PDFControlUI
         {
             if (string.IsNullOrEmpty(SearchKeyWord) == false)
             {
-                SearchEvent?.Invoke(this, SearchKeyWord);
+                Regex regex = new Regex(@"\s+");
+                string result = regex.Replace(SearchKeyWord, " ");
+                SearchEvent?.Invoke(this, result);
             }
         }
 

+ 2 - 0
Demo/Examples/PDFViewer/MainPage.xaml.cs

@@ -666,6 +666,8 @@ namespace PDFViewer
                     measureControl.SetBOTAContainer(botaBarControl);
                     measureControl.ClearAllToolState();
                     GetPDFViewControl().PDFViewTool.GetDefaultSettingParam().IsOpenMeasure = true;
+                    measureControl.OnAnnotEditHandler -= PdfFormControlRefreshAnnotList;
+                    measureControl.OnAnnotEditHandler += PdfFormControlRefreshAnnotList;
                 }
             }
             currentMode = item.Tag as string;