|
@@ -72,11 +72,11 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
{
|
|
|
if (e == CPDFSearchInputUI.MoveDirection.Previous)
|
|
|
{
|
|
|
- SearchInput_FindPreviousEvent(null, null);
|
|
|
+ pdfView.FindBackward();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- SearchInput_FindNextEvent(null, null);
|
|
|
+ pdfView.FindForward();
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -188,28 +188,40 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (textSearch != null && textSearch.CanDoSearch)
|
|
|
+ if (textSearch == null || !textSearch.CanDoSearch)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ var searchOption = C_Search_Options.Search_Case_Insensitive;
|
|
|
+ if (MatchChb.IsChecked)
|
|
|
+ {
|
|
|
+ searchOption |= C_Search_Options.Search_Match_Whole_Word;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (CaseChb.IsChecked)
|
|
|
+ {
|
|
|
+ searchOption |= C_Search_Options.Search_Case_Sensitive;
|
|
|
+ }
|
|
|
+
|
|
|
+ keyWord = e;
|
|
|
+ textSearch.TextSearchDocument = pdfView.Document;
|
|
|
+ SearchResult.ClearSearchResult();
|
|
|
+
|
|
|
+ if (SearchTog.IsChecked == true)
|
|
|
{
|
|
|
ResultNum.Text = "0";
|
|
|
ResultText.Text = LanguageHelper.BotaManager.GetString("Tip_Result");
|
|
|
ProgressBar.ProgressMaxValue = pdfView.Document.PageCount;
|
|
|
ProgressBorder.Visibility = Visibility.Visible;
|
|
|
|
|
|
- keyWord = e;
|
|
|
- textSearch.TextSearchDocument = pdfView.Document;
|
|
|
- SearchResult.ClearSearchResult();
|
|
|
- var searchOption = C_Search_Options.Search_Case_Insensitive;
|
|
|
- if (MatchChb.IsChecked == true)
|
|
|
- {
|
|
|
- searchOption |= C_Search_Options.Search_Match_Whole_Word;
|
|
|
- }
|
|
|
-
|
|
|
- if (CaseChb.IsChecked == true)
|
|
|
- {
|
|
|
- searchOption |= C_Search_Options.Search_Case_Sensitive;
|
|
|
- }
|
|
|
textSearch.SearchText(keyWord, searchOption);
|
|
|
}
|
|
|
+ else if (ReplaceTog.IsChecked == true)
|
|
|
+ {
|
|
|
+ pdfView.StartFindText(keyWord, searchOption);
|
|
|
+ pdfView.FindForward();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private void HighLightSelectResult(BindSearchResult result)
|