|
@@ -1037,46 +1037,58 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
var AnnotEvent = AnnotAttribEvent.GetAnnotAttribEvent(annot, annot.GetAnnotAttrib());
|
|
|
if (annot is TextHighlightAnnotArgs)
|
|
|
{
|
|
|
- AnnotEvent?.UpdateAttrib(AnnotAttrib.Color,Settings.Default.AppProperties.Annotate.HighLightColor);
|
|
|
+ var color = (annot as TextHighlightAnnotArgs).Color;
|
|
|
+ Settings.Default.AppProperties.Annotate.HighLightColor = color;
|
|
|
+ HighLightColor = new SolidColorBrush(color);
|
|
|
}
|
|
|
else if(annot is TextUnderlineAnnotArgs)
|
|
|
{
|
|
|
- AnnotEvent?.UpdateAttrib(AnnotAttrib.Color, Settings.Default.AppProperties.Annotate.UnderLineColor);
|
|
|
+ var color = (annot as TextHighlightAnnotArgs).Color;
|
|
|
+ Settings.Default.AppProperties.Annotate.UnderLineColor = color;
|
|
|
+ UnderLineColor = new SolidColorBrush(color);
|
|
|
}
|
|
|
else if (annot is TextStrikeoutAnnotArgs)
|
|
|
{
|
|
|
- AnnotEvent?.UpdateAttrib(AnnotAttrib.Color, Settings.Default.AppProperties.Annotate.StrikethroughColor);
|
|
|
+ var color = (annot as TextHighlightAnnotArgs).Color;
|
|
|
+ Settings.Default.AppProperties.Annotate.StrikethroughColor = color;
|
|
|
+ StrikeoutColor = new SolidColorBrush(color);
|
|
|
}
|
|
|
else if (annot is FreehandAnnotArgs)
|
|
|
{
|
|
|
- AnnotEvent?.UpdateAttrib(AnnotAttrib.Color, Settings.Default.AppProperties.Annotate.FreeHandColor);
|
|
|
+ var color = (annot as FreehandAnnotArgs).InkColor;
|
|
|
+ Settings.Default.AppProperties.Annotate.FreeHandColor = color;
|
|
|
+
|
|
|
}
|
|
|
else if (annot is FreeTextAnnotArgs)
|
|
|
{
|
|
|
- AnnotEvent?.UpdateAttrib(AnnotAttrib.Color, Settings.Default.AppProperties.Annotate.TextAnnoteColor);
|
|
|
- // AnnotEvent?.UpdateAttrib(AnnotAttrib.FontFamily, Settings.Default.AppProperties.Annotate.TextFontFamaily);
|
|
|
- // AnnotEvent?.UpdateAttrib(AnnotAttrib.TextAlign, Settings.Default.AppProperties.Annotate.TextAlign);
|
|
|
+ var color = (annot as FreeTextAnnotArgs).FontColor;
|
|
|
+ Settings.Default.AppProperties.Annotate.TextAnnoteColor = color;
|
|
|
}
|
|
|
else if (annot is StickyAnnotArgs)
|
|
|
{
|
|
|
- AnnotEvent?.UpdateAttrib(AnnotAttrib.Color, Settings.Default.AppProperties.Annotate.NoteAnnoteColor);
|
|
|
+ var color = (annot as StickyAnnotArgs).Color;
|
|
|
+ Settings.Default.AppProperties.Annotate.NoteAnnoteColor = color;
|
|
|
}
|
|
|
else if (annot is SquareAnnotArgs)
|
|
|
{
|
|
|
- AnnotEvent?.UpdateAttrib(AnnotAttrib.FillColor, Settings.Default.AppProperties.Annotate.RectangleFillColor);
|
|
|
- AnnotEvent?.UpdateAttrib(AnnotAttrib.Color, Settings.Default.AppProperties.Annotate.RectangleBorderColor);
|
|
|
+ var bgColor = (annot as SquareAnnotArgs).BgColor;
|
|
|
+ Settings.Default.AppProperties.Annotate.RectangleFillColor = bgColor;
|
|
|
+ var borderColor = (annot as SquareAnnotArgs).LineColor;
|
|
|
+ Settings.Default.AppProperties.Annotate.RectangleBorderColor = borderColor;
|
|
|
}
|
|
|
else if (annot is CircleAnnotArgs)
|
|
|
{
|
|
|
- AnnotEvent?.UpdateAttrib(AnnotAttrib.FillColor, Settings.Default.AppProperties.Annotate.CircleFillColor);
|
|
|
- AnnotEvent?.UpdateAttrib(AnnotAttrib.Color, Settings.Default.AppProperties.Annotate.CircleBorderColor);
|
|
|
+ var bgColor = (annot as CircleAnnotArgs).BgColor;
|
|
|
+ Settings.Default.AppProperties.Annotate.CircleFillColor = bgColor;
|
|
|
+ var borderColor = (annot as CircleAnnotArgs).LineColor;
|
|
|
+ Settings.Default.AppProperties.Annotate.CircleBorderColor = borderColor;
|
|
|
}
|
|
|
else if (annot is LineAnnotArgs)
|
|
|
{
|
|
|
- AnnotEvent?.UpdateAttrib(AnnotAttrib.Color, Settings.Default.AppProperties.Annotate.LineColor);
|
|
|
+ var color = (annot as LineAnnotArgs).LineColor;
|
|
|
+ Settings.Default.AppProperties.Annotate.LineColor = color;
|
|
|
}
|
|
|
-
|
|
|
- AnnotEvent?.UpdateAnnot();
|
|
|
+ Settings.Default.Save();
|
|
|
}
|
|
|
}
|
|
|
|