|
@@ -216,7 +216,6 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
/// </summary>
|
|
|
private AnnotHandlerEventArgs GetHighLight(List<AnnotHandlerEventArgs> selectedArgs = null)
|
|
|
{
|
|
|
- Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
TextHighlightAnnotArgs highlightArgs = null;
|
|
|
|
|
|
if (selectedArgs == null || selectedArgs.Count == 0)
|
|
@@ -236,12 +235,7 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
{
|
|
|
highlightArgs = selectedArgs[0] as TextHighlightAnnotArgs;
|
|
|
}
|
|
|
-
|
|
|
- annotAttribsList[AnnotAttrib.Color] = highlightArgs.Color;
|
|
|
- annotAttribsList[AnnotAttrib.Transparency] = highlightArgs.Transparency;
|
|
|
- annotAttribsList[AnnotAttrib.NoteText] = highlightArgs.Content;
|
|
|
-
|
|
|
- AddToPropertyPanel("TextAnnotProperty", "HighLight", selectedArgs, annotAttribsList);
|
|
|
+ AddToPropertyPanel("TextAnnotProperty", "HighLight", selectedArgs);
|
|
|
return highlightArgs;
|
|
|
}
|
|
|
|
|
@@ -252,7 +246,6 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
/// <param name="annotAttribEvent">注释属性列表</param>
|
|
|
public AnnotHandlerEventArgs GetLink(List<AnnotHandlerEventArgs> selectedArgs = null, AnnotAttribEvent annotAttribEvent = null)
|
|
|
{
|
|
|
- Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
LinkAnnotArgs linkArgs = new LinkAnnotArgs();
|
|
|
|
|
|
if (selectedArgs != null && selectedArgs.Count > 1)
|
|
@@ -271,12 +264,7 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- annotAttribsList[AnnotAttrib.LinkType] = linkArgs.LinkType;
|
|
|
- annotAttribsList[AnnotAttrib.LinkUri] = linkArgs.URI;
|
|
|
- annotAttribsList[AnnotAttrib.LinkDestIndx] = linkArgs.DestIndex;
|
|
|
-
|
|
|
-
|
|
|
- AddToPropertyPanel("LinkAnnotProperty", "Link", selectedArgs, annotAttribsList, annotAttribEvent);
|
|
|
+ AddToPropertyPanel("LinkAnnotProperty", "Link", selectedArgs, annotAttribEvent);
|
|
|
return linkArgs;
|
|
|
}
|
|
|
|
|
@@ -286,7 +274,6 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
/// <param name="selectedArgs"></param>
|
|
|
private AnnotHandlerEventArgs GetUnderLine(List<AnnotHandlerEventArgs> selectedArgs = null)
|
|
|
{
|
|
|
- Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
TextUnderlineAnnotArgs underlineArgs = null;
|
|
|
|
|
|
if (selectedArgs == null || selectedArgs.Count == 0)
|
|
@@ -306,11 +293,7 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
underlineArgs = selectedArgs[0] as TextUnderlineAnnotArgs;
|
|
|
}
|
|
|
|
|
|
- annotAttribsList[AnnotAttrib.Color] = underlineArgs.Color;
|
|
|
- annotAttribsList[AnnotAttrib.Transparency] = underlineArgs.Transparency;
|
|
|
- annotAttribsList[AnnotAttrib.NoteText] = underlineArgs.Content;
|
|
|
-
|
|
|
- AddToPropertyPanel("TextAnnotProperty", "UnderLine", selectedArgs, annotAttribsList);
|
|
|
+ AddToPropertyPanel("TextAnnotProperty", "UnderLine", selectedArgs);
|
|
|
return underlineArgs;
|
|
|
}
|
|
|
|
|
@@ -321,7 +304,6 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
/// <returns></returns>
|
|
|
private AnnotHandlerEventArgs GetSquiggly(List<AnnotHandlerEventArgs> selectedArgs = null)
|
|
|
{
|
|
|
- Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
TextSquigglyAnnotArgs squigglyArgs = null;
|
|
|
|
|
|
if (selectedArgs == null || selectedArgs.Count == 0)
|
|
@@ -341,11 +323,7 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
squigglyArgs = selectedArgs[0] as TextSquigglyAnnotArgs;
|
|
|
}
|
|
|
|
|
|
- annotAttribsList[AnnotAttrib.Color] = squigglyArgs.Color;
|
|
|
- annotAttribsList[AnnotAttrib.Transparency] = squigglyArgs.Transparency;
|
|
|
- annotAttribsList[AnnotAttrib.NoteText] = squigglyArgs.Content;
|
|
|
-
|
|
|
- AddToPropertyPanel("TextAnnotProperty", "Squiggly", selectedArgs, annotAttribsList);
|
|
|
+ AddToPropertyPanel("TextAnnotProperty", "Squiggly", selectedArgs);
|
|
|
return squigglyArgs;
|
|
|
}
|
|
|
|
|
@@ -356,7 +334,6 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
/// <returns></returns>
|
|
|
private AnnotHandlerEventArgs GetStrikeout(List<AnnotHandlerEventArgs> selectedArgs = null)
|
|
|
{
|
|
|
- Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
TextStrikeoutAnnotArgs strikeoutArgs = null;
|
|
|
|
|
|
if (selectedArgs == null || selectedArgs.Count == 0)
|
|
@@ -376,11 +353,7 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
strikeoutArgs = selectedArgs[0] as TextStrikeoutAnnotArgs;
|
|
|
}
|
|
|
|
|
|
- annotAttribsList[AnnotAttrib.Color] = strikeoutArgs.Color;
|
|
|
- annotAttribsList[AnnotAttrib.Transparency] = strikeoutArgs.Transparency;
|
|
|
- annotAttribsList[AnnotAttrib.NoteText] = strikeoutArgs.Content;
|
|
|
-
|
|
|
- AddToPropertyPanel("TextAnnotProperty", "Strikeout", selectedArgs, annotAttribsList);
|
|
|
+ AddToPropertyPanel("TextAnnotProperty", "Strikeout", selectedArgs);
|
|
|
return strikeoutArgs;
|
|
|
}
|
|
|
|
|
@@ -391,7 +364,6 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
/// <returns></returns>
|
|
|
private AnnotHandlerEventArgs GetFreehand(List<AnnotHandlerEventArgs> selectedArgs = null)
|
|
|
{
|
|
|
- Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
FreehandAnnotArgs freehandArgs = null;
|
|
|
|
|
|
if (selectedArgs == null || selectedArgs.Count == 0)
|
|
@@ -421,12 +393,7 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
freehandArgs = selectedArgs[0] as FreehandAnnotArgs;
|
|
|
}
|
|
|
|
|
|
- annotAttribsList[AnnotAttrib.Color] = freehandArgs.InkColor;
|
|
|
- annotAttribsList[AnnotAttrib.Transparency] = freehandArgs.Transparency;
|
|
|
- annotAttribsList[AnnotAttrib.Thickness] = freehandArgs.LineWidth;
|
|
|
- annotAttribsList[AnnotAttrib.NoteText] = freehandArgs.Content;
|
|
|
-
|
|
|
- AddToPropertyPanel("FreehandAnnotProperty", "Freehand", selectedArgs, annotAttribsList);
|
|
|
+ AddToPropertyPanel("FreehandAnnotProperty", "Freehand", selectedArgs);
|
|
|
return freehandArgs;
|
|
|
}
|
|
|
|
|
@@ -437,7 +404,6 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
/// <returns></returns>
|
|
|
private AnnotHandlerEventArgs GetFreetext(List<AnnotHandlerEventArgs> selectedArgs = null)
|
|
|
{
|
|
|
- Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
FreeTextAnnotArgs freetextArgs = null;
|
|
|
TextAlignment textAlignment;
|
|
|
|
|
@@ -487,19 +453,7 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
textAlignment = freetextArgs.Align;
|
|
|
}
|
|
|
|
|
|
- annotAttribsList[AnnotAttrib.Color] = freetextArgs.LineColor;
|
|
|
- annotAttribsList[AnnotAttrib.FillColor] = freetextArgs.BgColor;
|
|
|
- annotAttribsList[AnnotAttrib.Thickness] = freetextArgs.LineWidth;
|
|
|
- annotAttribsList[AnnotAttrib.Transparency] = freetextArgs.Transparency;
|
|
|
- annotAttribsList[AnnotAttrib.FontColor] = freetextArgs.FontColor;
|
|
|
- annotAttribsList[AnnotAttrib.FontSize] = freetextArgs.FontSize;
|
|
|
- annotAttribsList[AnnotAttrib.FontFamily] = freetextArgs.FontFamily;
|
|
|
- annotAttribsList[AnnotAttrib.FontStyle] = freetextArgs.FontStyle;
|
|
|
- annotAttribsList[AnnotAttrib.FontWeight] = freetextArgs.FontWeight;
|
|
|
- annotAttribsList[AnnotAttrib.TextAlign] = textAlignment;
|
|
|
- annotAttribsList[AnnotAttrib.NoteText] = freetextArgs.TextContent;
|
|
|
-
|
|
|
- AddToPropertyPanel("FreetextAnnotProperty", "Freetext", selectedArgs, annotAttribsList);
|
|
|
+ AddToPropertyPanel("FreetextAnnotProperty", "Freetext", selectedArgs);
|
|
|
return freetextArgs;
|
|
|
}
|
|
|
|
|
@@ -510,7 +464,6 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
/// <returns></returns>
|
|
|
private AnnotHandlerEventArgs GetStickyNote(List<AnnotHandlerEventArgs> selectedArgs = null)
|
|
|
{
|
|
|
- Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
StickyAnnotArgs stickyAnnotArgs = new StickyAnnotArgs();
|
|
|
|
|
|
if (selectedArgs == null || selectedArgs.Count == 0)
|
|
@@ -539,16 +492,11 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
stickyAnnotArgs = selectedArgs[0] as StickyAnnotArgs;
|
|
|
}
|
|
|
|
|
|
- annotAttribsList[AnnotAttrib.Color] = stickyAnnotArgs.Color;
|
|
|
- annotAttribsList[AnnotAttrib.Transparency] = stickyAnnotArgs.Transparency;
|
|
|
- annotAttribsList[AnnotAttrib.NoteText] = stickyAnnotArgs.StickyNote;
|
|
|
- annotAttribsList[AnnotAttrib.StickyIcon] = stickyAnnotArgs.IconName;
|
|
|
-
|
|
|
List<AnnotHandlerEventArgs> stickyAnnotArgsList = new List<AnnotHandlerEventArgs>();
|
|
|
if (stickyAnnotArgs != null)
|
|
|
stickyAnnotArgsList.Add(stickyAnnotArgs);
|
|
|
|
|
|
- AddToPropertyPanel("StickyNoteProperty", "StickyNote", selectedArgs, annotAttribsList);
|
|
|
+ AddToPropertyPanel("StickyNoteProperty", "StickyNote", selectedArgs);
|
|
|
return stickyAnnotArgs;
|
|
|
}
|
|
|
|
|
@@ -559,7 +507,6 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
/// <returns></returns>
|
|
|
private AnnotHandlerEventArgs GetRect(List<AnnotHandlerEventArgs> selectedArgs = null)
|
|
|
{
|
|
|
- Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
SquareAnnotArgs squareArgs = null;
|
|
|
|
|
|
if (selectedArgs == null || selectedArgs.Count == 0)
|
|
@@ -593,14 +540,7 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
squareArgs = selectedArgs[0] as SquareAnnotArgs;
|
|
|
}
|
|
|
|
|
|
- annotAttribsList[AnnotAttrib.Color] = squareArgs.LineColor;
|
|
|
- annotAttribsList[AnnotAttrib.FillColor] = squareArgs.BgColor;
|
|
|
- annotAttribsList[AnnotAttrib.LineStyle] = squareArgs.LineDash;
|
|
|
- annotAttribsList[AnnotAttrib.Thickness] = squareArgs.LineWidth;
|
|
|
- annotAttribsList[AnnotAttrib.Transparency] = squareArgs.Transparency;
|
|
|
- annotAttribsList[AnnotAttrib.NoteText] = squareArgs.Content;
|
|
|
-
|
|
|
- AddToPropertyPanel("SharpsAnnotProperty", "Rect", selectedArgs, annotAttribsList);
|
|
|
+ AddToPropertyPanel("SharpsAnnotProperty", "Rect", selectedArgs);
|
|
|
return squareArgs;
|
|
|
}
|
|
|
|
|
@@ -611,7 +551,6 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
/// <returns></returns>
|
|
|
private AnnotHandlerEventArgs GetCircle(List<AnnotHandlerEventArgs> selectedArgs = null)
|
|
|
{
|
|
|
- Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
CircleAnnotArgs circleAnnotArgs = null;
|
|
|
|
|
|
if (selectedArgs == null || selectedArgs.Count == 0)
|
|
@@ -645,14 +584,7 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
circleAnnotArgs = selectedArgs[0] as CircleAnnotArgs;
|
|
|
}
|
|
|
|
|
|
- annotAttribsList[AnnotAttrib.Color] = circleAnnotArgs.LineColor;
|
|
|
- annotAttribsList[AnnotAttrib.FillColor] = circleAnnotArgs.BgColor;
|
|
|
- annotAttribsList[AnnotAttrib.LineStyle] = circleAnnotArgs.LineDash;
|
|
|
- annotAttribsList[AnnotAttrib.Thickness] = circleAnnotArgs.LineWidth;
|
|
|
- annotAttribsList[AnnotAttrib.Transparency] = circleAnnotArgs.Transparency;
|
|
|
- annotAttribsList[AnnotAttrib.NoteText] = circleAnnotArgs.Content;
|
|
|
-
|
|
|
- AddToPropertyPanel("SharpsAnnotProperty", "Circle", selectedArgs, annotAttribsList);
|
|
|
+ AddToPropertyPanel("SharpsAnnotProperty", "Circle", selectedArgs);
|
|
|
return circleAnnotArgs;
|
|
|
}
|
|
|
|
|
@@ -664,7 +596,6 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
/// <returns></returns>
|
|
|
private AnnotHandlerEventArgs GetArrowLine(string TagStr, List<AnnotHandlerEventArgs> selectedArgs = null)
|
|
|
{
|
|
|
- Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
LineAnnotArgs lineArgs = new LineAnnotArgs();
|
|
|
|
|
|
if (selectedArgs == null || selectedArgs.Count == 0)
|
|
@@ -704,15 +635,7 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
lineArgs = selectedArgs[0] as LineAnnotArgs;
|
|
|
}
|
|
|
|
|
|
- annotAttribsList[AnnotAttrib.Color] = lineArgs.LineColor;
|
|
|
- annotAttribsList[AnnotAttrib.LineStart] = lineArgs.HeadLineType;
|
|
|
- annotAttribsList[AnnotAttrib.LineEnd] = lineArgs.TailLineType;
|
|
|
- annotAttribsList[AnnotAttrib.LineStyle] = lineArgs.LineDash;
|
|
|
- annotAttribsList[AnnotAttrib.Thickness] = lineArgs.LineWidth;
|
|
|
- annotAttribsList[AnnotAttrib.Transparency] = lineArgs.Transparency;
|
|
|
- annotAttribsList[AnnotAttrib.NoteText] = lineArgs.Content;
|
|
|
-
|
|
|
- AddToPropertyPanel("SharpsAnnotProperty", TagStr, selectedArgs, annotAttribsList);
|
|
|
+ AddToPropertyPanel("SharpsAnnotProperty", TagStr, selectedArgs);
|
|
|
return lineArgs;
|
|
|
}
|
|
|
|
|
@@ -726,14 +649,12 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
stampAnnotArgs.Opacity = 1;
|
|
|
stampAnnotArgs.StampText = "APPROVED";
|
|
|
stampAnnotArgs.Type = StampType.STANDARD_STAMP;
|
|
|
- Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
- annotAttribsList[AnnotAttrib.Transparency] = stampAnnotArgs.Opacity;
|
|
|
|
|
|
List<AnnotHandlerEventArgs> stampAnnotArgsList = new List<AnnotHandlerEventArgs>();
|
|
|
if (stampAnnotArgs != null)
|
|
|
stampAnnotArgsList.Add(stampAnnotArgs);
|
|
|
|
|
|
- AddToPropertyPanel("StampAnnotProperty", null, stampAnnotArgsList, annotAttribsList);
|
|
|
+ AddToPropertyPanel("StampAnnotProperty", null, stampAnnotArgsList);
|
|
|
return stampAnnotArgs;
|
|
|
}
|
|
|
|
|
@@ -749,7 +670,6 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
|
|
|
private AnnotHandlerEventArgs GetImage()
|
|
|
{
|
|
|
- Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
StampAnnotArgs stampArgs = new StampAnnotArgs();
|
|
|
stampArgs.Opacity = 1;
|
|
|
stampArgs.Type = StampType.IMAGE_STAMP;
|
|
@@ -764,7 +684,7 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
if (stampArgs != null)
|
|
|
stampArgsList.Add(stampArgs);
|
|
|
|
|
|
- AddToPropertyPanel("ImageAnnotProperty", null, stampArgsList, annotAttribsList);
|
|
|
+ AddToPropertyPanel("ImageAnnotProperty", null, stampArgsList);
|
|
|
return stampArgs;
|
|
|
}
|
|
|
|