|
@@ -122,19 +122,29 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
/// 高亮注释
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- private AnnotHandlerEventArgs GetHighLight()
|
|
|
+ private AnnotHandlerEventArgs GetHighLight(TextHighlightAnnotArgs selectedhighlightArgs = null)
|
|
|
{
|
|
|
Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
- TextHighlightAnnotArgs highlightArgs = new TextHighlightAnnotArgs();
|
|
|
- highlightArgs.Color = Color.FromRgb(0xFF, 0xBB, 0x00);
|
|
|
- highlightArgs.Transparency = 0.5;
|
|
|
- DefaultAnnotProperty annotProperty = SettingHelper.GetAnnotDefaultProperty(AnnotArgsType.AnnotHighlight);
|
|
|
- if (annotProperty != null)
|
|
|
+ TextHighlightAnnotArgs highlightArgs = null;
|
|
|
+
|
|
|
+ if(selectedhighlightArgs == null)
|
|
|
{
|
|
|
- highlightArgs.Color = annotProperty.ForgoundColor;
|
|
|
- highlightArgs.Transparency = annotProperty.Opacity;
|
|
|
- highlightArgs.Content = annotProperty.NoteText;
|
|
|
+ highlightArgs = new TextHighlightAnnotArgs();
|
|
|
+ highlightArgs.Color = Color.FromRgb(0xFF, 0xBB, 0x00);
|
|
|
+ highlightArgs.Transparency = 0.5;
|
|
|
+ DefaultAnnotProperty annotProperty = SettingHelper.GetAnnotDefaultProperty(AnnotArgsType.AnnotHighlight);
|
|
|
+ if (annotProperty != null)
|
|
|
+ {
|
|
|
+ highlightArgs.Color = annotProperty.ForgoundColor;
|
|
|
+ highlightArgs.Transparency = annotProperty.Opacity;
|
|
|
+ highlightArgs.Content = annotProperty.NoteText;
|
|
|
+ }
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ highlightArgs = selectedhighlightArgs;
|
|
|
+ }
|
|
|
+
|
|
|
annotAttribsList[AnnotAttrib.Color] = highlightArgs.Color;
|
|
|
annotAttribsList[AnnotAttrib.Transparency] = highlightArgs.Transparency;
|
|
|
annotAttribsList[AnnotAttrib.NoteText] = string.Empty;
|
|
@@ -143,19 +153,29 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
return highlightArgs;
|
|
|
}
|
|
|
|
|
|
- private AnnotHandlerEventArgs GetUnderLine()
|
|
|
+ private AnnotHandlerEventArgs GetUnderLine(TextUnderlineAnnotArgs selectedunderlineArgs = null)
|
|
|
{
|
|
|
Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
- TextUnderlineAnnotArgs underlineArgs = new TextUnderlineAnnotArgs();
|
|
|
- underlineArgs.Color = Color.FromRgb(0x12, 0xFD, 0xFF);
|
|
|
- underlineArgs.Transparency = 1;
|
|
|
- DefaultAnnotProperty annotProperty = SettingHelper.GetAnnotDefaultProperty(AnnotArgsType.AnnotUnderline);
|
|
|
- if (annotProperty != null)
|
|
|
+ TextUnderlineAnnotArgs underlineArgs = null;
|
|
|
+
|
|
|
+ if (selectedunderlineArgs == null)
|
|
|
{
|
|
|
- underlineArgs.Color = annotProperty.ForgoundColor;
|
|
|
- underlineArgs.Transparency = annotProperty.Opacity;
|
|
|
- underlineArgs.Content = annotProperty.NoteText;
|
|
|
+ underlineArgs = new TextUnderlineAnnotArgs();
|
|
|
+ underlineArgs.Color = Color.FromRgb(0x12, 0xFD, 0xFF);
|
|
|
+ underlineArgs.Transparency = 1;
|
|
|
+ DefaultAnnotProperty annotProperty = SettingHelper.GetAnnotDefaultProperty(AnnotArgsType.AnnotUnderline);
|
|
|
+ if (annotProperty != null)
|
|
|
+ {
|
|
|
+ underlineArgs.Color = annotProperty.ForgoundColor;
|
|
|
+ underlineArgs.Transparency = annotProperty.Opacity;
|
|
|
+ underlineArgs.Content = annotProperty.NoteText;
|
|
|
+ }
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ underlineArgs = selectedunderlineArgs;
|
|
|
+ }
|
|
|
+
|
|
|
annotAttribsList[AnnotAttrib.Color] = underlineArgs.Color;
|
|
|
annotAttribsList[AnnotAttrib.Transparency] = underlineArgs.Transparency;
|
|
|
annotAttribsList[AnnotAttrib.NoteText] = string.Empty;
|
|
@@ -164,19 +184,29 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
return underlineArgs;
|
|
|
}
|
|
|
|
|
|
- private AnnotHandlerEventArgs GetSquiggly()
|
|
|
+ private AnnotHandlerEventArgs GetSquiggly(TextSquigglyAnnotArgs selectedsquigglyArgs = null)
|
|
|
{
|
|
|
Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
- TextSquigglyAnnotArgs squigglyArgs = new TextSquigglyAnnotArgs();
|
|
|
- squigglyArgs.Color = Color.FromRgb(0xFF, 0x87, 0x16);
|
|
|
- squigglyArgs.Transparency = 1;
|
|
|
- DefaultAnnotProperty annotProperty = SettingHelper.GetAnnotDefaultProperty(AnnotArgsType.AnnotSquiggly);
|
|
|
- if (annotProperty != null)
|
|
|
+ TextSquigglyAnnotArgs squigglyArgs = null;
|
|
|
+
|
|
|
+ if (selectedsquigglyArgs == null)
|
|
|
{
|
|
|
- squigglyArgs.Color = annotProperty.ForgoundColor;
|
|
|
- squigglyArgs.Transparency = annotProperty.Opacity;
|
|
|
- squigglyArgs.Content = annotProperty.NoteText;
|
|
|
+ squigglyArgs = new TextSquigglyAnnotArgs();
|
|
|
+ squigglyArgs.Color = Color.FromRgb(0xFF, 0x87, 0x16);
|
|
|
+ squigglyArgs.Transparency = 1;
|
|
|
+ DefaultAnnotProperty annotProperty = SettingHelper.GetAnnotDefaultProperty(AnnotArgsType.AnnotSquiggly);
|
|
|
+ if (annotProperty != null)
|
|
|
+ {
|
|
|
+ squigglyArgs.Color = annotProperty.ForgoundColor;
|
|
|
+ squigglyArgs.Transparency = annotProperty.Opacity;
|
|
|
+ squigglyArgs.Content = annotProperty.NoteText;
|
|
|
+ }
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ squigglyArgs = selectedsquigglyArgs;
|
|
|
+ }
|
|
|
+
|
|
|
annotAttribsList[AnnotAttrib.Color] = squigglyArgs.Color;
|
|
|
annotAttribsList[AnnotAttrib.Transparency] = squigglyArgs.Transparency;
|
|
|
annotAttribsList[AnnotAttrib.NoteText] = string.Empty;
|
|
@@ -185,19 +215,29 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
return squigglyArgs;
|
|
|
}
|
|
|
|
|
|
- private AnnotHandlerEventArgs GetStrikeout()
|
|
|
+ private AnnotHandlerEventArgs GetStrikeout(TextStrikeoutAnnotArgs selectedstrikeoutArgs = null)
|
|
|
{
|
|
|
Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
- TextStrikeoutAnnotArgs strikeoutArgs = new TextStrikeoutAnnotArgs();
|
|
|
- strikeoutArgs.Color = Color.FromRgb(0xFF, 0x3B, 0x30);
|
|
|
- strikeoutArgs.Transparency = 1;
|
|
|
- DefaultAnnotProperty annotProperty = SettingHelper.GetAnnotDefaultProperty(AnnotArgsType.AnnotStrikeout);
|
|
|
- if (annotProperty != null)
|
|
|
+ TextStrikeoutAnnotArgs strikeoutArgs = null;
|
|
|
+
|
|
|
+ if(selectedstrikeoutArgs == null)
|
|
|
{
|
|
|
- strikeoutArgs.Color = annotProperty.ForgoundColor;
|
|
|
- strikeoutArgs.Transparency = annotProperty.Opacity;
|
|
|
- strikeoutArgs.Content = annotProperty.NoteText;
|
|
|
+ strikeoutArgs = new TextStrikeoutAnnotArgs();
|
|
|
+ strikeoutArgs.Color = Color.FromRgb(0xFF, 0x3B, 0x30);
|
|
|
+ strikeoutArgs.Transparency = 1;
|
|
|
+ DefaultAnnotProperty annotProperty = SettingHelper.GetAnnotDefaultProperty(AnnotArgsType.AnnotStrikeout);
|
|
|
+ if (annotProperty != null)
|
|
|
+ {
|
|
|
+ strikeoutArgs.Color = annotProperty.ForgoundColor;
|
|
|
+ strikeoutArgs.Transparency = annotProperty.Opacity;
|
|
|
+ strikeoutArgs.Content = annotProperty.NoteText;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ strikeoutArgs = selectedstrikeoutArgs;
|
|
|
}
|
|
|
+
|
|
|
annotAttribsList[AnnotAttrib.Color] = strikeoutArgs.Color;
|
|
|
annotAttribsList[AnnotAttrib.Transparency] = strikeoutArgs.Transparency;
|
|
|
annotAttribsList[AnnotAttrib.NoteText] = string.Empty;
|
|
@@ -206,21 +246,32 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
return strikeoutArgs;
|
|
|
}
|
|
|
|
|
|
- private AnnotHandlerEventArgs GetFreehand()
|
|
|
+ private AnnotHandlerEventArgs GetFreehand(FreehandAnnotArgs selectedfreehandArgs = null)
|
|
|
{
|
|
|
Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
- FreehandAnnotArgs freehandArgs = new FreehandAnnotArgs();
|
|
|
- freehandArgs.InkColor = Color.FromRgb(0x38, 0xE0, 0x2E);
|
|
|
- freehandArgs.Transparency = 1;
|
|
|
- freehandArgs.LineWidth = 1;
|
|
|
- DefaultAnnotProperty annotProperty = SettingHelper.GetAnnotDefaultProperty(AnnotArgsType.AnnotFreehand);
|
|
|
- if (annotProperty != null)
|
|
|
+ FreehandAnnotArgs freehandArgs = null;
|
|
|
+
|
|
|
+ if(selectedfreehandArgs == null)
|
|
|
+ {
|
|
|
+ freehandArgs = new FreehandAnnotArgs();
|
|
|
+ freehandArgs.InkColor = Color.FromRgb(0x38, 0xE0, 0x2E);
|
|
|
+ freehandArgs.Transparency = 1;
|
|
|
+ freehandArgs.LineWidth = 1;
|
|
|
+ DefaultAnnotProperty annotProperty = SettingHelper.GetAnnotDefaultProperty(AnnotArgsType.AnnotFreehand);
|
|
|
+ if (annotProperty != null)
|
|
|
+ {
|
|
|
+ freehandArgs.InkColor = annotProperty.ForgoundColor;
|
|
|
+ freehandArgs.Transparency = annotProperty.Opacity;
|
|
|
+ freehandArgs.LineWidth = annotProperty.Thickness;
|
|
|
+ freehandArgs.Content = annotProperty.NoteText;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
- freehandArgs.InkColor = annotProperty.ForgoundColor;
|
|
|
- freehandArgs.Transparency = annotProperty.Opacity;
|
|
|
- freehandArgs.LineWidth = annotProperty.Thickness;
|
|
|
- freehandArgs.Content = annotProperty.NoteText;
|
|
|
+ freehandArgs = selectedfreehandArgs;
|
|
|
}
|
|
|
+
|
|
|
annotAttribsList[AnnotAttrib.Color] = freehandArgs.InkColor;
|
|
|
annotAttribsList[AnnotAttrib.Transparency] = freehandArgs.Transparency;
|
|
|
annotAttribsList[AnnotAttrib.Thickness] = freehandArgs.LineWidth;
|
|
@@ -230,43 +281,58 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
return freehandArgs;
|
|
|
}
|
|
|
|
|
|
- private AnnotHandlerEventArgs GetFreetext()
|
|
|
+ private AnnotHandlerEventArgs GetFreetext(FreeTextAnnotArgs selectedfreetextArgs = null)
|
|
|
{
|
|
|
Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
- FreeTextAnnotArgs freetextArgs = new FreeTextAnnotArgs();
|
|
|
- freetextArgs.Align = TextAlignment.Left;
|
|
|
- freetextArgs.BgColor = Colors.Transparent;
|
|
|
- freetextArgs.FontFamily = new FontFamily(Settings.Default.AppProperties.Annotate.TextFontFamaily);
|
|
|
- freetextArgs.FontColor = Colors.Black;
|
|
|
- freetextArgs.FontSize = 14;
|
|
|
- freetextArgs.Transparency = 1;
|
|
|
- freetextArgs.LineColor = Colors.Black;
|
|
|
- freetextArgs.LineWidth = 0;
|
|
|
- freetextArgs.TextContent = string.Empty;
|
|
|
-
|
|
|
- DefaultAnnotProperty annotProperty = SettingHelper.GetAnnotDefaultProperty(AnnotArgsType.AnnotFreeText);
|
|
|
- if (annotProperty != null)
|
|
|
- {
|
|
|
- freetextArgs.Align = annotProperty.TextAlign;
|
|
|
- freetextArgs.BgColor = annotProperty.BackgroundColor;
|
|
|
- freetextArgs.FontFamily = new FontFamily(annotProperty.FontFamily);
|
|
|
- freetextArgs.FontColor = annotProperty.ForgoundColor;
|
|
|
- freetextArgs.FontSize = annotProperty.FontSize;
|
|
|
- freetextArgs.Transparency = annotProperty.Opacity;
|
|
|
- freetextArgs.LineColor = annotProperty.BorderColor;
|
|
|
- freetextArgs.LineWidth = annotProperty.Thickness;
|
|
|
- freetextArgs.TextContent = annotProperty.NoteText;
|
|
|
- freetextArgs.FontWeight = annotProperty.FontWeight;
|
|
|
- freetextArgs.FontStyle = annotProperty.FontStyle;
|
|
|
- }
|
|
|
- int align = Settings.Default.AppProperties.Annotate.TextAlign;
|
|
|
+ FreeTextAnnotArgs freetextArgs = null;
|
|
|
TextAlignment textAlignment;
|
|
|
- if (align == 0)
|
|
|
- textAlignment = TextAlignment.Left;
|
|
|
- else if (align == 1)
|
|
|
- textAlignment = TextAlignment.Center;
|
|
|
+
|
|
|
+ if (selectedfreetextArgs == null)
|
|
|
+ {
|
|
|
+ freetextArgs = new FreeTextAnnotArgs();
|
|
|
+ freetextArgs.Align = TextAlignment.Left;
|
|
|
+ freetextArgs.BgColor = Colors.Transparent;
|
|
|
+ freetextArgs.FontFamily = new FontFamily(Settings.Default.AppProperties.Annotate.TextFontFamaily);
|
|
|
+ freetextArgs.FontColor = Colors.Black;
|
|
|
+ freetextArgs.FontSize = 14;
|
|
|
+ freetextArgs.Transparency = 1;
|
|
|
+ freetextArgs.LineColor = Colors.Black;
|
|
|
+ freetextArgs.LineWidth = 0;
|
|
|
+ freetextArgs.TextContent = string.Empty;
|
|
|
+
|
|
|
+ DefaultAnnotProperty annotProperty = SettingHelper.GetAnnotDefaultProperty(AnnotArgsType.AnnotFreeText);
|
|
|
+ if (annotProperty != null)
|
|
|
+ {
|
|
|
+ freetextArgs.Align = annotProperty.TextAlign;
|
|
|
+ freetextArgs.BgColor = annotProperty.BackgroundColor;
|
|
|
+ freetextArgs.FontFamily = new FontFamily(annotProperty.FontFamily);
|
|
|
+ freetextArgs.FontColor = annotProperty.ForgoundColor;
|
|
|
+ freetextArgs.FontSize = annotProperty.FontSize;
|
|
|
+ freetextArgs.Transparency = annotProperty.Opacity;
|
|
|
+ freetextArgs.LineColor = annotProperty.BorderColor;
|
|
|
+ freetextArgs.LineWidth = annotProperty.Thickness;
|
|
|
+ freetextArgs.TextContent = annotProperty.NoteText;
|
|
|
+ freetextArgs.FontWeight = annotProperty.FontWeight;
|
|
|
+ freetextArgs.FontStyle = annotProperty.FontStyle;
|
|
|
+ }
|
|
|
+
|
|
|
+ int align = Settings.Default.AppProperties.Annotate.TextAlign;
|
|
|
+
|
|
|
+ if (align == 0)
|
|
|
+ textAlignment = TextAlignment.Left;
|
|
|
+ else if (align == 1)
|
|
|
+ textAlignment = TextAlignment.Center;
|
|
|
+ else
|
|
|
+ textAlignment = TextAlignment.Right;
|
|
|
+
|
|
|
+ }
|
|
|
else
|
|
|
- textAlignment = TextAlignment.Right;
|
|
|
+ {
|
|
|
+ freetextArgs = selectedfreetextArgs;
|
|
|
+ textAlignment = freetextArgs.Align;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
annotAttribsList[AnnotAttrib.Color] = freetextArgs.LineColor;
|
|
|
annotAttribsList[AnnotAttrib.FillColor] = freetextArgs.BgColor;
|
|
|
annotAttribsList[AnnotAttrib.Thickness] = freetextArgs.LineWidth;
|
|
@@ -307,38 +373,48 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
return stickyAnnotArgs;
|
|
|
}
|
|
|
|
|
|
- private AnnotHandlerEventArgs GetRect()
|
|
|
+ private AnnotHandlerEventArgs GetRect(SquareAnnotArgs selectedsquareArgs = null)
|
|
|
{
|
|
|
Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
- SquareAnnotArgs squareArgs = new SquareAnnotArgs();
|
|
|
- squareArgs.LineColor = Colors.Red;
|
|
|
- squareArgs.BgColor = Colors.Transparent;
|
|
|
- squareArgs.LineWidth = 1;
|
|
|
- squareArgs.Transparency = 1;
|
|
|
- squareArgs.LineDash = DashStyles.Solid;
|
|
|
- squareArgs.Content = string.Empty;
|
|
|
- DefaultAnnotProperty annotProperty = SettingHelper.GetAnnotDefaultProperty(AnnotArgsType.AnnotSquare);
|
|
|
- if (annotProperty != null)
|
|
|
+ SquareAnnotArgs squareArgs = null;
|
|
|
+
|
|
|
+ if(selectedsquareArgs == null)
|
|
|
{
|
|
|
- squareArgs.LineColor = annotProperty.BorderColor;
|
|
|
- squareArgs.BgColor = annotProperty.BackgroundColor;
|
|
|
- if (annotProperty.DashArray == null || annotProperty.DashArray.Count == 0)
|
|
|
- {
|
|
|
- squareArgs.LineDash = DashStyles.Solid;
|
|
|
- }
|
|
|
- else
|
|
|
+ squareArgs = new SquareAnnotArgs();
|
|
|
+ squareArgs.LineColor = Colors.Red;
|
|
|
+ squareArgs.BgColor = Colors.Transparent;
|
|
|
+ squareArgs.LineWidth = 1;
|
|
|
+ squareArgs.Transparency = 1;
|
|
|
+ squareArgs.LineDash = DashStyles.Solid;
|
|
|
+ squareArgs.Content = string.Empty;
|
|
|
+ DefaultAnnotProperty annotProperty = SettingHelper.GetAnnotDefaultProperty(AnnotArgsType.AnnotSquare);
|
|
|
+ if (annotProperty != null)
|
|
|
{
|
|
|
- DashStyle dash = new DashStyle();
|
|
|
- foreach (var offset in annotProperty.DashArray)
|
|
|
+ squareArgs.LineColor = annotProperty.BorderColor;
|
|
|
+ squareArgs.BgColor = annotProperty.BackgroundColor;
|
|
|
+ if (annotProperty.DashArray == null || annotProperty.DashArray.Count == 0)
|
|
|
{
|
|
|
- dash.Dashes.Add(offset);
|
|
|
+ squareArgs.LineDash = DashStyles.Solid;
|
|
|
}
|
|
|
- squareArgs.LineDash = dash;
|
|
|
+ else
|
|
|
+ {
|
|
|
+ DashStyle dash = new DashStyle();
|
|
|
+ foreach (var offset in annotProperty.DashArray)
|
|
|
+ {
|
|
|
+ dash.Dashes.Add(offset);
|
|
|
+ }
|
|
|
+ squareArgs.LineDash = dash;
|
|
|
+ }
|
|
|
+ squareArgs.LineWidth = annotProperty.Thickness;
|
|
|
+ squareArgs.Transparency = annotProperty.Opacity;
|
|
|
+ squareArgs.Content = annotProperty.NoteText;
|
|
|
}
|
|
|
- squareArgs.LineWidth = annotProperty.Thickness;
|
|
|
- squareArgs.Transparency = annotProperty.Opacity;
|
|
|
- squareArgs.Content = annotProperty.NoteText;
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ squareArgs = selectedsquareArgs;
|
|
|
+ }
|
|
|
+
|
|
|
annotAttribsList[AnnotAttrib.Color] = squareArgs.LineColor;
|
|
|
annotAttribsList[AnnotAttrib.FillColor] = squareArgs.BgColor;
|
|
|
annotAttribsList[AnnotAttrib.LineStyle] = squareArgs.LineDash;
|
|
@@ -350,38 +426,48 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
return squareArgs;
|
|
|
}
|
|
|
|
|
|
- private AnnotHandlerEventArgs GetCircle()
|
|
|
+ private AnnotHandlerEventArgs GetCircle(CircleAnnotArgs selectedcircleAnnotArgs = null)
|
|
|
{
|
|
|
Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();
|
|
|
- CircleAnnotArgs circleAnnotArgs = new CircleAnnotArgs();
|
|
|
- circleAnnotArgs.LineColor = Colors.Red;
|
|
|
- circleAnnotArgs.BgColor = Colors.Transparent;
|
|
|
- circleAnnotArgs.LineWidth = 1;
|
|
|
- circleAnnotArgs.Transparency = 1;
|
|
|
- circleAnnotArgs.LineDash = DashStyles.Solid;
|
|
|
- circleAnnotArgs.Content = string.Empty;
|
|
|
- DefaultAnnotProperty annotProperty = SettingHelper.GetAnnotDefaultProperty(AnnotArgsType.AnnotCircle);
|
|
|
- if (annotProperty != null)
|
|
|
+ CircleAnnotArgs circleAnnotArgs = null;
|
|
|
+
|
|
|
+ if(selectedcircleAnnotArgs == null)
|
|
|
{
|
|
|
- circleAnnotArgs.LineColor = annotProperty.BorderColor;
|
|
|
- circleAnnotArgs.BgColor = annotProperty.BackgroundColor;
|
|
|
- if (annotProperty.DashArray == null || annotProperty.DashArray.Count == 0)
|
|
|
- {
|
|
|
- circleAnnotArgs.LineDash = DashStyles.Solid;
|
|
|
- }
|
|
|
- else
|
|
|
+ circleAnnotArgs = new CircleAnnotArgs();
|
|
|
+ circleAnnotArgs.LineColor = Colors.Red;
|
|
|
+ circleAnnotArgs.BgColor = Colors.Transparent;
|
|
|
+ circleAnnotArgs.LineWidth = 1;
|
|
|
+ circleAnnotArgs.Transparency = 1;
|
|
|
+ circleAnnotArgs.LineDash = DashStyles.Solid;
|
|
|
+ circleAnnotArgs.Content = string.Empty;
|
|
|
+ DefaultAnnotProperty annotProperty = SettingHelper.GetAnnotDefaultProperty(AnnotArgsType.AnnotCircle);
|
|
|
+ if (annotProperty != null)
|
|
|
{
|
|
|
- DashStyle dash = new DashStyle();
|
|
|
- foreach (var offset in annotProperty.DashArray)
|
|
|
+ circleAnnotArgs.LineColor = annotProperty.BorderColor;
|
|
|
+ circleAnnotArgs.BgColor = annotProperty.BackgroundColor;
|
|
|
+ if (annotProperty.DashArray == null || annotProperty.DashArray.Count == 0)
|
|
|
{
|
|
|
- dash.Dashes.Add(offset);
|
|
|
+ circleAnnotArgs.LineDash = DashStyles.Solid;
|
|
|
}
|
|
|
- circleAnnotArgs.LineDash = dash;
|
|
|
+ else
|
|
|
+ {
|
|
|
+ DashStyle dash = new DashStyle();
|
|
|
+ foreach (var offset in annotProperty.DashArray)
|
|
|
+ {
|
|
|
+ dash.Dashes.Add(offset);
|
|
|
+ }
|
|
|
+ circleAnnotArgs.LineDash = dash;
|
|
|
+ }
|
|
|
+ circleAnnotArgs.LineWidth = annotProperty.Thickness;
|
|
|
+ circleAnnotArgs.Transparency = annotProperty.Opacity;
|
|
|
+ circleAnnotArgs.Content = annotProperty.NoteText;
|
|
|
}
|
|
|
- circleAnnotArgs.LineWidth = annotProperty.Thickness;
|
|
|
- circleAnnotArgs.Transparency = annotProperty.Opacity;
|
|
|
- circleAnnotArgs.Content = annotProperty.NoteText;
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ circleAnnotArgs = selectedcircleAnnotArgs;
|
|
|
+ }
|
|
|
+
|
|
|
annotAttribsList[AnnotAttrib.Color] = circleAnnotArgs.LineColor;
|
|
|
annotAttribsList[AnnotAttrib.FillColor] = circleAnnotArgs.BgColor;
|
|
|
annotAttribsList[AnnotAttrib.LineStyle] = circleAnnotArgs.LineDash;
|