2023-09-11 - THUMBNAILS!!!!!
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Threading.Tasks
|
||||
Imports DevExpress.XtraBars.Docking
|
||||
Imports DevExpress.XtraSplashScreen
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports EnvelopeGenerator.Common
|
||||
Imports EnvelopeGenerator.Common.My
|
||||
|
||||
Partial Public Class frmEnvelopeEditor
|
||||
Public Property Envelope As Envelope
|
||||
@@ -26,7 +25,7 @@ Partial Public Class frmEnvelopeEditor
|
||||
If oDocument IsNot Nothing Then
|
||||
Documents.Add(oDocument)
|
||||
Else
|
||||
MsgBox("Dokument konnte nicht gespeichert werden!", MsgBoxStyle.Critical, Text)
|
||||
MsgBox(Resources.Envelope.Document_Could_Not_Be_Saved, MsgBoxStyle.Critical, Text)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@@ -36,6 +35,16 @@ Partial Public Class frmEnvelopeEditor
|
||||
|
||||
If Envelope Is Nothing Then
|
||||
Controller = New EnvelopeEditorController(State)
|
||||
|
||||
' Get additional data
|
||||
Dim oDataForm As New frmEnvelopeMainData() With {.State = State}
|
||||
Dim oResult As DialogResult = oDataForm.ShowDialog()
|
||||
If oResult = DialogResult.OK Then
|
||||
Controller.Envelope.Title = oDataForm.EnvelopeTitle
|
||||
Controller.Envelope.ContractType = oDataForm.EnvelopeContractType
|
||||
Else
|
||||
Me.Close()
|
||||
End If
|
||||
Else
|
||||
Controller = New EnvelopeEditorController(State, Envelope)
|
||||
Documents = New BindingList(Of EnvelopeDocument)(Controller.Envelope.Documents)
|
||||
@@ -129,17 +138,17 @@ Partial Public Class frmEnvelopeEditor
|
||||
|
||||
Dim oErrors = oEnvelope.Validate()
|
||||
If oErrors.Any Then
|
||||
ShowValidationErrors("Fehler beim Speichern des Umschlags: ", oErrors)
|
||||
ShowValidationErrors(Resources.Envelope.Errors_when_saving_the_envelope, oErrors)
|
||||
Return False
|
||||
End If
|
||||
|
||||
If Controller.CreateEnvelopeReceivers(oEnvelope.Receivers) = False Then
|
||||
MsgBox("Fehler beim Speichern der Empfänger!", MsgBoxStyle.Critical, Text)
|
||||
MsgBox(Resources.Envelope.Error_when_saving_the_recipients, MsgBoxStyle.Critical, Text)
|
||||
Return False
|
||||
End If
|
||||
|
||||
If Controller.SaveEnvelope() = False Then
|
||||
MsgBox("Fehler beim Speichern des Umschlags!", MsgBoxStyle.Critical, Text)
|
||||
MsgBox(Resources.Envelope.Error_when_saving_the_envelope, MsgBoxStyle.Critical, Text)
|
||||
Return False
|
||||
Else
|
||||
Return True
|
||||
@@ -162,7 +171,7 @@ Partial Public Class frmEnvelopeEditor
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim oMessage = "Wollen Sie den ausgewählten Empfänger löschen?"
|
||||
Dim oMessage = Resources.Envelope.Do_you_want_to_delete_the_selected_recipient
|
||||
If Controller.ElementsExist(oReceiver.Id) Then
|
||||
oMessage = "Es gibt für diesen Empfänger bereits Elemente. Wollen Sie den Empfänger trotzdem löschen?"
|
||||
End If
|
||||
@@ -174,7 +183,7 @@ Partial Public Class frmEnvelopeEditor
|
||||
If Controller.DeleteReceiver(oReceiver) Then
|
||||
Receivers.Remove(oReceiver)
|
||||
Else
|
||||
MsgBox("Empfänger konnte nicht entfernt werden.", MsgBoxStyle.Critical, Text)
|
||||
MsgBox(Resources.Envelope.Recipient_could_not_be_deleted, MsgBoxStyle.Critical, Text)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -186,16 +195,26 @@ Partial Public Class frmEnvelopeEditor
|
||||
|
||||
Dim oErrors = Controller.ValidateEnvelopeForSending()
|
||||
If oErrors.Any() Then
|
||||
ShowValidationErrors("Fehler beim Senden des Umschlags: ", oErrors)
|
||||
ShowValidationErrors(Resources.Envelope.Error_sending_the_envelope, oErrors)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Controller.SendEnvelope() = False Then
|
||||
MsgBox("Umschlag konnte nicht gesendet werden!", MsgBoxStyle.Critical, Text)
|
||||
MsgBox(Resources.Envelope.Envelope_could_not_be_sent, MsgBoxStyle.Critical, Text)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btnCancel_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnCancel.ItemClick
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btnEditData_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnEditData.ItemClick
|
||||
Dim oForm As New frmEnvelopeMainData() With
|
||||
{
|
||||
.State = State,
|
||||
.EnvelopeTitle = Controller.Envelope.Title,
|
||||
.EnvelopeContractType = Controller.Envelope.ContractType
|
||||
}
|
||||
oForm.ShowDialog()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user