|
@@ -44,8 +44,8 @@ namespace PDF_Office.Views.BOTA
|
|
|
Grid grid = e.Source as Grid;
|
|
|
var args = grid.DataContext as AnnotationHandlerEventArgs;
|
|
|
AnnotHandlerEventArgs data = args.AnnotHandlerEventArgs;
|
|
|
- TxbMarkUpContent.Text = data.MarkupContent;
|
|
|
- TxbContext.Text = data.Content;
|
|
|
+ TxbMarkupContent.Text = data.MarkupContent;
|
|
|
+ TxbContent.Text = data.Content;
|
|
|
if (data == null)
|
|
|
{
|
|
|
return;
|
|
@@ -55,16 +55,16 @@ namespace PDF_Office.Views.BOTA
|
|
|
{
|
|
|
case AnnotArgsType.AnnotFreeText:
|
|
|
BtnAnnotFreeText.Visibility = Visibility.Visible;
|
|
|
- TxbMarkUpContent.Foreground = new SolidColorBrush((data as FreeTextAnnotArgs).FontColor);
|
|
|
+ TxbMarkupContent.Foreground = new SolidColorBrush((data as FreeTextAnnotArgs).FontColor);
|
|
|
break;
|
|
|
|
|
|
case AnnotArgsType.AnnotHighlight:
|
|
|
BtnHighlight.Visibility = Visibility.Visible;
|
|
|
PathHighlight.Background = new SolidColorBrush((data as TextHighlightAnnotArgs).Color);
|
|
|
//TxbContext.Text = data.Content;
|
|
|
- if (!string.IsNullOrEmpty(TxbContext.Text))
|
|
|
+ if (!string.IsNullOrEmpty(TxbMarkupContent.Text))
|
|
|
{
|
|
|
- TxbContext.Background = new SolidColorBrush((data as TextHighlightAnnotArgs).Color);
|
|
|
+ TxbMarkupContent.Background = new SolidColorBrush((data as TextHighlightAnnotArgs).Color);
|
|
|
}
|
|
|
|
|
|
break;
|
|
@@ -74,7 +74,7 @@ namespace PDF_Office.Views.BOTA
|
|
|
PathFreehand.Fill = new SolidColorBrush((data as FreehandAnnotArgs).InkColor);
|
|
|
ImageContext.Visibility = Visibility.Visible;
|
|
|
|
|
|
- TxbContext.Visibility = Visibility.Collapsed;
|
|
|
+ TxbMarkupContent.Visibility = Visibility.Collapsed;
|
|
|
|
|
|
//var encoder = new PngBitmapEncoder();
|
|
|
//encoder.Frames.Add(BitmapFrame.Create((BitmapSource)ImageContext.Source));
|
|
@@ -129,7 +129,7 @@ namespace PDF_Office.Views.BOTA
|
|
|
TextDecorationCollection myCollection2 = new TextDecorationCollection();
|
|
|
myCollection2.Add(myStrikeout);
|
|
|
//因为波浪线无法实现 暂时只显示文字 不显示下划线,删除线等
|
|
|
- TxbContext.TextDecorations = myCollection2;
|
|
|
+ TxbMarkupContent.TextDecorations = myCollection2;
|
|
|
|
|
|
#endregion to do
|
|
|
|
|
@@ -155,7 +155,7 @@ namespace PDF_Office.Views.BOTA
|
|
|
myUnderline.PenThicknessUnit = TextDecorationUnit.FontRecommended;
|
|
|
TextDecorationCollection myCollection1 = new TextDecorationCollection();
|
|
|
myCollection1.Add(myUnderline);
|
|
|
- TxbContext.TextDecorations = myCollection1;
|
|
|
+ TxbMarkupContent.TextDecorations = myCollection1;
|
|
|
|
|
|
#endregion TO DO
|
|
|
|
|
@@ -175,8 +175,8 @@ namespace PDF_Office.Views.BOTA
|
|
|
///对于形状注释等只有Note 的处理
|
|
|
if (!string.IsNullOrEmpty(data.Content) && string.IsNullOrEmpty(data.MarkupContent))
|
|
|
{
|
|
|
- TxbMarkUpContent.Text = Regex.Replace(data.Content, "[\r\n]", " ");
|
|
|
- TxbContext.Text = "";
|
|
|
+ TxbMarkupContent.Text = Regex.Replace(data.Content, "[\r\n]", " ");
|
|
|
+ TxbMarkupContent.Text = "";
|
|
|
}
|
|
|
break;
|
|
|
|
|
@@ -187,8 +187,8 @@ namespace PDF_Office.Views.BOTA
|
|
|
///对于形状注释等只有Note 的处理
|
|
|
if (!string.IsNullOrEmpty(data.Content) && string.IsNullOrEmpty(data.MarkupContent))
|
|
|
{
|
|
|
- TxbMarkUpContent.Text = Regex.Replace(data.Content, "[\r\n]", " ");
|
|
|
- TxbContext.Text = "";
|
|
|
+ TxbMarkupContent.Text = Regex.Replace(data.Content, "[\r\n]", " ");
|
|
|
+ TxbMarkupContent.Text = "";
|
|
|
}
|
|
|
break;
|
|
|
|
|
@@ -199,8 +199,8 @@ namespace PDF_Office.Views.BOTA
|
|
|
///对于形状注释等只有Note 的处理
|
|
|
if (!string.IsNullOrEmpty(data.Content) && string.IsNullOrEmpty(data.MarkupContent))
|
|
|
{
|
|
|
- TxbMarkUpContent.Text = Regex.Replace(data.Content, "[\r\n]", " ");
|
|
|
- TxbContext.Text = "";
|
|
|
+ TxbMarkupContent.Text = Regex.Replace(data.Content, "[\r\n]", " ");
|
|
|
+ TxbMarkupContent.Text = "";
|
|
|
}
|
|
|
break;
|
|
|
|
|
@@ -212,11 +212,11 @@ namespace PDF_Office.Views.BOTA
|
|
|
{
|
|
|
if (linkAnnotArgs.DestIndex != -1)
|
|
|
{
|
|
|
- TxbContext.Text = string.Format($"To Page {linkAnnotArgs.DestIndex + 1}");
|
|
|
+ TxbMarkupContent.Text = string.Format($"To Page {linkAnnotArgs.DestIndex + 1}");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- TxbContext.Text = string.Format($"{linkAnnotArgs.URI}");
|
|
|
+ TxbMarkupContent.Text = string.Format($"{linkAnnotArgs.URI}");
|
|
|
}
|
|
|
}
|
|
|
}
|