VintaSoft PDF .NET Plug-in Discussions
Questions, comments and suggestions concerning VintaSoft PDF .NET Plug-in.
Board index < VintaSoft Imaging < VintaSoft PDF .NET Plug-in Discussions
public class MyPdfAnnotationComment : Vintasoft.Imaging.Annotation.Comments.Pdf.PdfAnnotationComment
{
public MyPdfAnnotationComment(
Vintasoft.Imaging.Annotation.Comments.Pdf.PdfAnnotationCommentCollection owner,
Vintasoft.Imaging.Pdf.Tree.Annotations.PdfMarkupAnnotation source)
: base(owner, source)
{
}
bool? _isOpen;
public override bool IsOpen
{
get
{
if (_isOpen == null)
_isOpen = base.IsOpen;
return _isOpen.Value;
}
set
{
if (IsOpen != value)
{
_isOpen = value;
ObjectPropertyChangedEventArgs changedArgs = new ObjectPropertyChangedEventArgs("IsOpen", IsOpen, value);
if (Annotation != null && Annotation.PopupAnnotation != null)
Annotation.PopupAnnotation.IsOpen = value;
if (Annotation is PdfTextAnnotation)
((PdfTextAnnotation)Annotation).IsOpen = value;
OnPropertyChanged(changedArgs);
}
}
}
protected override CommentCollection CreateReplyCollection()
{
return new MyPdfAnnotationCommentCollection(this);
}
}
public class MyPdfAnnotationCommentCollection : Vintasoft.Imaging.Annotation.Comments.Pdf.PdfAnnotationCommentCollection
{
public MyPdfAnnotationCommentCollection(Vintasoft.Imaging.VintasoftImage image)
: base(image)
{
}
public MyPdfAnnotationCommentCollection(MyPdfAnnotationComment parent)
: base(parent)
{
}
protected override Vintasoft.Imaging.Annotation.Comments.Pdf.PdfAnnotationComment CreateComment(
Vintasoft.Imaging.Annotation.Comments.Pdf.PdfAnnotationCommentCollection owner,
Vintasoft.Imaging.Pdf.Tree.Annotations.PdfMarkupAnnotation source)
{
return new MyPdfAnnotationComment(owner, source);
}
}
public class MyImageCollectionPdfAnnotationCommentController : Vintasoft.Imaging.Annotation.Comments.Pdf.ImageCollectionPdfAnnotationCommentController
{
protected override Vintasoft.Imaging.Annotation.Comments.CommentCollection CreateCommentCollection(Vintasoft.Imaging.VintasoftImage image)
{
return new MyPdfAnnotationCommentCollection(image);
}
}
... ImageViewerCommentController commentController = new ImageViewerCommentController(new ImageCollectionPdfAnnotationCommentController()); ...to the following code:
... ImageViewerCommentController commentController = new ImageViewerCommentController(new MyImageCollectionPdfAnnotationCommentController()); ...