This commit is contained in:
Jonathan Jenne
2023-11-13 09:26:48 +01:00
parent 2c936c2629
commit 3874bc742d
14 changed files with 273 additions and 77 deletions

View File

@@ -19,6 +19,10 @@ Partial Public Class frmFieldEditor
Public Property SelectedReceiver As EnvelopeReceiver = Nothing
Public Property State As State
Private Const SIGNATURE_LABEL = "Signatur"
Private Const SIGNATURE_WIDTH As Single = 1
Private Const SIGNATURE_HEIGHT As Single = 0.5
Public Sub New()
InitializeComponent()
End Sub
@@ -118,7 +122,7 @@ Partial Public Class frmFieldEditor
AddHandler GDViewer.BeforeAnnotationAddedByUser, AddressOf Viewer_BeforeAnnotationAddedByUser
AddHandler GDViewer.AnnotationAddedByUser, AddressOf Viewer_AnnotationAddedByUser
GDViewer.AddStickyNoteAnnotationInteractive("SIGNATUR", Color.Black, "Arial", FontStyle.Regular, 10, 1, 0)
GDViewer.AddStickyNoteAnnotationInteractive(SIGNATURE_LABEL, Color.Black, "Arial", FontStyle.Regular, 10, 1, 0)
End If
@@ -131,8 +135,8 @@ Partial Public Class frmFieldEditor
If TypeOf oAnnotation Is AnnotationStickyNote Then
Dim oStickyNote As AnnotationStickyNote = oAnnotation
oStickyNote.Width = 1
oStickyNote.Height = 1
oStickyNote.Width = SIGNATURE_WIDTH
oStickyNote.Height = SIGNATURE_HEIGHT
oStickyNote.Tag = oTag
ApplyAnnotationStyle(oAnnotation)
@@ -213,19 +217,6 @@ Partial Public Class frmFieldEditor
Next
End Sub
Private Sub ApplyAnnotationStyle(ByRef pAnnotation As Annotation)
If TypeOf pAnnotation Is AnnotationStickyNote Then
Dim oStickyNote As AnnotationStickyNote = pAnnotation
oStickyNote.Fill = True
oStickyNote.FillColor = Color.LightGoldenrodYellow
oStickyNote.Text = "SIGNATUR"
oStickyNote.Alignment = StringAlignment.Center
oStickyNote.LineAlignment = StringAlignment.Center
End If
End Sub
Private Sub btnDelete_ItemClick(sender As Object, e As ItemClickEventArgs) Handles btnDelete.ItemClick
Dim oSelected = GDViewer.GetSelectedAnnotationIdx()
@@ -264,8 +255,9 @@ Partial Public Class frmFieldEditor
oAnnotation.Left = CSng(pElement.X)
oAnnotation.Top = CSng(pElement.Y)
oAnnotation.Fill = True
oAnnotation.FillColor = Color.DarkRed
oAnnotation.Text = "SIGNATUR"
oAnnotation.FillColor = Color.Gainsboro
oAnnotation.BorderWidth = 0.01
oAnnotation.Text = SIGNATURE_LABEL
oAnnotation.Tag = GetAnnotationTag(pReceiverId, oPage, pElement.Id)
Else
Dim oStatus = Manager.GetStat()
@@ -274,6 +266,18 @@ Partial Public Class frmFieldEditor
End If
End Sub
Private Sub ApplyAnnotationStyle(ByRef pAnnotation As Annotation)
If TypeOf pAnnotation Is AnnotationStickyNote Then
Dim oAnnotation As AnnotationStickyNote = pAnnotation
oAnnotation.Fill = True
oAnnotation.FillColor = Color.Gainsboro
oAnnotation.Text = SIGNATURE_LABEL
oAnnotation.Alignment = StringAlignment.Center
oAnnotation.LineAlignment = StringAlignment.Center
oAnnotation.BorderWidth = 0.01
End If
End Sub
Private Sub ClearAnnotations()
Dim oPageCount = GDViewer.PageCount