|
@@ -27,6 +27,7 @@ namespace Compdfkit_Tools.PDFControlUI
|
|
|
CPDFLineStyleControl.LineStyleChanged += CPDFLineStyleControl_LineStyleChanged;
|
|
|
|
|
|
CPDFAnnotationPreviewerControl.DrawShapePreview(GetShapeData());
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private void BorderColorPickerControl_ColorChanged(object sender, EventArgs e)
|
|
@@ -243,8 +244,7 @@ namespace Compdfkit_Tools.PDFControlUI
|
|
|
}
|
|
|
CPDFArrowControl.LineType = lineType;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
public void InitWithAnnotationType(CPDFAnnotationType annotationType)
|
|
|
{
|
|
|
currentAnnotationType = annotationType;
|
|
@@ -252,24 +252,38 @@ namespace Compdfkit_Tools.PDFControlUI
|
|
|
{
|
|
|
case CPDFAnnotationType.Square:
|
|
|
TitleTextBlock.Text = "Rectangle";
|
|
|
+ currentAnnotationType = CPDFAnnotationType.Square;
|
|
|
InitWhenRectAndRound();
|
|
|
break;
|
|
|
case CPDFAnnotationType.Circle:
|
|
|
TitleTextBlock.Text = "Circle";
|
|
|
+ currentAnnotationType = CPDFAnnotationType.Circle;
|
|
|
InitWhenRectAndRound();
|
|
|
break;
|
|
|
case CPDFAnnotationType.Arrow:
|
|
|
TitleTextBlock.Text = "Arrow";
|
|
|
+ currentAnnotationType= CPDFAnnotationType.Arrow;
|
|
|
InitWhenArrowAndLine();
|
|
|
break;
|
|
|
case CPDFAnnotationType.Line:
|
|
|
TitleTextBlock.Text = "Line";
|
|
|
+ currentAnnotationType = CPDFAnnotationType.Line;
|
|
|
InitWhenArrowAndLine();
|
|
|
break;
|
|
|
default:
|
|
|
throw new ArgumentException("Not Excepted Argument");
|
|
|
}
|
|
|
CPDFAnnotationPreviewerControl.DrawShapePreview(GetShapeData());
|
|
|
+ if (currentAnnotationType == CPDFAnnotationType.Circle || currentAnnotationType == CPDFAnnotationType.Square)
|
|
|
+ {
|
|
|
+ BorderColorPickerControl.SetCheckedForColor((GetShapeData() as CPDFShapeData).BorderColor);
|
|
|
+ FillColorPickerControl.SetCheckedForColor((GetShapeData() as CPDFShapeData).FillColor);
|
|
|
+
|
|
|
+ }
|
|
|
+ else if (currentAnnotationType == CPDFAnnotationType.Line || currentAnnotationType == CPDFAnnotationType.Arrow)
|
|
|
+ {
|
|
|
+ BorderColorPickerControl.SetCheckedForColor((GetShapeData() as CPDFLineShapeData).BorderColor);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|