|
@@ -1,4 +1,6 @@
|
|
|
-using System;
|
|
|
+using compdfkit_tools.PDFControl;
|
|
|
+using compdfkit_tools.PDFControlUI;
|
|
|
+using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
@@ -20,9 +22,52 @@ namespace compdfkit_tools.Annotation.PDFAnnotationControl
|
|
|
/// </summary>
|
|
|
public partial class CPDFAnnotationControl : UserControl
|
|
|
{
|
|
|
+
|
|
|
+
|
|
|
public CPDFAnnotationControl()
|
|
|
{
|
|
|
InitializeComponent();
|
|
|
}
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 获取Bota工具
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private UIElement GetAnnotationPanel()
|
|
|
+ {
|
|
|
+ return AnnotationPanelContainer.Child;
|
|
|
+ }
|
|
|
+
|
|
|
+ private void SetAnnotationPanel(UIElement newChild)
|
|
|
+ {
|
|
|
+ AnnotationPanelContainer.Child = newChild;
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 展开Bota工具
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="isExpand"></param>
|
|
|
+ private void ExpandPanel(bool isExpand)
|
|
|
+ {
|
|
|
+ AnnotationPanelContainer.Visibility = isExpand ? Visibility.Visible : Visibility.Collapsed;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void LoadAnnotationPanel(AnnotationProperties annotationProperties)
|
|
|
+ {
|
|
|
+ UIElement annotationPanel = GetAnnotationPanel();
|
|
|
+ switch (annotationProperties)
|
|
|
+ {
|
|
|
+ case AnnotationProperties.Highlight:
|
|
|
+ CPDFHighlightUI CPDFHighlightUI = new CPDFHighlightUI();
|
|
|
+ SetAnnotationPanel(CPDFHighlightUI);
|
|
|
+ ExpandPanel(true);
|
|
|
+ break;
|
|
|
+ case AnnotationProperties.Underline:
|
|
|
+ break;
|
|
|
+ case AnnotationProperties.Strikeout:
|
|
|
+ break;
|
|
|
+ default: throw new ArgumentException();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|