This commit is contained in:
Jonathan Jenne 2023-12-07 14:50:24 +01:00
parent b2f6076fb2
commit dbeabab832
2 changed files with 11 additions and 11 deletions

View File

@ -128,13 +128,12 @@ Partial Public Class frmEnvelopeEditor
Dim oDocument As EnvelopeDocument = DirectCast(ViewDocuments.GetFocusedRow(), EnvelopeDocument) Dim oDocument As EnvelopeDocument = DirectCast(ViewDocuments.GetFocusedRow(), EnvelopeDocument)
Dim oGDPictureKey As String = "21182889975216572111813147150675976632" Dim oGDPictureKey As String = "21182889975216572111813147150675976632"
Dim oForm As New frmFieldEditor() With { Dim oForm As New frmFieldEditor(State) With {
.Document = Controller.Envelope.Documents. .Document = Controller.Envelope.Documents.
Where(Function(d) d.Filename = oDocument.Filename). Where(Function(d) d.Filename = oDocument.Filename).
SingleOrDefault(), SingleOrDefault(),
.GDPictureKey = oGDPictureKey, .GDPictureKey = oGDPictureKey,
.Receivers = Controller.Envelope.Receivers.ToList, .Receivers = Controller.Envelope.Receivers.ToList
.State = State
} }
oForm.ShowDialog() oForm.ShowDialog()

View File

@ -10,8 +10,9 @@ Imports GdPicture14
Imports GdPicture14.Annotations Imports GdPicture14.Annotations
Partial Public Class frmFieldEditor Partial Public Class frmFieldEditor
Private LogConfig As LogConfig Private ReadOnly LogConfig As LogConfig
Private Logger As Logger Private ReadOnly Logger As Logger
Public ReadOnly Property State As State
Private GDViewer As GdViewer Private GDViewer As GdViewer
Private Manager As AnnotationManager Private Manager As AnnotationManager
@ -21,7 +22,6 @@ Partial Public Class frmFieldEditor
Public Property GDPictureKey As String = "" Public Property GDPictureKey As String = ""
Public Property Receivers As List(Of EnvelopeReceiver) Public Property Receivers As List(Of EnvelopeReceiver)
Public Property SelectedReceiver As EnvelopeReceiver = Nothing Public Property SelectedReceiver As EnvelopeReceiver = Nothing
Public Property State As State
Private UnsavedChanges As Boolean = False Private UnsavedChanges As Boolean = False
@ -29,15 +29,16 @@ Partial Public Class frmFieldEditor
Private Const SIGNATURE_WIDTH As Single = 1 Private Const SIGNATURE_WIDTH As Single = 1
Private Const SIGNATURE_HEIGHT As Single = 0.5 Private Const SIGNATURE_HEIGHT As Single = 0.5
Public Sub New() Public Sub New(pState As State)
InitializeComponent() InitializeComponent()
LogConfig = pState.LogConfig
Logger = pState.LogConfig.GetLogger()
State = pState
End Sub End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
LogConfig = New LogConfig(LogConfig.PathType.CustomPath, Application.StartupPath, CompanyName:="Digital Data", ProductName:="EnvelopeGenerator") Text = $"{State.DbConfig.ExternalProgramName} - {Resources.Envelope.Signature_Editor}"
Logger = LogConfig.GetLogger()
Me.Text = State.DbConfig.ExternalProgramName + " - Signatur-Editor"
If Document Is Nothing Then If Document Is Nothing Then
Throw New ArgumentNullException("Document") Throw New ArgumentNullException("Document")