|
@@ -5,6 +5,7 @@ using ComPDFKit.PDFPage;
|
|
|
using ComPDFKitViewer.AnnotEvent;
|
|
|
using ComPDFKitViewer.PdfViewer;
|
|
|
using PDF_Office.Helper;
|
|
|
+using PDF_Office.Model.BOTA;
|
|
|
using PDF_Office.ViewModels.BOTA;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
@@ -50,21 +51,23 @@ namespace PDF_Office.Views.BOTA
|
|
|
{
|
|
|
case AnnotArgsType.AnnotFreeText:
|
|
|
AnnotFreeText.Visibility = Visibility.Visible;
|
|
|
- TxbContext.Text = data.Content;
|
|
|
TxbMarkUpContent.Foreground = new SolidColorBrush((data as FreeTextAnnotArgs).FontColor);
|
|
|
-
|
|
|
break;
|
|
|
|
|
|
case AnnotArgsType.AnnotHighlight:
|
|
|
BtnHighlight.Visibility = Visibility.Visible;
|
|
|
- HighlightPath.Fill = new SolidColorBrush((data as TextHighlightAnnotArgs).Color);
|
|
|
+ PathHighlight.Fill = new SolidColorBrush((data as TextHighlightAnnotArgs).Color);
|
|
|
//TxbContext.Text = data.Content;
|
|
|
- TxbContext.Background = new SolidColorBrush((data as TextHighlightAnnotArgs).Color);
|
|
|
+ if (!string.IsNullOrEmpty(TxbContext.Text))
|
|
|
+ {
|
|
|
+ TxbContext.Background = new SolidColorBrush((data as TextHighlightAnnotArgs).Color);
|
|
|
+ }
|
|
|
+
|
|
|
break;
|
|
|
|
|
|
case AnnotArgsType.AnnotFreehand:
|
|
|
BtnFreeHand.Visibility = Visibility.Visible;
|
|
|
- FreehandPath.Fill = new SolidColorBrush((data as FreehandAnnotArgs).InkColor);
|
|
|
+ PathFreehand.Fill = new SolidColorBrush((data as FreehandAnnotArgs).InkColor);
|
|
|
ImageContext.Visibility = Visibility.Visible;
|
|
|
|
|
|
TxbContext.Visibility = Visibility.Collapsed;
|
|
@@ -105,9 +108,9 @@ namespace PDF_Office.Views.BOTA
|
|
|
break;
|
|
|
|
|
|
case AnnotArgsType.AnnotStrikeout://删除线
|
|
|
- AnnotStrikeout.Visibility = Visibility.Visible;
|
|
|
+ BtnAnnotStrikeout.Visibility = Visibility.Visible;
|
|
|
|
|
|
- AnnotStrikeoutycolor.Fill = new SolidColorBrush((data as TextStrikeoutAnnotArgs).Color);
|
|
|
+ PathStrikeoutyColor.Fill = new SolidColorBrush((data as TextStrikeoutAnnotArgs).Color);
|
|
|
|
|
|
#region to do
|
|
|
|
|
@@ -130,7 +133,7 @@ namespace PDF_Office.Views.BOTA
|
|
|
|
|
|
case AnnotArgsType.AnnotSticky://便签
|
|
|
BtnAnnotSticky.Visibility = Visibility;
|
|
|
- Pathsticky.Fill = new SolidColorBrush((data as StickyAnnotArgs).Color);
|
|
|
+ PathSticky.Fill = new SolidColorBrush((data as StickyAnnotArgs).Color);
|
|
|
break;
|
|
|
|
|
|
case AnnotArgsType.AnnotUnderline:
|
|
@@ -157,13 +160,13 @@ namespace PDF_Office.Views.BOTA
|
|
|
case AnnotArgsType.AnnotLine:
|
|
|
if ((data as LineAnnotArgs).HeadLineType >= (C_LINE_TYPE)1 || (data as LineAnnotArgs).TailLineType >= (C_LINE_TYPE)1)
|
|
|
{
|
|
|
- SharpArrowBtn.Visibility = Visibility.Visible;
|
|
|
- arrow.Fill = new SolidColorBrush((data as LineAnnotArgs).LineColor);
|
|
|
+ BtnSharpArrow.Visibility = Visibility.Visible;
|
|
|
+ PathArrow.Fill = new SolidColorBrush((data as LineAnnotArgs).LineColor);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- line.Fill = new SolidColorBrush((data as LineAnnotArgs).LineColor);
|
|
|
- SharpLineBtn.Visibility = Visibility.Visible;
|
|
|
+ PathSharpLine.Fill = new SolidColorBrush((data as LineAnnotArgs).LineColor);
|
|
|
+ BtnSharpLine.Visibility = Visibility.Visible;
|
|
|
}
|
|
|
///对于形状注释等只有Note 的处理
|
|
|
if (!string.IsNullOrEmpty(data.Content) && string.IsNullOrEmpty(data.MarkupContent))
|
|
@@ -174,7 +177,7 @@ namespace PDF_Office.Views.BOTA
|
|
|
break;
|
|
|
|
|
|
case AnnotArgsType.AnnotSquare:
|
|
|
- AnnotSquare.Visibility = Visibility.Visible;
|
|
|
+ BtnAnnotSquare.Visibility = Visibility.Visible;
|
|
|
RectAnnotSquare.Stroke = new SolidColorBrush((data as SquareAnnotArgs).LineColor);
|
|
|
RectAnnotSquare.Fill = new SolidColorBrush((data as SquareAnnotArgs).BgColor);
|
|
|
///对于形状注释等只有Note 的处理
|
|
@@ -186,9 +189,9 @@ namespace PDF_Office.Views.BOTA
|
|
|
break;
|
|
|
|
|
|
case AnnotArgsType.AnnotCircle:
|
|
|
- AnnotCircle.Visibility = Visibility.Visible;
|
|
|
- circle.Stroke = new SolidColorBrush((data as CircleAnnotArgs).LineColor);
|
|
|
- circle.Fill = new SolidColorBrush((data as CircleAnnotArgs).BgColor);
|
|
|
+ BtnAnnotCircle.Visibility = Visibility.Visible;
|
|
|
+ EllipseCircle.Stroke = new SolidColorBrush((data as CircleAnnotArgs).LineColor);
|
|
|
+ EllipseCircle.Fill = new SolidColorBrush((data as CircleAnnotArgs).BgColor);
|
|
|
///对于形状注释等只有Note 的处理
|
|
|
if (!string.IsNullOrEmpty(data.Content) && string.IsNullOrEmpty(data.MarkupContent))
|
|
|
{
|