|
@@ -267,15 +267,24 @@ namespace PDF_Master.ViewModels.BOTA
|
|
|
|
|
|
if (PDFViewer != null && textSearch != null)
|
|
if (PDFViewer != null && textSearch != null)
|
|
{
|
|
{
|
|
- SearchItem currentItem = obj as SearchItem;
|
|
|
|
|
|
+ System.Collections.IList currentItem = obj as System.Collections.IList;
|
|
if (currentItem != null && PDFViewer != null)
|
|
if (currentItem != null && PDFViewer != null)
|
|
{
|
|
{
|
|
List<TextSearchItem> pageTextList = new List<TextSearchItem>();
|
|
List<TextSearchItem> pageTextList = new List<TextSearchItem>();
|
|
- currentItem.TextProperty.SearchItem.BorderBrush = new SolidColorBrush(Color.FromArgb(0xFF, 0x17, 0x70, 0xF4));
|
|
|
|
- currentItem.TextProperty.SearchItem.Padding = new Thickness(3);
|
|
|
|
- currentItem.TextProperty.SearchItem.BorderThickness = 1;
|
|
|
|
- pageTextList.Add(currentItem.TextProperty.SearchItem);
|
|
|
|
- PDFViewer.HighLightSearchText(pageTextList);
|
|
|
|
|
|
+ for (int i = 0; i < currentItem.Count; i++)
|
|
|
|
+ {
|
|
|
|
+ if (currentItem[i] is SearchItem)
|
|
|
|
+ {
|
|
|
|
+ (currentItem[i] as SearchItem).TextProperty.SearchItem.BorderBrush = new SolidColorBrush(Color.FromArgb(0xFF, 0x17, 0x70, 0xF4));
|
|
|
|
+ (currentItem[i] as SearchItem).TextProperty.SearchItem.Padding = new Thickness(3);
|
|
|
|
+ (currentItem[i] as SearchItem).TextProperty.SearchItem.BorderThickness = 1;
|
|
|
|
+ pageTextList.Add((currentItem[i] as SearchItem).TextProperty.SearchItem);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (currentItem.Count>0)
|
|
|
|
+ {
|
|
|
|
+ PDFViewer.HighLightSearchText(pageTextList);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|