Compare commits
30 Commits
4040741e6f
...
feat/posit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
186f3c3319 | ||
|
|
276adda516 | ||
|
|
ac0ae10fab | ||
|
|
3713669ec5 | ||
|
|
7f0131fc2d | ||
|
|
d9deb589d1 | ||
|
|
c961e9fffd | ||
|
|
ae31b1da0f | ||
|
|
bf5faf53bd | ||
|
|
9a74b448f2 | ||
|
|
784a834214 | ||
|
|
3c5f5cb5f5 | ||
|
|
7c57b7e332 | ||
|
|
4bf91df85f | ||
|
|
50796b22d9 | ||
|
|
2974ddb985 | ||
|
|
54f39103e1 | ||
|
|
8b505ae39a | ||
|
|
d75da655d2 | ||
|
|
e72ea534e5 | ||
|
|
e95d1d782e | ||
|
|
32be5077f9 | ||
|
|
d80fa0b023 | ||
|
|
ea6ee11a4e | ||
|
|
13a87f29d9 | ||
|
|
4e2682a75d | ||
|
|
278d56c58d | ||
|
|
9f71579c78 | ||
|
|
5f8df74b9d | ||
|
|
ebb248969c |
70
EnvelopeGenerator.Application/DTOs/MappingProfile.cs
Normal file
70
EnvelopeGenerator.Application/DTOs/MappingProfile.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
using AutoMapper;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
|
||||
using EnvelopeGenerator.Application.DTOs.Messaging;
|
||||
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||
using EnvelopeGenerator.Application.Extensions;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the AutoMapper profile configuration for mapping between
|
||||
/// domain entities and data transfer objects (DTOs) used within the EnvelopeGenerator application.
|
||||
/// </summary>
|
||||
public class MappingProfile : Profile
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MappingProfile"/> class.
|
||||
/// Configures the mappings between entities and DTOs used throughout the application.
|
||||
/// </summary>
|
||||
public MappingProfile()
|
||||
{
|
||||
// Entity to DTO mappings
|
||||
CreateMap<Config, ConfigDto>();
|
||||
CreateMap<DocumentReceiverElement, DocumentReceiverElementDto>();
|
||||
CreateMap<DocumentStatus, DocumentStatusDto>();
|
||||
CreateMap<EmailTemplate, EmailTemplateDto>();
|
||||
CreateMap<Envelope, EnvelopeDto>();
|
||||
CreateMap<EnvelopeCertificate, EnvelopeCertificateDto>();
|
||||
CreateMap<EnvelopeDocument, EnvelopeDocumentDto>();
|
||||
CreateMap<Domain.Entities.EnvelopeHistory, EnvelopeHistoryDto>();
|
||||
CreateMap<Domain.Entities.EnvelopeHistory, EnvelopeHistoryCreateDto>();
|
||||
CreateMap<Domain.Entities.EnvelopeReceiver, EnvelopeReceiverDto>();
|
||||
CreateMap<Domain.Entities.EnvelopeReceiver, EnvelopeReceiverSecretDto>();
|
||||
CreateMap<EnvelopeType, EnvelopeTypeDto>();
|
||||
CreateMap<Domain.Entities.Receiver, ReceiverReadDto>();
|
||||
CreateMap<Domain.Entities.Receiver, ReceiverCreateDto>();
|
||||
CreateMap<Domain.Entities.Receiver, ReceiverUpdateDto>();
|
||||
CreateMap<UserReceiver, UserReceiverDto>();
|
||||
CreateMap<Domain.Entities.EnvelopeReceiverReadOnly, EnvelopeReceiverReadOnlyDto>();
|
||||
|
||||
// DTO to Entity mappings
|
||||
CreateMap<ConfigDto, Config>();
|
||||
CreateMap<DocumentReceiverElementDto, DocumentReceiverElement>();
|
||||
CreateMap<DocumentStatusDto, DocumentStatus>();
|
||||
CreateMap<EmailTemplateDto, EmailTemplate>();
|
||||
CreateMap<EnvelopeDto, Envelope>();
|
||||
CreateMap<EnvelopeCertificateDto, EnvelopeCertificate>();
|
||||
CreateMap<EnvelopeDocumentDto, EnvelopeDocument>();
|
||||
CreateMap<EnvelopeHistoryDto, Domain.Entities.EnvelopeHistory>();
|
||||
CreateMap<EnvelopeHistoryCreateDto, Domain.Entities.EnvelopeHistory>();
|
||||
CreateMap<EnvelopeReceiverDto, Domain.Entities.EnvelopeReceiver>();
|
||||
CreateMap<EnvelopeTypeDto, EnvelopeType>();
|
||||
CreateMap<ReceiverReadDto, Domain.Entities.Receiver>().ForMember(rcv => rcv.EnvelopeReceivers, rcvReadDto => rcvReadDto.Ignore());
|
||||
CreateMap<ReceiverCreateDto, Domain.Entities.Receiver>();
|
||||
CreateMap<ReceiverUpdateDto, Domain.Entities.Receiver>();
|
||||
CreateMap<UserReceiverDto, UserReceiver>();
|
||||
CreateMap<EnvelopeReceiverBase, EnvelopeReceiverBasicDto>();
|
||||
CreateMap<EnvelopeReceiverReadOnlyCreateDto, Domain.Entities.EnvelopeReceiverReadOnly>();
|
||||
CreateMap<EnvelopeReceiverReadOnlyUpdateDto, Domain.Entities.EnvelopeReceiverReadOnly>();
|
||||
|
||||
// Messaging mappings
|
||||
// for GTX messaging
|
||||
CreateMap<GtxMessagingResponse, SmsResponse>()
|
||||
.ConstructUsing(gtxRes => gtxRes.Ok()
|
||||
? new SmsResponse() { Ok = true }
|
||||
: new SmsResponse() { Ok = false, Errors = gtxRes });
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
using DigitalData.UserManager.Application.MappingProfiles;
|
||||
using EnvelopeGenerator.Application.MappingProfiles;
|
||||
using EnvelopeGenerator.Application.Configurations;
|
||||
using EnvelopeGenerator.Application.Configurations;
|
||||
using EnvelopeGenerator.Application.Services;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
@@ -10,12 +8,12 @@ using QRCoder;
|
||||
using EnvelopeGenerator.Application.Contracts.Services;
|
||||
using System.Reflection;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Extensions;
|
||||
namespace EnvelopeGenerator.Application;
|
||||
|
||||
/// <summary>
|
||||
/// Extensions method for dependency injection
|
||||
/// </summary>
|
||||
public static class DIExtensions
|
||||
public static class DependencyInjection
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds all required services for envelope generator application
|
||||
@@ -43,6 +41,7 @@ public static class DIExtensions
|
||||
|
||||
//Auto mapping profiles
|
||||
services.AddAutoMapper(Assembly.GetExecutingAssembly());
|
||||
services.AddAutoMapper(typeof(DigitalData.UserManager.Application.DIExtensions));
|
||||
|
||||
services.Configure<DispatcherParams>(config.GetSection(nameof(DispatcherParams)));
|
||||
services.Configure<MailParams>(config.GetSection(nameof(MailParams)));
|
||||
@@ -1,64 +0,0 @@
|
||||
using AutoMapper;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
|
||||
using EnvelopeGenerator.Application.DTOs.Messaging;
|
||||
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||
using EnvelopeGenerator.Application.Extensions;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.MappingProfiles
|
||||
{
|
||||
public class BasicDtoMappingProfile : Profile
|
||||
{
|
||||
public BasicDtoMappingProfile()
|
||||
{
|
||||
// Entity to DTO mappings
|
||||
CreateMap<Config, ConfigDto>();
|
||||
CreateMap<DocumentReceiverElement, DocumentReceiverElementDto>();
|
||||
CreateMap<DocumentStatus, DocumentStatusDto>();
|
||||
CreateMap<EmailTemplate, EmailTemplateDto>();
|
||||
CreateMap<Envelope, EnvelopeDto>();
|
||||
CreateMap<EnvelopeCertificate, EnvelopeCertificateDto>();
|
||||
CreateMap<EnvelopeDocument, EnvelopeDocumentDto>();
|
||||
CreateMap<EnvelopeHistory, EnvelopeHistoryDto>();
|
||||
CreateMap<EnvelopeHistory, EnvelopeHistoryCreateDto>();
|
||||
CreateMap<EnvelopeReceiver, EnvelopeReceiverDto>();
|
||||
CreateMap<EnvelopeReceiver, EnvelopeReceiverSecretDto>();
|
||||
CreateMap<EnvelopeType, EnvelopeTypeDto>();
|
||||
CreateMap<Receiver, ReceiverReadDto>();
|
||||
CreateMap<Receiver, ReceiverCreateDto>();
|
||||
CreateMap<Receiver, ReceiverUpdateDto>();
|
||||
CreateMap<UserReceiver, UserReceiverDto>();
|
||||
CreateMap<EnvelopeReceiverReadOnly, EnvelopeReceiverReadOnlyDto>();
|
||||
|
||||
// DTO to Entity mappings
|
||||
CreateMap<ConfigDto, Config>();
|
||||
CreateMap<DocumentReceiverElementDto, DocumentReceiverElement>();
|
||||
CreateMap<DocumentStatusDto, DocumentStatus>();
|
||||
CreateMap<EmailTemplateDto, EmailTemplate>();
|
||||
CreateMap<EnvelopeDto, Envelope>();
|
||||
CreateMap<EnvelopeCertificateDto, EnvelopeCertificate>();
|
||||
CreateMap<EnvelopeDocumentDto, EnvelopeDocument>();
|
||||
CreateMap<EnvelopeHistoryDto, EnvelopeHistory>();
|
||||
CreateMap<EnvelopeHistoryCreateDto, EnvelopeHistory>();
|
||||
CreateMap<EnvelopeReceiverDto, EnvelopeReceiver>();
|
||||
CreateMap<EnvelopeTypeDto, EnvelopeType>();
|
||||
CreateMap<ReceiverReadDto, Receiver>().ForMember(rcv => rcv.EnvelopeReceivers, rcvReadDto => rcvReadDto.Ignore());
|
||||
CreateMap<ReceiverCreateDto, Receiver>();
|
||||
CreateMap<ReceiverUpdateDto, Receiver>();
|
||||
CreateMap<UserReceiverDto, UserReceiver>();
|
||||
CreateMap<EnvelopeReceiverBase, EnvelopeReceiverBasicDto>();
|
||||
CreateMap<EnvelopeReceiverReadOnlyCreateDto, EnvelopeReceiverReadOnly>();
|
||||
CreateMap<EnvelopeReceiverReadOnlyUpdateDto, EnvelopeReceiverReadOnly>();
|
||||
|
||||
// Messaging mappings
|
||||
// for GTX messaging
|
||||
CreateMap<GtxMessagingResponse, SmsResponse>()
|
||||
.ConstructUsing(gtxRes => gtxRes.Ok()
|
||||
? new SmsResponse() { Ok = true }
|
||||
: new SmsResponse() { Ok = false, Errors = gtxRes });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -77,6 +77,8 @@ Public Class frmFinalizePDF
|
||||
Dim oNewPath = Path.Combine(desktopPath, $"E{txtEnvelope.Text}R{txtReceiver.Text}.burned.pdf")
|
||||
|
||||
File.WriteAllBytes(oNewPath, oNewBuffer)
|
||||
|
||||
Process.Start(oNewPath)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
EnvelopeReportCreated = 1007
|
||||
EnvelopeArchived = 1008
|
||||
EnvelopeDeleted = 1009
|
||||
EnvelopeRejected = 10007
|
||||
EnvelopeWithdrawn = 10009
|
||||
AccessCodeRequested = 2001
|
||||
AccessCodeCorrect = 2002
|
||||
AccessCodeIncorrect = 2003
|
||||
@@ -28,6 +30,7 @@
|
||||
MessageConfirmationSent = 3003
|
||||
MessageDeletionSent = 3004
|
||||
MessageCompletionSent = 3005
|
||||
DocumentMod_Rotation = 4001
|
||||
End Enum
|
||||
|
||||
'TODO: standardize in xwiki
|
||||
|
||||
@@ -170,7 +170,7 @@ Namespace Jobs
|
||||
Throw New ApplicationException("Envelope could not be finalized")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Warn($"Unhandled exception while working envelope [{oId}] - [{ex.Message}]")
|
||||
Logger.Warn(ex, $"Unhandled exception while working envelope [{oId}]")
|
||||
End Try
|
||||
|
||||
|
||||
@@ -378,12 +378,10 @@ Namespace Jobs
|
||||
Try
|
||||
oInputDocumentBuffer = File.ReadAllBytes(oInputPath)
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Throw New BurnAnnotationException("Source document could not be read from disk!", ex)
|
||||
End Try
|
||||
End If
|
||||
|
||||
|
||||
Return PDFBurner.BurnInstantJSONAnnotationsToPDF(oInputDocumentBuffer, oAnnotations)
|
||||
End Function
|
||||
|
||||
|
||||
@@ -31,45 +31,38 @@ Namespace Jobs.FinalizeDocument
|
||||
|
||||
Public Function BurnInstantJSONAnnotationsToPDF(pSourceBuffer As Byte(), pInstantJSONList As List(Of String)) As Byte()
|
||||
Dim oResult As GdPictureStatus
|
||||
Using oSourceStream As New MemoryStream(pSourceBuffer)
|
||||
' Open PDF
|
||||
oResult = Manager.InitFromStream(oSourceStream)
|
||||
If oResult <> GdPictureStatus.OK Then
|
||||
Throw New BurnAnnotationException($"Could not open document for burning: [{oResult}]")
|
||||
End If
|
||||
|
||||
Try
|
||||
Using oSourceStream As New MemoryStream(pSourceBuffer)
|
||||
' Open PDF
|
||||
oResult = Manager.InitFromStream(oSourceStream)
|
||||
' Add annotation to PDF
|
||||
For Each oJSON In pInstantJSONList
|
||||
If AddInstantJSONAnnotationToPDF(oJSON) = False Then
|
||||
Logger.Warn($"Error in AddInstantJSONAnnotationToPDF - oJson: ")
|
||||
Logger.Warn(oJSON)
|
||||
Throw New BurnAnnotationException($"Adding Annotation failed")
|
||||
End If
|
||||
Next
|
||||
oResult = Manager.BurnAnnotationsToPage(RemoveInitialAnnots:=True, VectorMode:=True)
|
||||
If oResult <> GdPictureStatus.OK Then
|
||||
Throw New BurnAnnotationException($"Could not burn annotations to file: [{oResult}]")
|
||||
End If
|
||||
|
||||
'Save PDF
|
||||
Using oNewStream As New MemoryStream()
|
||||
oResult = Manager.SaveDocumentToPDF(oNewStream)
|
||||
If oResult <> GdPictureStatus.OK Then
|
||||
Throw New BurnAnnotationException($"Could not open document for burning: [{oResult}]")
|
||||
Throw New BurnAnnotationException($"Could not save document to stream: [{oResult}]")
|
||||
End If
|
||||
|
||||
' Add annotation to PDF
|
||||
For Each oJSON In pInstantJSONList
|
||||
If AddInstantJSONAnnotationToPDF(oJSON) = False Then
|
||||
Logger.Warn($"Error in AddInstantJSONAnnotationToPDF - oJson: ")
|
||||
Logger.Warn(oJSON)
|
||||
Throw New BurnAnnotationException($"Adding Annotation failed")
|
||||
End If
|
||||
Next
|
||||
oResult = Manager.BurnAnnotationsToPage(RemoveInitialAnnots:=True, VectorMode:=True)
|
||||
If oResult <> GdPictureStatus.OK Then
|
||||
Throw New BurnAnnotationException($"Could not burn annotations to file: [{oResult}]")
|
||||
End If
|
||||
Manager.Close()
|
||||
|
||||
'Save PDF
|
||||
Using oNewStream As New MemoryStream()
|
||||
oResult = Manager.SaveDocumentToPDF(oNewStream)
|
||||
If oResult <> GdPictureStatus.OK Then
|
||||
Throw New BurnAnnotationException($"Could not save document to stream: [{oResult}]")
|
||||
End If
|
||||
|
||||
Manager.Close()
|
||||
|
||||
Return oNewStream.ToArray()
|
||||
End Using
|
||||
Return oNewStream.ToArray()
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
|
||||
Return Nothing
|
||||
End Try
|
||||
End Using
|
||||
End Function
|
||||
|
||||
Private Function AddInstantJSONAnnotationToPDF(pInstantJSON As String) As Boolean
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Imports DevExpress.DataAccess.Native.Web
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports EnvelopeGenerator.Common.My.Resources
|
||||
|
||||
Public Class ActionService
|
||||
@@ -34,6 +35,12 @@ Public Class ActionService
|
||||
|
||||
Return True
|
||||
End Function
|
||||
Public Function SetStatusDocumentRotationChanged(pEnvelope As Envelope) As Boolean
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.DocumentMod_Rotation, pEnvelope.User.Email) = False Then
|
||||
Return False
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
Public Function Resend_Receiver(pEnvelope As Envelope, pmail As String) As Boolean
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.EnvelopeQueued, pEnvelope.User.Email) = False Then
|
||||
Return False
|
||||
@@ -50,7 +57,13 @@ Public Class ActionService
|
||||
|
||||
|
||||
Public Function DeleteEnvelope(pEnvelope As Envelope, pReason As String) As Boolean
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.EnvelopeDeleted, pEnvelope.User.Email) = False Then
|
||||
Dim oStatus As EnvelopeStatus
|
||||
If pEnvelope.IsAlreadySent Then
|
||||
oStatus = Constants.EnvelopeStatus.EnvelopeWithdrawn
|
||||
Else
|
||||
oStatus = Constants.EnvelopeStatus.EnvelopeDeleted
|
||||
End If
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, oStatus, pEnvelope.User.Email) = False Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
<value>Please select the PDF documents you would like to link/concat:</value>
|
||||
</data>
|
||||
<data name="Do you really want to delete this envelope" xml:space="preserve">
|
||||
<value>Do you really want to delete this envelope?</value>
|
||||
<value>Do you really want to withdraw/delete this envelope?</value>
|
||||
</data>
|
||||
<data name="Do you really want to remove this document" xml:space="preserve">
|
||||
<value>Do you really want to remove this document?</value>
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
<value>Bitte wählen Sie die PDF-Dokumente die Sie verketten möchten:</value>
|
||||
</data>
|
||||
<data name="Do you really want to delete this envelope" xml:space="preserve">
|
||||
<value>Wollen Sie diesen Umschlag wirklich löschen?</value>
|
||||
<value>Wollen Sie diesen Umschlag wirklich zurückrufen/löschen?</value>
|
||||
</data>
|
||||
<data name="Do you really want to remove this document" xml:space="preserve">
|
||||
<value>Wollen Sie dieses Dokument wirklich entfernen?</value>
|
||||
|
||||
@@ -74,7 +74,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Wollen Sie diesen Umschlag wirklich löschen? ähnelt.
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Wollen Sie diesen Umschlag wirklich zurückrufen/löschen? ähnelt.
|
||||
'''</summary>
|
||||
Public Shared ReadOnly Property Do_you_really_want_to_delete_this_envelope() As String
|
||||
Get
|
||||
|
||||
36
EnvelopeGenerator.Common/Strings/Model.Designer.vb
generated
36
EnvelopeGenerator.Common/Strings/Model.Designer.vb
generated
@@ -136,6 +136,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Dokument Rotation geändert ähnelt.
|
||||
'''</summary>
|
||||
Public Shared ReadOnly Property DocumentMod_Rotation() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("DocumentMod_Rotation", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Dokument geöffnet ähnelt.
|
||||
'''</summary>
|
||||
@@ -145,6 +154,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Unterzeichnung abgelehnt ähnelt.
|
||||
'''</summary>
|
||||
Public Shared ReadOnly Property DocumentRejected() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("DocumentRejected", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Dokument unterzeichnet ähnelt.
|
||||
'''</summary>
|
||||
@@ -217,6 +235,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Umschlag abgelehnt ähnelt.
|
||||
'''</summary>
|
||||
Public Shared ReadOnly Property EnvelopeRejected() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("EnvelopeRejected", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Signierungszertifikat erstellt ähnelt.
|
||||
'''</summary>
|
||||
@@ -244,6 +271,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Umschlag zurückgezogen ähnelt.
|
||||
'''</summary>
|
||||
Public Shared ReadOnly Property EnvelopeWithdrawn() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("EnvelopeWithdrawn", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Zugriffscode versendet ähnelt.
|
||||
'''</summary>
|
||||
|
||||
@@ -138,9 +138,15 @@
|
||||
<data name="Created" xml:space="preserve">
|
||||
<value>Created</value>
|
||||
</data>
|
||||
<data name="DocumentMod_Rotation" xml:space="preserve">
|
||||
<value>Document rotation adapted</value>
|
||||
</data>
|
||||
<data name="DocumentOpened" xml:space="preserve">
|
||||
<value>Document opened</value>
|
||||
</data>
|
||||
<data name="DocumentRejected" xml:space="preserve">
|
||||
<value>Signing rejected</value>
|
||||
</data>
|
||||
<data name="DocumentSigned" xml:space="preserve">
|
||||
<value>Document signed</value>
|
||||
</data>
|
||||
@@ -154,16 +160,19 @@
|
||||
<value>Completely signed</value>
|
||||
</data>
|
||||
<data name="EnvelopeCreated" xml:space="preserve">
|
||||
<value>Created</value>
|
||||
<value>Envelope Created</value>
|
||||
</data>
|
||||
<data name="EnvelopeDeleted" xml:space="preserve">
|
||||
<value>Deleted</value>
|
||||
<value>Envelope Deleted</value>
|
||||
</data>
|
||||
<data name="EnvelopePartlySigned" xml:space="preserve">
|
||||
<value>Partly signed</value>
|
||||
</data>
|
||||
<data name="EnvelopeQueued" xml:space="preserve">
|
||||
<value>Queued</value>
|
||||
<value>Envelope Queued</value>
|
||||
</data>
|
||||
<data name="EnvelopeRejected" xml:space="preserve">
|
||||
<value>Envelope Rejected</value>
|
||||
</data>
|
||||
<data name="EnvelopeReportCreated" xml:space="preserve">
|
||||
<value>Signature certificate created</value>
|
||||
@@ -174,6 +183,9 @@
|
||||
<data name="EnvelopeSent" xml:space="preserve">
|
||||
<value>Sent</value>
|
||||
</data>
|
||||
<data name="EnvelopeWithdrawn" xml:space="preserve">
|
||||
<value>Withdrawn</value>
|
||||
</data>
|
||||
<data name="MessageAccessCodeSent" xml:space="preserve">
|
||||
<value>Accesscode sent</value>
|
||||
</data>
|
||||
|
||||
@@ -141,9 +141,15 @@
|
||||
<data name="Created" xml:space="preserve">
|
||||
<value>Erstellt</value>
|
||||
</data>
|
||||
<data name="DocumentMod_Rotation" xml:space="preserve">
|
||||
<value>Dokument Rotation geändert</value>
|
||||
</data>
|
||||
<data name="DocumentOpened" xml:space="preserve">
|
||||
<value>Dokument geöffnet</value>
|
||||
</data>
|
||||
<data name="DocumentRejected" xml:space="preserve">
|
||||
<value>Unterzeichnung abgelehnt</value>
|
||||
</data>
|
||||
<data name="DocumentSigned" xml:space="preserve">
|
||||
<value>Dokument unterzeichnet</value>
|
||||
</data>
|
||||
@@ -168,6 +174,9 @@
|
||||
<data name="EnvelopeQueued" xml:space="preserve">
|
||||
<value>Umschlag in Queue</value>
|
||||
</data>
|
||||
<data name="EnvelopeRejected" xml:space="preserve">
|
||||
<value>Umschlag abgelehnt</value>
|
||||
</data>
|
||||
<data name="EnvelopeReportCreated" xml:space="preserve">
|
||||
<value>Signierungszertifikat erstellt</value>
|
||||
</data>
|
||||
@@ -177,6 +186,9 @@
|
||||
<data name="EnvelopeSent" xml:space="preserve">
|
||||
<value>Gesendet</value>
|
||||
</data>
|
||||
<data name="EnvelopeWithdrawn" xml:space="preserve">
|
||||
<value>Umschlag zurückgezogen</value>
|
||||
</data>
|
||||
<data name="MessageAccessCodeSent" xml:space="preserve">
|
||||
<value>Zugriffscode versendet</value>
|
||||
</data>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.IO
|
||||
Imports DevExpress.XtraBars.Docking
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports EnvelopeGenerator.Common
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports EnvelopeGenerator.Common.My
|
||||
Imports GdPicture14
|
||||
|
||||
Public Class EnvelopeEditorController
|
||||
Inherits BaseController
|
||||
@@ -38,6 +40,9 @@ Public Class EnvelopeEditorController
|
||||
Public Function SendEnvelope() As Boolean
|
||||
Return ActionService.SendEnvelope(Envelope)
|
||||
End Function
|
||||
Public Function DocumentRotationChanged() As Boolean
|
||||
Return ActionService.SetStatusDocumentRotationChanged(Envelope)
|
||||
End Function
|
||||
Public Function ResendReceiverInvitation(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
||||
Return ActionService.ResendReceiver(pEnvelope, pReceiver)
|
||||
End Function
|
||||
@@ -158,8 +163,10 @@ Public Class EnvelopeEditorController
|
||||
Try
|
||||
Dim oFixedPath = FixPageRotation.FixPageRotation(pDocumentFilePath)
|
||||
If oFixedPath <> pDocumentFilePath Then
|
||||
DocumentRotationChanged()
|
||||
Logger.Info("PageRotation has been reseted to 0.")
|
||||
End If
|
||||
oFixedPath = FlattenFormFields.FlattenFormFields(oFixedPath)
|
||||
Dim oFileInfo = New FileInfo(oFixedPath)
|
||||
Dim oTempFiles As New TempFiles(State.LogConfig)
|
||||
Dim oTempFilePath = Path.Combine(oTempFiles._TempPath, Guid.NewGuid().ToString + oFileInfo.Extension)
|
||||
|
||||
@@ -369,6 +369,7 @@
|
||||
</Compile>
|
||||
<Compile Include="Helper\Encryption.vb" />
|
||||
<Compile Include="Helper\FixPageRotation.vb" />
|
||||
<Compile Include="Helper\FlattenFormFields.vb" />
|
||||
<Compile Include="Helper\RefreshHelper.vb" />
|
||||
<Compile Include="Helper\TempFiles.vb" />
|
||||
<Compile Include="Helper\Thumbnail.vb" />
|
||||
|
||||
32
EnvelopeGenerator.Form/Helper/FlattenFormFields.vb
Normal file
32
EnvelopeGenerator.Form/Helper/FlattenFormFields.vb
Normal file
@@ -0,0 +1,32 @@
|
||||
Imports System.IO
|
||||
Imports GdPicture14
|
||||
|
||||
Public Class FlattenFormFields
|
||||
|
||||
Public Shared Function FlattenFormFields(pFilePath As String) As String
|
||||
|
||||
Dim oFolder As String = Path.GetDirectoryName(pFilePath)
|
||||
|
||||
Dim gdpicturePdf As GdPicturePDF = New GdPicturePDF()
|
||||
|
||||
Dim status As GdPictureStatus = gdpicturePdf.LoadFromFile(pFilePath, True)
|
||||
If status = GdPictureStatus.OK Then
|
||||
|
||||
Dim oFormFieldsCount = gdpicturePdf.GetFormFieldsCount()
|
||||
If oFormFieldsCount > 0 Then
|
||||
gdpicturePdf.FlattenFormFields()
|
||||
|
||||
Dim newFilesPath As String = Path.Combine(oFolder, "InputFieldsFlattend_" & Path.GetFileName(pFilePath))
|
||||
If gdpicturePdf.SaveToFile(newFilesPath) = GdPictureStatus.OK Then
|
||||
Return newFilesPath
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Return pFilePath
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -16,10 +16,14 @@ Module ModuleSettings
|
||||
Public SQL_REP_ENV_USER_TM As String = ""
|
||||
Public SQL_REP_ENV_USER_Y As String = ""
|
||||
Public SQL_REP_ENV_USER_ALL As String = ""
|
||||
Public SQL_REP_ENV_ALL_USER_MONTH As String = ""
|
||||
Public SQL_REP_ENV_ALL_USER_LAST_MONTH As String = ""
|
||||
Public DT_CHARTS As DataTable
|
||||
Public MyLogger As Logger
|
||||
Public USER_GHOST_MODE_USRNAME As String = ""
|
||||
Public USER_GHOST_MODE_ACTIVE As Boolean = False
|
||||
Public MyUserModel As UserModel
|
||||
Public MyState As State
|
||||
Public CurrentEnvelopID As Integer = 0
|
||||
Public CurrentEnvelopetitle As String = ""
|
||||
End Module
|
||||
|
||||
@@ -632,6 +632,7 @@ Partial Public Class frmEnvelopeEditor
|
||||
resources.ApplyResources(Me.txtMessage, "txtMessage")
|
||||
Me.txtMessage.MenuManager = Me.RibbonControl1
|
||||
Me.txtMessage.Name = "txtMessage"
|
||||
Me.txtMessage.Properties.AcceptsTab = True
|
||||
Me.txtMessage.Properties.Appearance.Font = CType(resources.GetObject("txtMessage.Properties.Appearance.Font"), System.Drawing.Font)
|
||||
Me.txtMessage.Properties.Appearance.Options.UseFont = True
|
||||
Me.txtMessage.StyleController = Me.LayoutControl1
|
||||
@@ -664,7 +665,7 @@ Partial Public Class frmEnvelopeEditor
|
||||
Me.LayoutControlItem3.Size = New System.Drawing.Size(873, 216)
|
||||
resources.ApplyResources(Me.LayoutControlItem3, "LayoutControlItem3")
|
||||
Me.LayoutControlItem3.TextLocation = DevExpress.Utils.Locations.Top
|
||||
Me.LayoutControlItem3.TextSize = New System.Drawing.Size(49, 13)
|
||||
Me.LayoutControlItem3.TextSize = New System.Drawing.Size(46, 13)
|
||||
'
|
||||
'FrmEditorBindingSource
|
||||
'
|
||||
|
||||
@@ -939,7 +939,7 @@
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="FrmEditorBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>792, 17</value>
|
||||
<value>17, 54</value>
|
||||
</metadata>
|
||||
<metadata name="EnvelopeDocumentBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>557, 17</value>
|
||||
|
||||
74
EnvelopeGenerator.Form/frmMain.Designer.vb
generated
74
EnvelopeGenerator.Form/frmMain.Designer.vb
generated
@@ -61,9 +61,10 @@ Partial Class frmMain
|
||||
Me.bsitmInfo = New DevExpress.XtraBars.BarStaticItem()
|
||||
Me.bbtnitmEB = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.bbtnitmInfoMail = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.bbtnitm_ResendInvitation = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.BarButtonItem4 = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.BarStaticItemGhost = New DevExpress.XtraBars.BarStaticItem()
|
||||
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||
Me.RibbonPageEnvelopeActions = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
@@ -93,8 +94,8 @@ Partial Class frmMain
|
||||
Me.GridViewData = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||
Me.PanelControl1 = New DevExpress.XtraEditors.PanelControl()
|
||||
Me.GroupControl2 = New DevExpress.XtraEditors.GroupControl()
|
||||
Me.LabelControl1 = New DevExpress.XtraEditors.LabelControl()
|
||||
Me.GroupControl1 = New DevExpress.XtraEditors.GroupControl()
|
||||
Me.btnEvvallUs_thismonth = New DevExpress.XtraEditors.SimpleButton()
|
||||
Me.btnEnvelopes_All = New DevExpress.XtraEditors.SimpleButton()
|
||||
Me.btnEnvelopes_thisYear = New DevExpress.XtraEditors.SimpleButton()
|
||||
Me.btnEnvelopes_lastmonth = New DevExpress.XtraEditors.SimpleButton()
|
||||
@@ -102,7 +103,7 @@ Partial Class frmMain
|
||||
Me.RefreshTimer = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog()
|
||||
Me.XtraSaveFileDialog1 = New DevExpress.XtraEditors.XtraSaveFileDialog(Me.components)
|
||||
Me.BarStaticItemGhost = New DevExpress.XtraBars.BarStaticItem()
|
||||
Me.btnEvvallUs_lastmonth = New DevExpress.XtraEditors.SimpleButton()
|
||||
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.SplitContainerControl1.Panel1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainerControl1.Panel1.SuspendLayout()
|
||||
@@ -322,7 +323,7 @@ Partial Class frmMain
|
||||
Me.RibbonControl.ExpandCollapseItem.Id = 0
|
||||
Me.RibbonControl.ExpandCollapseItem.ImageOptions.ImageIndex = CType(resources.GetObject("RibbonControl.ExpandCollapseItem.ImageOptions.ImageIndex"), Integer)
|
||||
Me.RibbonControl.ExpandCollapseItem.ImageOptions.LargeImageIndex = CType(resources.GetObject("RibbonControl.ExpandCollapseItem.ImageOptions.LargeImageIndex"), Integer)
|
||||
Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.RibbonControl.SearchEditItem, Me.btnCreateEnvelope, Me.btnEditEnvelope, Me.btnDeleteEnvelope, Me.BarButtonItem1, Me.txtRefreshLabel, Me.btnShowDocument, Me.btnContactReceiver, Me.txtEnvelopeIdLabel, Me.btnOpenLogDirectory, Me.BarCheckItem1, Me.bsitmInfo, Me.bbtnitmEB, Me.bbtnitmInfoMail, Me.BarButtonItem2, Me.BarButtonItem3, Me.BarButtonItem4, Me.BarStaticItemGhost})
|
||||
Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.RibbonControl.SearchEditItem, Me.btnCreateEnvelope, Me.btnEditEnvelope, Me.btnDeleteEnvelope, Me.BarButtonItem1, Me.txtRefreshLabel, Me.btnShowDocument, Me.btnContactReceiver, Me.txtEnvelopeIdLabel, Me.btnOpenLogDirectory, Me.BarCheckItem1, Me.bsitmInfo, Me.bbtnitmEB, Me.bbtnitmInfoMail, Me.bbtnitm_ResendInvitation, Me.BarButtonItem3, Me.BarButtonItem4, Me.BarStaticItemGhost})
|
||||
resources.ApplyResources(Me.RibbonControl, "RibbonControl")
|
||||
Me.RibbonControl.MaxItemId = 20
|
||||
Me.RibbonControl.Name = "RibbonControl"
|
||||
@@ -446,13 +447,14 @@ Partial Class frmMain
|
||||
Me.bbtnitmInfoMail.Id = 15
|
||||
Me.bbtnitmInfoMail.ImageOptions.SvgImage = CType(resources.GetObject("bbtnitmInfoMail.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||
Me.bbtnitmInfoMail.Name = "bbtnitmInfoMail"
|
||||
Me.bbtnitmInfoMail.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
'
|
||||
'BarButtonItem2
|
||||
'bbtnitm_ResendInvitation
|
||||
'
|
||||
resources.ApplyResources(Me.BarButtonItem2, "BarButtonItem2")
|
||||
Me.BarButtonItem2.Id = 16
|
||||
Me.BarButtonItem2.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem2.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||
Me.BarButtonItem2.Name = "BarButtonItem2"
|
||||
resources.ApplyResources(Me.bbtnitm_ResendInvitation, "bbtnitm_ResendInvitation")
|
||||
Me.bbtnitm_ResendInvitation.Id = 16
|
||||
Me.bbtnitm_ResendInvitation.ImageOptions.SvgImage = CType(resources.GetObject("bbtnitm_ResendInvitation.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||
Me.bbtnitm_ResendInvitation.Name = "bbtnitm_ResendInvitation"
|
||||
'
|
||||
'BarButtonItem3
|
||||
'
|
||||
@@ -468,6 +470,19 @@ Partial Class frmMain
|
||||
Me.BarButtonItem4.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem4.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||
Me.BarButtonItem4.Name = "BarButtonItem4"
|
||||
'
|
||||
'BarStaticItemGhost
|
||||
'
|
||||
resources.ApplyResources(Me.BarStaticItemGhost, "BarStaticItemGhost")
|
||||
Me.BarStaticItemGhost.Id = 19
|
||||
Me.BarStaticItemGhost.ItemAppearance.Normal.BackColor = System.Drawing.Color.Yellow
|
||||
Me.BarStaticItemGhost.ItemAppearance.Normal.Font = CType(resources.GetObject("BarStaticItemGhost.ItemAppearance.Normal.Font"), System.Drawing.Font)
|
||||
Me.BarStaticItemGhost.ItemAppearance.Normal.ForeColor = System.Drawing.Color.Black
|
||||
Me.BarStaticItemGhost.ItemAppearance.Normal.Options.UseBackColor = True
|
||||
Me.BarStaticItemGhost.ItemAppearance.Normal.Options.UseFont = True
|
||||
Me.BarStaticItemGhost.ItemAppearance.Normal.Options.UseForeColor = True
|
||||
Me.BarStaticItemGhost.Name = "BarStaticItemGhost"
|
||||
Me.BarStaticItemGhost.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
'
|
||||
'RibbonPage1
|
||||
'
|
||||
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageEnvelopeActions, Me.RibbonPageGroup1, Me.RibbonPageGroupFunctions})
|
||||
@@ -493,7 +508,7 @@ Partial Class frmMain
|
||||
'RibbonPageGroupFunctions
|
||||
'
|
||||
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.btnShowDocument)
|
||||
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.BarButtonItem2)
|
||||
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.bbtnitm_ResendInvitation)
|
||||
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.btnContactReceiver)
|
||||
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.bbtnitmEB)
|
||||
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.bbtnitmInfoMail)
|
||||
@@ -673,7 +688,7 @@ Partial Class frmMain
|
||||
'SplitContainerControl2.Panel2
|
||||
'
|
||||
resources.ApplyResources(Me.SplitContainerControl2.Panel2, "SplitContainerControl2.Panel2")
|
||||
Me.SplitContainerControl2.SplitterPosition = 584
|
||||
Me.SplitContainerControl2.SplitterPosition = 819
|
||||
'
|
||||
'GridControlData
|
||||
'
|
||||
@@ -697,15 +712,11 @@ Partial Class frmMain
|
||||
'
|
||||
'GroupControl2
|
||||
'
|
||||
Me.GroupControl2.Controls.Add(Me.LabelControl1)
|
||||
Me.GroupControl2.Controls.Add(Me.btnEvvallUs_lastmonth)
|
||||
Me.GroupControl2.Controls.Add(Me.btnEvvallUs_thismonth)
|
||||
resources.ApplyResources(Me.GroupControl2, "GroupControl2")
|
||||
Me.GroupControl2.Name = "GroupControl2"
|
||||
'
|
||||
'LabelControl1
|
||||
'
|
||||
resources.ApplyResources(Me.LabelControl1, "LabelControl1")
|
||||
Me.LabelControl1.Name = "LabelControl1"
|
||||
'
|
||||
'GroupControl1
|
||||
'
|
||||
Me.GroupControl1.Controls.Add(Me.btnEnvelopes_All)
|
||||
@@ -715,6 +726,13 @@ Partial Class frmMain
|
||||
resources.ApplyResources(Me.GroupControl1, "GroupControl1")
|
||||
Me.GroupControl1.Name = "GroupControl1"
|
||||
'
|
||||
'btnEvvallUs_thismonth
|
||||
'
|
||||
Me.btnEvvallUs_thismonth.Appearance.BackColor = System.Drawing.Color.MediumSlateBlue
|
||||
Me.btnEvvallUs_thismonth.Appearance.Options.UseBackColor = True
|
||||
resources.ApplyResources(Me.btnEvvallUs_thismonth, "btnEvvallUs_thismonth")
|
||||
Me.btnEvvallUs_thismonth.Name = "btnEvvallUs_thismonth"
|
||||
'
|
||||
'btnEnvelopes_All
|
||||
'
|
||||
Me.btnEnvelopes_All.Appearance.BackColor = System.Drawing.Color.MediumTurquoise
|
||||
@@ -755,18 +773,12 @@ Partial Class frmMain
|
||||
'
|
||||
Me.XtraSaveFileDialog1.FileName = "XtraSaveFileDialog1"
|
||||
'
|
||||
'BarStaticItemGhost
|
||||
'btnEvvallUs_lastmonth
|
||||
'
|
||||
resources.ApplyResources(Me.BarStaticItemGhost, "BarStaticItemGhost")
|
||||
Me.BarStaticItemGhost.Id = 19
|
||||
Me.BarStaticItemGhost.ItemAppearance.Normal.BackColor = System.Drawing.Color.Yellow
|
||||
Me.BarStaticItemGhost.ItemAppearance.Normal.Font = CType(resources.GetObject("BarStaticItemGhost.ItemAppearance.Normal.Font"), System.Drawing.Font)
|
||||
Me.BarStaticItemGhost.ItemAppearance.Normal.ForeColor = System.Drawing.Color.Black
|
||||
Me.BarStaticItemGhost.ItemAppearance.Normal.Options.UseBackColor = True
|
||||
Me.BarStaticItemGhost.ItemAppearance.Normal.Options.UseFont = True
|
||||
Me.BarStaticItemGhost.ItemAppearance.Normal.Options.UseForeColor = True
|
||||
Me.BarStaticItemGhost.Name = "BarStaticItemGhost"
|
||||
Me.BarStaticItemGhost.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
Me.btnEvvallUs_lastmonth.Appearance.BackColor = System.Drawing.Color.MediumPurple
|
||||
Me.btnEvvallUs_lastmonth.Appearance.Options.UseBackColor = True
|
||||
resources.ApplyResources(Me.btnEvvallUs_lastmonth, "btnEvvallUs_lastmonth")
|
||||
Me.btnEvvallUs_lastmonth.Name = "btnEvvallUs_lastmonth"
|
||||
'
|
||||
'frmMain
|
||||
'
|
||||
@@ -809,7 +821,6 @@ Partial Class frmMain
|
||||
Me.PanelControl1.ResumeLayout(False)
|
||||
CType(Me.GroupControl2, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.GroupControl2.ResumeLayout(False)
|
||||
Me.GroupControl2.PerformLayout()
|
||||
CType(Me.GroupControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.GroupControl1.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
@@ -876,7 +887,7 @@ Partial Class frmMain
|
||||
Friend WithEvents SaveFileDialog1 As SaveFileDialog
|
||||
Friend WithEvents bbtnitmEB As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents bbtnitmInfoMail As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents bbtnitm_ResendInvitation As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents XtraTabPageAdmin As DevExpress.XtraTab.XtraTabPage
|
||||
Friend WithEvents PanelControl1 As DevExpress.XtraEditors.PanelControl
|
||||
Friend WithEvents GroupControl1 As DevExpress.XtraEditors.GroupControl
|
||||
@@ -888,10 +899,11 @@ Partial Class frmMain
|
||||
Friend WithEvents GridViewData As DevExpress.XtraGrid.Views.Grid.GridView
|
||||
Friend WithEvents GroupControl2 As DevExpress.XtraEditors.GroupControl
|
||||
Friend WithEvents SplitContainerControl2 As DevExpress.XtraEditors.SplitContainerControl
|
||||
Friend WithEvents LabelControl1 As DevExpress.XtraEditors.LabelControl
|
||||
Friend WithEvents BarButtonItem3 As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents XtraSaveFileDialog1 As DevExpress.XtraEditors.XtraSaveFileDialog
|
||||
Friend WithEvents RibbonPageGroupFunctions As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
Friend WithEvents BarButtonItem4 As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents BarStaticItemGhost As DevExpress.XtraBars.BarStaticItem
|
||||
Friend WithEvents btnEvvallUs_thismonth As DevExpress.XtraEditors.SimpleButton
|
||||
Friend WithEvents btnEvvallUs_lastmonth As DevExpress.XtraEditors.SimpleButton
|
||||
End Class
|
||||
|
||||
@@ -365,7 +365,7 @@
|
||||
</value>
|
||||
</data>
|
||||
<data name="btnDeleteEnvelope.Caption" xml:space="preserve">
|
||||
<value>Umschlag zurückrufen</value>
|
||||
<value>Umschlag zurückrufen/löschen</value>
|
||||
</data>
|
||||
<data name="btnDeleteEnvelope.ImageOptions.ImageIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@@ -733,10 +733,10 @@
|
||||
IDwvZz4NCjwvc3ZnPgs=
|
||||
</value>
|
||||
</data>
|
||||
<data name="BarButtonItem2.Caption" xml:space="preserve">
|
||||
<data name="bbtnitm_ResendInvitation.Caption" xml:space="preserve">
|
||||
<value>Einladung erneut versenden</value>
|
||||
</data>
|
||||
<data name="BarButtonItem2.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<data name="bbtnitm_ResendInvitation.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40
|
||||
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
|
||||
@@ -1091,7 +1091,7 @@
|
||||
<value>195</value>
|
||||
</data>
|
||||
<data name="GridCompleted.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1088, 467</value>
|
||||
<value>1088, 469</value>
|
||||
</data>
|
||||
<data name="GridCompleted.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
@@ -1109,7 +1109,7 @@
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="XtraTabPage2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1088, 467</value>
|
||||
<value>1088, 469</value>
|
||||
</data>
|
||||
<data name="XtraTabPage2.Text" xml:space="preserve">
|
||||
<value>Abgeschlossene Umschläge</value>
|
||||
@@ -1139,7 +1139,7 @@
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="GridControlData.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>584, 388</value>
|
||||
<value>819, 390</value>
|
||||
</data>
|
||||
<data name="GridControlData.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
@@ -1187,7 +1187,7 @@
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="SplitContainerControl2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1088, 388</value>
|
||||
<value>1088, 390</value>
|
||||
</data>
|
||||
<data name="SplitContainerControl2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
@@ -1204,41 +1204,65 @@
|
||||
<data name=">>SplitContainerControl2.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="LabelControl1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>17, 37</value>
|
||||
<data name="btnEvvallUs_lastmonth.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>109, 26</value>
|
||||
</data>
|
||||
<data name="LabelControl1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>120, 13</value>
|
||||
<data name="btnEvvallUs_lastmonth.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>98, 35</value>
|
||||
</data>
|
||||
<data name="LabelControl1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
<data name="btnEvvallUs_lastmonth.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="LabelControl1.Text" xml:space="preserve">
|
||||
<value>Function not active so far</value>
|
||||
<data name="btnEvvallUs_lastmonth.Text" xml:space="preserve">
|
||||
<value>Letzter Monat</value>
|
||||
</data>
|
||||
<data name=">>LabelControl1.Name" xml:space="preserve">
|
||||
<value>LabelControl1</value>
|
||||
<data name=">>btnEvvallUs_lastmonth.Name" xml:space="preserve">
|
||||
<value>btnEvvallUs_lastmonth</value>
|
||||
</data>
|
||||
<data name=">>LabelControl1.Type" xml:space="preserve">
|
||||
<value>DevExpress.XtraEditors.LabelControl, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
<data name=">>btnEvvallUs_lastmonth.Type" xml:space="preserve">
|
||||
<value>DevExpress.XtraEditors.SimpleButton, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name=">>LabelControl1.Parent" xml:space="preserve">
|
||||
<data name=">>btnEvvallUs_lastmonth.Parent" xml:space="preserve">
|
||||
<value>GroupControl2</value>
|
||||
</data>
|
||||
<data name=">>LabelControl1.ZOrder" xml:space="preserve">
|
||||
<data name=">>btnEvvallUs_lastmonth.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="btnEvvallUs_thismonth.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>5, 26</value>
|
||||
</data>
|
||||
<data name="btnEvvallUs_thismonth.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>98, 35</value>
|
||||
</data>
|
||||
<data name="btnEvvallUs_thismonth.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="btnEvvallUs_thismonth.Text" xml:space="preserve">
|
||||
<value>Dieser Monat</value>
|
||||
</data>
|
||||
<data name=">>btnEvvallUs_thismonth.Name" xml:space="preserve">
|
||||
<value>btnEvvallUs_thismonth</value>
|
||||
</data>
|
||||
<data name=">>btnEvvallUs_thismonth.Type" xml:space="preserve">
|
||||
<value>DevExpress.XtraEditors.SimpleButton, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name=">>btnEvvallUs_thismonth.Parent" xml:space="preserve">
|
||||
<value>GroupControl2</value>
|
||||
</data>
|
||||
<data name=">>btnEvvallUs_thismonth.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="GroupControl2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>496, 5</value>
|
||||
<value>474, 5</value>
|
||||
</data>
|
||||
<data name="GroupControl2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>427, 68</value>
|
||||
<value>318, 68</value>
|
||||
</data>
|
||||
<data name="GroupControl2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="GroupControl2.Text" xml:space="preserve">
|
||||
<value>Diagramme</value>
|
||||
<value>Umschläge alle User</value>
|
||||
</data>
|
||||
<data name=">>GroupControl2.Name" xml:space="preserve">
|
||||
<value>GroupControl2</value>
|
||||
@@ -1352,7 +1376,7 @@
|
||||
<value>11, 5</value>
|
||||
</data>
|
||||
<data name="GroupControl1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>453, 68</value>
|
||||
<value>457, 68</value>
|
||||
</data>
|
||||
<data name="GroupControl1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
@@ -1397,7 +1421,7 @@
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="XtraTabPageAdmin.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1088, 467</value>
|
||||
<value>1088, 469</value>
|
||||
</data>
|
||||
<data name="XtraTabPageAdmin.Text" xml:space="preserve">
|
||||
<value>Auswertungen (Admin) - BETA</value>
|
||||
@@ -1771,10 +1795,10 @@
|
||||
<data name=">>bbtnitmInfoMail.Type" xml:space="preserve">
|
||||
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name=">>BarButtonItem2.Name" xml:space="preserve">
|
||||
<value>BarButtonItem2</value>
|
||||
<data name=">>bbtnitm_ResendInvitation.Name" xml:space="preserve">
|
||||
<value>bbtnitm_ResendInvitation</value>
|
||||
</data>
|
||||
<data name=">>BarButtonItem2.Type" xml:space="preserve">
|
||||
<data name=">>bbtnitm_ResendInvitation.Type" xml:space="preserve">
|
||||
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name=">>BarButtonItem3.Name" xml:space="preserve">
|
||||
@@ -1789,6 +1813,12 @@
|
||||
<data name=">>BarButtonItem4.Type" xml:space="preserve">
|
||||
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name=">>BarStaticItemGhost.Name" xml:space="preserve">
|
||||
<value>BarStaticItemGhost</value>
|
||||
</data>
|
||||
<data name=">>BarStaticItemGhost.Type" xml:space="preserve">
|
||||
<value>DevExpress.XtraBars.BarStaticItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name=">>RibbonPage1.Name" xml:space="preserve">
|
||||
<value>RibbonPage1</value>
|
||||
</data>
|
||||
@@ -1933,12 +1963,6 @@
|
||||
<data name=">>XtraSaveFileDialog1.Type" xml:space="preserve">
|
||||
<value>DevExpress.XtraEditors.XtraSaveFileDialog, DevExpress.XtraDialogs.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name=">>BarStaticItemGhost.Name" xml:space="preserve">
|
||||
<value>BarStaticItemGhost</value>
|
||||
</data>
|
||||
<data name=">>BarStaticItemGhost.Type" xml:space="preserve">
|
||||
<value>DevExpress.XtraBars.BarStaticItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>frmMain</value>
|
||||
</data>
|
||||
|
||||
@@ -13,6 +13,7 @@ Imports EnvelopeGenerator.Common.My
|
||||
Imports System.Diagnostics
|
||||
Imports System.ComponentModel
|
||||
Imports DevExpress.XtraPrinting
|
||||
Imports System.Web
|
||||
|
||||
Public Class frmMain
|
||||
Private ReadOnly LogConfig As LogConfig
|
||||
@@ -85,8 +86,14 @@ Public Class frmMain
|
||||
|
||||
GridBuilder.SetReadOnlyOptions(ViewHistory)
|
||||
GridBuilder.SetDefaults(ViewHistory)
|
||||
|
||||
GridEnvelopes.DataSource = Controller.ListEnvelopes()
|
||||
If ViewEnvelopes.RowCount = 0 Then
|
||||
RibbonPageGroupFunctions.Enabled = False
|
||||
btnDeleteEnvelope.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
Else
|
||||
RibbonPageGroupFunctions.Enabled = True
|
||||
btnDeleteEnvelope.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
@@ -176,7 +183,11 @@ Public Class frmMain
|
||||
Private Sub btnDeleteEnvelope_ItemClick_1(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDeleteEnvelope.ItemClick
|
||||
Try
|
||||
Dim oSelectedRows = ViewEnvelopes.GetSelectedRows()
|
||||
Dim oEnvelope As Envelope = DirectCast(ViewEnvelopes.GetRow(oSelectedRows.First), Envelope)
|
||||
|
||||
If oSelectedRows.Count > 0 Then
|
||||
CurrentEnvelopID = oEnvelope.Id
|
||||
CurrentEnvelopetitle = oEnvelope.Title
|
||||
Dim ofrmAbort As New frmRueckruf
|
||||
frmRueckruf.ShowDialog()
|
||||
If frmRueckruf.Continue_Reject = True Then
|
||||
@@ -196,29 +207,44 @@ Public Class frmMain
|
||||
End Sub
|
||||
|
||||
Private Sub XtraTabControl1_SelectedPageChanged(sender As Object, e As DevExpress.XtraTab.TabPageChangedEventArgs) Handles XtraTabControlMain.SelectedPageChanged
|
||||
RibbonPageGroupFunctions.Enabled = True
|
||||
RibbonPageEnvelopeActions.Enabled = True
|
||||
Select Case XtraTabControlMain.SelectedTabPageIndex
|
||||
Case 1
|
||||
btnEditEnvelope.Enabled = False
|
||||
btnDeleteEnvelope.Enabled = False
|
||||
btnContactReceiver.Enabled = False
|
||||
btnShowDocument.Enabled = False
|
||||
bbtnitmEB.Enabled = True
|
||||
LoadEnvelopeData()
|
||||
Case 0
|
||||
btnEditEnvelope.Enabled = True
|
||||
btnDeleteEnvelope.Enabled = True
|
||||
btnContactReceiver.Enabled = True
|
||||
btnShowDocument.Enabled = True
|
||||
bbtnitmEB.Enabled = False
|
||||
LoadEnvelopeData()
|
||||
txtEnvelopeIdLabel.Caption = "No Envelope selected"
|
||||
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
|
||||
Try
|
||||
RibbonPageGroupFunctions.Enabled = True
|
||||
RibbonPageEnvelopeActions.Enabled = True
|
||||
Select Case XtraTabControlMain.SelectedTabPageIndex
|
||||
Case 1
|
||||
btnEditEnvelope.Enabled = False
|
||||
btnDeleteEnvelope.Enabled = False
|
||||
btnContactReceiver.Enabled = False
|
||||
btnShowDocument.Enabled = False
|
||||
bbtnitm_ResendInvitation.Enabled = False
|
||||
bbtnitmInfoMail.Enabled = False
|
||||
bbtnitmEB.Enabled = True
|
||||
LoadEnvelopeData()
|
||||
Case 0
|
||||
If ViewEnvelopes.RowCount = 0 Then
|
||||
RibbonPageGroupFunctions.Enabled = False
|
||||
End If
|
||||
btnEditEnvelope.Enabled = True
|
||||
btnDeleteEnvelope.Enabled = True
|
||||
btnContactReceiver.Enabled = True
|
||||
btnShowDocument.Enabled = True
|
||||
bbtnitm_ResendInvitation.Enabled = True
|
||||
bbtnitmInfoMail.Enabled = True
|
||||
bbtnitmEB.Enabled = False
|
||||
LoadEnvelopeData()
|
||||
txtEnvelopeIdLabel.Caption = "No Envelope selected"
|
||||
|
||||
Case 2
|
||||
RibbonPageGroupFunctions.Enabled = False
|
||||
RibbonPageEnvelopeActions.Enabled = False
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Finally
|
||||
SplashScreenManager.CloseOverlayForm(oHandle)
|
||||
End Try
|
||||
|
||||
Case 2
|
||||
RibbonPageGroupFunctions.Enabled = False
|
||||
RibbonPageEnvelopeActions.Enabled = False
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
|
||||
@@ -312,7 +338,7 @@ Public Class frmMain
|
||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Common.Constants.GREEN_300)
|
||||
End If
|
||||
|
||||
If oEnvelope.Status = Common.Constants.EnvelopeStatus.EnvelopeDeleted Then
|
||||
If oEnvelope.Status = Common.Constants.EnvelopeStatus.EnvelopeDeleted Or oEnvelope.Status = Common.Constants.EnvelopeStatus.EnvelopeWithdrawn Or oEnvelope.Status = Common.Constants.EnvelopeStatus.EnvelopeRejected Then
|
||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Common.Constants.RED_300)
|
||||
End If
|
||||
End Sub
|
||||
@@ -538,31 +564,22 @@ Public Class frmMain
|
||||
Dim oView As GridView = GridEnvelopes.FocusedView
|
||||
If oView.Name = ViewReceivers.Name Then
|
||||
Dim oReceiver As EnvelopeReceiver = oView.GetRow(oView.FocusedRowHandle)
|
||||
Dim oEnvelopeTitle As String = Net.WebUtility.UrlEncode(oEnvelope.Title)
|
||||
Dim oCode = oReceiver.AccessCode
|
||||
Dim oUID = oEnvelope.Uuid
|
||||
Dim mailto As String = "mailto:support-flow@digitaldata.works"
|
||||
Dim subject As String = Uri.EscapeDataString("signFLOW - Envelope issue - ID: " & oEnvelope.Id)
|
||||
Dim body As String = Uri.EscapeDataString($"Dear Digital Data Team," & vbCrLf & "There is an error or misbehavin with following envelope and Receiver:" & vbCrLf &
|
||||
$"Envelope-ID:{oEnvelope.Id}" & vbCrLf & $"Receiver: {oReceiver.Email}" & vbCrLf & "Issue/Description: Please describe the issue in Your own words...")
|
||||
|
||||
' E-Mail-Details konfigurieren
|
||||
Dim mailto As String = "support-flow@digitaldata.works"
|
||||
Dim subject As String = "signFLOW - Envelope issue"
|
||||
Dim body As String = $"<html><body>Dear Digital Data Team, <br> There is an error or misbehavin with following envelope and Receiver: <p> Envelope: <b>{oUID}</b> <br> Receiver: <b>{oReceiver.Email}</b>
|
||||
<p>Issue/Description: Please describe the issue in Your own words...</p></body></html>"
|
||||
Dim mailtoUri As String = $"{mailto}?subject={subject}&body={body}"
|
||||
|
||||
' URL-encoding für Betreff und Inhalt der E-Mail
|
||||
'Dim encodedSubject As String = Uri.EscapeDataString(subject)
|
||||
'Dim encodedBody As String = Uri.EscapeDataString(body)
|
||||
Dim psi As New ProcessStartInfo(mailtoUri)
|
||||
psi.UseShellExecute = True
|
||||
|
||||
' mailto-Link erstellen
|
||||
Dim mailtoLink As String = $"{mailto}?subject={subject}&body={body}"
|
||||
Try
|
||||
Process.Start(mailtoLink)
|
||||
Catch ex1 As Exception
|
||||
MsgBox(ex1.Message, MsgBoxStyle.Critical, Text)
|
||||
Process.Start(psi)
|
||||
Catch ex As Exception
|
||||
MessageBox.Show("Error in creating mailto-Object: " & ex.Message)
|
||||
End Try
|
||||
' E-Mail-Client öffnen
|
||||
|
||||
|
||||
Process.Start($"mailto:{oReceiver.Email}?subject={oEnvelopeTitle}")
|
||||
Else
|
||||
MsgBox(Resources.Envelope.Please_select_a_recipient_from_the_Recipients_tab, MsgBoxStyle.Information, Text)
|
||||
End If
|
||||
@@ -572,7 +589,7 @@ Public Class frmMain
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
|
||||
Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnitm_ResendInvitation.ItemClick
|
||||
Dim oView As GridView = GridEnvelopes.FocusedView
|
||||
Dim selReceiver As EnvelopeReceiver
|
||||
If oView.Name = ViewReceivers.Name Then
|
||||
@@ -616,7 +633,9 @@ Public Class frmMain
|
||||
If SQL_REP_ENV_USER_TM <> String.Empty Then
|
||||
Result_Execute(SQL_REP_ENV_USER_TM)
|
||||
Else
|
||||
|
||||
GridControlData.DataSource = Nothing
|
||||
GridViewData.Columns.Clear()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -647,7 +666,9 @@ Public Class frmMain
|
||||
Try
|
||||
Dim oDT As DataTable = DB_DD_ECM.GetDatatable(mySQL)
|
||||
If Not IsNothing(oDT) Then
|
||||
|
||||
If GridViewData.Columns.Count > 0 Then
|
||||
GridViewData.Columns.Clear()
|
||||
End If
|
||||
GridControlData.DataSource = oDT
|
||||
Else
|
||||
GridControlData.DataSource = Nothing
|
||||
@@ -657,7 +678,7 @@ Public Class frmMain
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub LabelControl1_Click(sender As Object, e As EventArgs) Handles LabelControl1.Click
|
||||
Private Sub LabelControl1_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -729,4 +750,20 @@ Public Class frmMain
|
||||
Public Shared Sub Save_Logfiles()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btnEvvallUs_thismonth_Click(sender As Object, e As EventArgs) Handles btnEvvallUs_thismonth.Click
|
||||
If SQL_REP_ENV_ALL_USER_MONTH <> String.Empty Then
|
||||
Result_Execute(SQL_REP_ENV_ALL_USER_MONTH)
|
||||
Else
|
||||
GridControlData.DataSource = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btnEvvallUs_lastmonth_Click(sender As Object, e As EventArgs) Handles btnEvvallUs_lastmonth.Click
|
||||
If SQL_REP_ENV_ALL_USER_LAST_MONTH <> String.Empty Then
|
||||
Result_Execute(SQL_REP_ENV_ALL_USER_LAST_MONTH)
|
||||
Else
|
||||
GridControlData.DataSource = Nothing
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
62
EnvelopeGenerator.Form/frmRueckruf.Designer.vb
generated
62
EnvelopeGenerator.Form/frmRueckruf.Designer.vb
generated
@@ -30,13 +30,17 @@ Partial Class frmRueckruf
|
||||
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
|
||||
Me.tsstatus = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.SimpleButton1 = New DevExpress.XtraEditors.SimpleButton()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.lblID = New System.Windows.Forms.Label()
|
||||
Me.lblTitle = New System.Windows.Forms.Label()
|
||||
Me.StatusStrip1.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Location = New System.Drawing.Point(22, 20)
|
||||
Me.Label2.Location = New System.Drawing.Point(28, 36)
|
||||
Me.Label2.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(380, 16)
|
||||
@@ -46,7 +50,7 @@ Partial Class frmRueckruf
|
||||
'txtReason
|
||||
'
|
||||
Me.txtReason.AcceptsReturn = True
|
||||
Me.txtReason.Location = New System.Drawing.Point(25, 40)
|
||||
Me.txtReason.Location = New System.Drawing.Point(31, 56)
|
||||
Me.txtReason.Margin = New System.Windows.Forms.Padding(4)
|
||||
Me.txtReason.Multiline = True
|
||||
Me.txtReason.Name = "txtReason"
|
||||
@@ -66,7 +70,7 @@ Partial Class frmRueckruf
|
||||
'
|
||||
Me.btnCancel.Image = CType(resources.GetObject("btnCancel.Image"), System.Drawing.Image)
|
||||
Me.btnCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnCancel.Location = New System.Drawing.Point(251, 134)
|
||||
Me.btnCancel.Location = New System.Drawing.Point(260, 150)
|
||||
Me.btnCancel.Name = "btnCancel"
|
||||
Me.btnCancel.Size = New System.Drawing.Size(203, 44)
|
||||
Me.btnCancel.TabIndex = 4
|
||||
@@ -76,7 +80,7 @@ Partial Class frmRueckruf
|
||||
'StatusStrip1
|
||||
'
|
||||
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsstatus})
|
||||
Me.StatusStrip1.Location = New System.Drawing.Point(0, 185)
|
||||
Me.StatusStrip1.Location = New System.Drawing.Point(0, 211)
|
||||
Me.StatusStrip1.Name = "StatusStrip1"
|
||||
Me.StatusStrip1.Size = New System.Drawing.Size(488, 22)
|
||||
Me.StatusStrip1.TabIndex = 5
|
||||
@@ -90,17 +94,59 @@ Partial Class frmRueckruf
|
||||
'SimpleButton1
|
||||
'
|
||||
Me.SimpleButton1.ImageOptions.SvgImage = CType(resources.GetObject("SimpleButton1.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||
Me.SimpleButton1.Location = New System.Drawing.Point(25, 134)
|
||||
Me.SimpleButton1.Location = New System.Drawing.Point(31, 150)
|
||||
Me.SimpleButton1.Name = "SimpleButton1"
|
||||
Me.SimpleButton1.Size = New System.Drawing.Size(220, 44)
|
||||
Me.SimpleButton1.TabIndex = 6
|
||||
Me.SimpleButton1.Text = "Umschlag zurückrufen"
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Location = New System.Drawing.Point(28, 9)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(80, 16)
|
||||
Me.Label3.TabIndex = 7
|
||||
Me.Label3.Text = "Envelope-ID:"
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.AutoSize = True
|
||||
Me.Label4.Location = New System.Drawing.Point(158, 9)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(93, 16)
|
||||
Me.Label4.TabIndex = 8
|
||||
Me.Label4.Text = "Envelope-Titel:"
|
||||
'
|
||||
'lblID
|
||||
'
|
||||
Me.lblID.AutoSize = True
|
||||
Me.lblID.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblID.Location = New System.Drawing.Point(108, 9)
|
||||
Me.lblID.Name = "lblID"
|
||||
Me.lblID.Size = New System.Drawing.Size(49, 16)
|
||||
Me.lblID.TabIndex = 9
|
||||
Me.lblID.Text = "Label5"
|
||||
'
|
||||
'lblTitle
|
||||
'
|
||||
Me.lblTitle.AutoSize = True
|
||||
Me.lblTitle.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblTitle.Location = New System.Drawing.Point(257, 9)
|
||||
Me.lblTitle.Name = "lblTitle"
|
||||
Me.lblTitle.Size = New System.Drawing.Size(49, 16)
|
||||
Me.lblTitle.TabIndex = 10
|
||||
Me.lblTitle.Text = "Label5"
|
||||
'
|
||||
'frmRueckruf
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(488, 207)
|
||||
Me.ClientSize = New System.Drawing.Size(488, 233)
|
||||
Me.Controls.Add(Me.lblTitle)
|
||||
Me.Controls.Add(Me.lblID)
|
||||
Me.Controls.Add(Me.Label4)
|
||||
Me.Controls.Add(Me.Label3)
|
||||
Me.Controls.Add(Me.SimpleButton1)
|
||||
Me.Controls.Add(Me.StatusStrip1)
|
||||
Me.Controls.Add(Me.btnCancel)
|
||||
@@ -129,4 +175,8 @@ Partial Class frmRueckruf
|
||||
Friend WithEvents StatusStrip1 As StatusStrip
|
||||
Friend WithEvents tsstatus As ToolStripStatusLabel
|
||||
Friend WithEvents SimpleButton1 As DevExpress.XtraEditors.SimpleButton
|
||||
Friend WithEvents Label3 As Label
|
||||
Friend WithEvents Label4 As Label
|
||||
Friend WithEvents lblID As Label
|
||||
Friend WithEvents lblTitle As Label
|
||||
End Class
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
<data name="btnCancel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wQAADsEBuJFr7QAAAUlJREFUOE+lU6GOg1AQ5BP6Cf2E+4QLnqQWV4EHjUJhGzxJJbICDxpFQvCHg4DA
|
||||
wAAADsABataJCQAAAUlJREFUOE+lU6GOg1AQ5BP6Cf2E+4QLnqQWV4EHjUJhGzxJJbICDxpFQvCHg4DA
|
||||
Yd/tLPvK4wJ34iaZ9GVndxh4WwtYluVCfBIVcSYGLPwA1SPp0bxpIaiqSjmOw2zbdhMJdL4S6yzLlG3b
|
||||
qigK6JHI3FCmacoi6HmeGscRSZAswDmOY9bQR7WXjK5AExJoAzBJEjTOXdexIWowoVpNvMjoChQg5Hm+
|
||||
M8HT8Eo4G6muMrbHmQkIk2ma8PRPaT8G3Ikc1TSAKdWf0nYMGT5M4Lrun/E/iDM+nDlofgPf9/kDysgG
|
||||
|
||||
@@ -22,6 +22,8 @@ Public Class frmRueckruf
|
||||
txtReason.Text = ""
|
||||
tsstatus.Text = ""
|
||||
Continue_Reject = False
|
||||
lblID.Text = CurrentEnvelopID.ToString
|
||||
lblTitle.Text = CurrentEnvelopetitle
|
||||
End Sub
|
||||
|
||||
Private Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles SimpleButton1.Click
|
||||
@@ -50,4 +52,8 @@ Public Class frmRueckruf
|
||||
tsstatus.Text = "Please add a reason for aborting - " & Now
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
@@ -88,6 +88,10 @@ Public Class frmSplashScreen
|
||||
SQL_REP_ENV_USER_Y = oROW.Item("SQL_COMMAND")
|
||||
ElseIf oROW.Item("TITLE") = "REPORT ENV USER ALL" Then
|
||||
SQL_REP_ENV_USER_ALL = oROW.Item("SQL_COMMAND")
|
||||
ElseIf oROW.Item("TITLE") = "REPORT ENV ALL_USER_THIS_MONTH" Then
|
||||
SQL_REP_ENV_ALL_USER_MONTH = oROW.Item("SQL_COMMAND")
|
||||
ElseIf oROW.Item("TITLE") = "REPORT ENV ALL_USER_LAST_MONTH" Then
|
||||
SQL_REP_ENV_ALL_USER_LAST_MONTH = oROW.Item("SQL_COMMAND")
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using DigitalData.Core.API;
|
||||
using DigitalData.Core.Application;
|
||||
using DigitalData.UserManager.Application;
|
||||
using EnvelopeGenerator.Application.Extensions;
|
||||
using EnvelopeGenerator.Infrastructure;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Localization;
|
||||
@@ -10,6 +9,7 @@ using System.Globalization;
|
||||
using Scalar.AspNetCore;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using DigitalData.UserManager.DependencyInjection;
|
||||
using EnvelopeGenerator.Application;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@ using CommandDotNet;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using CommandDotNet.IoC.MicrosoftDependencyInjection;
|
||||
using EnvelopeGenerator.Infrastructure;
|
||||
using EnvelopeGenerator.Application.Extensions;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using EnvelopeGenerator.Application.Contracts.Services;
|
||||
using EnvelopeGenerator.Application.Services;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using EnvelopeGenerator.Application;
|
||||
|
||||
namespace EnvelopeGenerator.Terminal;
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using EnvelopeGenerator.Application.Extensions;
|
||||
using EnvelopeGenerator.Infrastructure;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using EnvelopeGenerator.Application.Services;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using EnvelopeGenerator.Application;
|
||||
|
||||
namespace EnvelopeGenerator.Tests.Application;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using EnvelopeGenerator.Web.Models;
|
||||
using EnvelopeGenerator.Web.Models.Annotation;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
@@ -6,6 +7,7 @@ namespace EnvelopeGenerator.Web.Controllers;
|
||||
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
[Authorize]
|
||||
public class ConfigController : ControllerBase
|
||||
{
|
||||
private readonly AnnotationParams _annotParams;
|
||||
@@ -18,6 +20,6 @@ public class ConfigController : ControllerBase
|
||||
[HttpGet("Annotations")]
|
||||
public IActionResult GetAnnotationParams()
|
||||
{
|
||||
return Ok(_annotParams.AnnotationDictionary);
|
||||
return Ok(_annotParams.AnnotationJSObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<PackageId>EnvelopeGenerator.Web</PackageId>
|
||||
<Version>3.1.1</Version>
|
||||
<Version>3.1.2</Version>
|
||||
<Authors>Digital Data GmbH</Authors>
|
||||
<Company>Digital Data GmbH</Company>
|
||||
<Product>EnvelopeGenerator.Web</Product>
|
||||
@@ -13,8 +13,8 @@
|
||||
<PackageTags>digital data envelope generator web</PackageTags>
|
||||
<Description>EnvelopeGenerator.Web is an ASP.NET MVC application developed to manage signing processes. It uses Entity Framework Core (EF Core) for database operations. The user interface for signing processes is developed with Razor View Engine (.cshtml files) and JavaScript under wwwroot, integrated with PSPDFKit. This integration allows users to view and sign documents seamlessly.</Description>
|
||||
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
|
||||
<AssemblyVersion>3.1.1</AssemblyVersion>
|
||||
<FileVersion>3.1.1</FileVersion>
|
||||
<AssemblyVersion>3.1.2</AssemblyVersion>
|
||||
<FileVersion>3.1.2</FileVersion>
|
||||
<Copyright>Copyright © 2025 Digital Data GmbH. All rights reserved.</Copyright>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace EnvelopeGenerator.Web.Models;
|
||||
namespace EnvelopeGenerator.Web.Models.Annotation;
|
||||
|
||||
public record Annotation
|
||||
public record Annotation : IAnnotation
|
||||
{
|
||||
public required string Name { get; init; }
|
||||
|
||||
@@ -60,6 +60,16 @@ public record Annotation
|
||||
public Annotation? VerBoundAnnot { get; set; }
|
||||
#endregion
|
||||
|
||||
public Color? BackgroundColor { get; init; }
|
||||
|
||||
#region Border
|
||||
public Color? BorderColor { get; init; }
|
||||
|
||||
public string? BorderStyle { get; init; }
|
||||
|
||||
public int? BorderWidth { get; set; }
|
||||
#endregion
|
||||
|
||||
[JsonIgnore]
|
||||
internal Annotation Default
|
||||
{
|
||||
@@ -1,15 +1,21 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace EnvelopeGenerator.Web.Models;
|
||||
namespace EnvelopeGenerator.Web.Models.Annotation;
|
||||
|
||||
public class AnnotationParams
|
||||
{
|
||||
public AnnotationParams()
|
||||
{
|
||||
_AnnotationJSObjectInitor = new(CreateAnnotationJSObject);
|
||||
}
|
||||
|
||||
public Background? Background { get; init; }
|
||||
|
||||
#region Annotation
|
||||
[JsonIgnore]
|
||||
public Annotation? DefaultAnnotation { get; init; }
|
||||
|
||||
private readonly IEnumerable<Annotation> _annots = new List<Annotation>();
|
||||
|
||||
public Annotation this[string name] => _annots.First(a => a.Name == name);
|
||||
private readonly List<Annotation> _annots = new List<Annotation>();
|
||||
|
||||
public bool TryGet(string name, out Annotation annotation)
|
||||
{
|
||||
@@ -24,34 +30,50 @@ public class AnnotationParams
|
||||
get => _annots;
|
||||
init
|
||||
{
|
||||
_annots = value;
|
||||
_annots = value.ToList();
|
||||
|
||||
if (DefaultAnnotation is not null)
|
||||
foreach (var annot in _annots)
|
||||
annot.Default = DefaultAnnotation;
|
||||
|
||||
foreach (var annot in _annots)
|
||||
for (int i = 0; i < _annots.Count; i++)
|
||||
{
|
||||
#region set bound annotations
|
||||
// horizontal
|
||||
if (annot.HorBoundAnnotName is string horBoundAnnotName)
|
||||
if (_annots[i].HorBoundAnnotName is string horBoundAnnotName)
|
||||
if (TryGet(horBoundAnnotName, out var horBoundAnnot))
|
||||
annot.HorBoundAnnot = horBoundAnnot;
|
||||
_annots[i].HorBoundAnnot = horBoundAnnot;
|
||||
else
|
||||
throw new InvalidOperationException($"{horBoundAnnotName} added as bound anotation. However, it is not defined.");
|
||||
|
||||
// vertical
|
||||
if (annot.VerBoundAnnotName is string verBoundAnnotName)
|
||||
if (_annots[i].VerBoundAnnotName is string verBoundAnnotName)
|
||||
if (TryGet(verBoundAnnotName, out var verBoundAnnot))
|
||||
annot.VerBoundAnnot = verBoundAnnot;
|
||||
_annots[i].VerBoundAnnot = verBoundAnnot;
|
||||
else
|
||||
throw new InvalidOperationException($"{verBoundAnnotName} added as bound anotation. However, it is not defined.");
|
||||
#endregion
|
||||
}
|
||||
|
||||
AnnotationDictionary = _annots.ToDictionary(a => a.Name.ToLower(), a => a);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public Dictionary<string, Annotation> AnnotationDictionary { get; private init; } = new();
|
||||
#region AnnotationJSObject
|
||||
private Dictionary<string, IAnnotation> CreateAnnotationJSObject()
|
||||
{
|
||||
var dict = _annots.ToDictionary(a => a.Name.ToLower(), a => a as IAnnotation);
|
||||
|
||||
if (Background is not null)
|
||||
{
|
||||
Background.Locate(_annots);
|
||||
dict.Add(Background.Name.ToLower(), Background);
|
||||
}
|
||||
|
||||
return dict;
|
||||
}
|
||||
|
||||
private readonly Lazy<Dictionary<string, IAnnotation>> _AnnotationJSObjectInitor;
|
||||
|
||||
public Dictionary<string, IAnnotation> AnnotationJSObject => _AnnotationJSObjectInitor.Value;
|
||||
#endregion
|
||||
}
|
||||
58
EnvelopeGenerator.Web/Models/Annotation/Background.cs
Normal file
58
EnvelopeGenerator.Web/Models/Annotation/Background.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace EnvelopeGenerator.Web.Models.Annotation;
|
||||
|
||||
/// <summary>
|
||||
/// The Background is an annotation for the PSPDF Kit. However, it has no function.
|
||||
/// It is only the first annotation as a background for other annotations.
|
||||
/// </summary>
|
||||
public record Background : IAnnotation
|
||||
{
|
||||
[JsonIgnore]
|
||||
public double Margin { get; init; }
|
||||
|
||||
public string Name { get; } = "Background";
|
||||
|
||||
public double? Width { get; set; }
|
||||
|
||||
public double? Height { get; set; }
|
||||
|
||||
public double Left { get; set; }
|
||||
|
||||
public double Top { get; set; }
|
||||
|
||||
public Color? BackgroundColor { get; init; }
|
||||
|
||||
#region Border
|
||||
public Color? BorderColor { get; init; }
|
||||
|
||||
public string? BorderStyle { get; init; }
|
||||
|
||||
public int? BorderWidth { get; set; }
|
||||
#endregion
|
||||
|
||||
public void Locate(IEnumerable<IAnnotation> annotations)
|
||||
{
|
||||
// set Top
|
||||
if (annotations.MinBy(a => a.Top)?.Top is double minTop)
|
||||
Top = minTop;
|
||||
|
||||
// set Left
|
||||
if (annotations.MinBy(a => a.Left)?.Left is double minLeft)
|
||||
Left = minLeft;
|
||||
|
||||
// set Width
|
||||
if(annotations.MaxBy(a => a.GetRight())?.GetRight() is double maxRight)
|
||||
Width = maxRight - Left;
|
||||
|
||||
// set Height
|
||||
if (annotations.MaxBy(a => a.GetBottom())?.GetBottom() is double maxBottom)
|
||||
Height = maxBottom - Top;
|
||||
|
||||
// add margins
|
||||
Top -= Margin;
|
||||
Left -= Margin;
|
||||
Width += Margin * 2;
|
||||
Height += Margin * 2;
|
||||
}
|
||||
}
|
||||
10
EnvelopeGenerator.Web/Models/Annotation/Color.cs
Normal file
10
EnvelopeGenerator.Web/Models/Annotation/Color.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace EnvelopeGenerator.Web.Models.Annotation;
|
||||
|
||||
public record Color
|
||||
{
|
||||
public int R { get; init; } = 0;
|
||||
|
||||
public int G { get; init; } = 0;
|
||||
|
||||
public int B { get; init; } = 0;
|
||||
}
|
||||
8
EnvelopeGenerator.Web/Models/Annotation/Extensions.cs
Normal file
8
EnvelopeGenerator.Web/Models/Annotation/Extensions.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace EnvelopeGenerator.Web.Models.Annotation;
|
||||
|
||||
public static class Extensions
|
||||
{
|
||||
public static double GetRight(this IAnnotation annotation) => annotation.Left + annotation?.Width ?? 0;
|
||||
|
||||
public static double GetBottom(this IAnnotation annotation) => annotation.Top + annotation?.Height ?? 0;
|
||||
}
|
||||
22
EnvelopeGenerator.Web/Models/Annotation/IAnnotation.cs
Normal file
22
EnvelopeGenerator.Web/Models/Annotation/IAnnotation.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
namespace EnvelopeGenerator.Web.Models.Annotation;
|
||||
|
||||
public interface IAnnotation
|
||||
{
|
||||
string Name { get; }
|
||||
|
||||
double? Width { get; }
|
||||
|
||||
double? Height { get; }
|
||||
|
||||
double Left { get; }
|
||||
|
||||
double Top { get; }
|
||||
|
||||
Color? BackgroundColor { get; }
|
||||
|
||||
Color? BorderColor { get; }
|
||||
|
||||
string? BorderStyle { get; }
|
||||
|
||||
int? BorderWidth { get; }
|
||||
}
|
||||
@@ -15,7 +15,7 @@ using DigitalData.EmailProfilerDispatcher;
|
||||
using EnvelopeGenerator.Infrastructure;
|
||||
using EnvelopeGenerator.Web.Sanitizers;
|
||||
using EnvelopeGenerator.Application.Contracts.Services;
|
||||
using EnvelopeGenerator.Application.Extensions;
|
||||
using EnvelopeGenerator.Web.Models.Annotation;
|
||||
|
||||
var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
|
||||
logger.Info("Logging initialized!");
|
||||
|
||||
@@ -151,6 +151,21 @@
|
||||
},
|
||||
"MainPageTitle": null,
|
||||
"AnnotationParams": {
|
||||
"Background": {
|
||||
"Margin": 0.20,
|
||||
"BackgroundColor": {
|
||||
"R": 222,
|
||||
"G": 220,
|
||||
"B": 215
|
||||
},
|
||||
"BorderColor": {
|
||||
"R": 204,
|
||||
"G": 202,
|
||||
"B": 198
|
||||
},
|
||||
"BorderStyle": "underline",
|
||||
"BorderWidth": 4
|
||||
},
|
||||
"DefaultAnnotation": {
|
||||
"Width": 1,
|
||||
"Height": 0.5,
|
||||
|
||||
@@ -5,6 +5,34 @@ async function createAnnotations(document, instance) {
|
||||
for(var element of document.elements) {
|
||||
const annotParams = await getAnnotationParams(element.left, element.top);
|
||||
const page = element.page - 1
|
||||
|
||||
//background
|
||||
if(annotParams.background){
|
||||
let background = annotParams.background;
|
||||
const id_background = PSPDFKit.generateInstantId();
|
||||
const annotation_background = new PSPDFKit.Annotations.WidgetAnnotation({
|
||||
id: id_background,
|
||||
pageIndex: page,
|
||||
formFieldName: id_background,
|
||||
backgroundColor: background?.backgroundColor ? new PSPDFKit.Color(background.backgroundColor) : null,
|
||||
blendMode: 'normal',
|
||||
boundingBox: new PSPDFKit.Geometry.Rect(background),
|
||||
fontSize: 8,
|
||||
borderStyle: background.borderStyle,
|
||||
borderWidth: background.borderWidth,
|
||||
borderColor: background?.borderColor ? new PSPDFKit.Color(background.borderColor) : null
|
||||
});
|
||||
|
||||
const formFieldBackground = new PSPDFKit.FormFields.ButtonFormField({
|
||||
name: id_background,
|
||||
annotationIds: PSPDFKit.Immutable.List([annotation_background.id]),
|
||||
value: "",
|
||||
readOnly: false
|
||||
});
|
||||
|
||||
signatures.push(annotation_background)
|
||||
signatures.push(formFieldBackground)
|
||||
}
|
||||
|
||||
//signatures
|
||||
const id = PSPDFKit.generateInstantId()
|
||||
@@ -12,8 +40,8 @@ async function createAnnotations(document, instance) {
|
||||
id: id,
|
||||
pageIndex: page,
|
||||
formFieldName: id,
|
||||
backgroundColor: PSPDFKit.Color.YELLOW,
|
||||
blendMode: 'multiply',
|
||||
backgroundColor: PSPDFKit.Color.LIGHT_YELLOW,
|
||||
blendMode: 'normal',
|
||||
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.signature),
|
||||
})
|
||||
|
||||
@@ -29,7 +57,7 @@ async function createAnnotations(document, instance) {
|
||||
pageIndex: page,
|
||||
formFieldName: id_position,
|
||||
backgroundColor: PSPDFKit.Color.DarkBlue,
|
||||
blendMode: 'multiply',
|
||||
blendMode: 'normal',
|
||||
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.position),
|
||||
fontSize: 8
|
||||
})
|
||||
@@ -48,7 +76,7 @@ async function createAnnotations(document, instance) {
|
||||
pageIndex: page,
|
||||
formFieldName: id_city,
|
||||
backgroundColor: PSPDFKit.Color.DarkBlue,
|
||||
blendMode: 'multiply',
|
||||
blendMode: 'normal',
|
||||
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.city),
|
||||
fontSize: 8
|
||||
})
|
||||
@@ -67,7 +95,7 @@ async function createAnnotations(document, instance) {
|
||||
pageIndex: page,
|
||||
formFieldName: id_date,
|
||||
backgroundColor: PSPDFKit.Color.DarkBlue,
|
||||
blendMode: 'multiply',
|
||||
blendMode: 'normal',
|
||||
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.date),
|
||||
fontSize: 8,
|
||||
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
||||
@@ -97,7 +125,7 @@ async function createAnnotations(document, instance) {
|
||||
id: id_date_label,
|
||||
pageIndex: page,
|
||||
formFieldName: id_date_label,
|
||||
blendMode: 'multiply',
|
||||
blendMode: 'normal',
|
||||
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.datelabel),
|
||||
fontSize: 8,
|
||||
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
||||
@@ -119,7 +147,7 @@ async function createAnnotations(document, instance) {
|
||||
id: id_city_label,
|
||||
pageIndex: page,
|
||||
formFieldName: id_city_label,
|
||||
blendMode: 'multiply',
|
||||
blendMode: 'normal',
|
||||
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.citylabel),
|
||||
fontSize: 8,
|
||||
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
||||
@@ -131,7 +159,8 @@ async function createAnnotations(document, instance) {
|
||||
name: id_city_label,
|
||||
annotationIds: PSPDFKit.Immutable.List([annotation_city_label.id]),
|
||||
value: "Ort",
|
||||
readOnly: true
|
||||
readOnly: true,
|
||||
color: PSPDFKit.Color.BLACK
|
||||
})
|
||||
|
||||
//position label
|
||||
@@ -140,7 +169,7 @@ async function createAnnotations(document, instance) {
|
||||
id: id_position_label,
|
||||
pageIndex: page,
|
||||
formFieldName: id_position_label,
|
||||
blendMode: 'multiply',
|
||||
blendMode: 'normal',
|
||||
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.positionlabel),
|
||||
fontSize: 8,
|
||||
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
||||
|
||||
@@ -175,21 +175,21 @@ async function setLanguage(language) {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
.then(res => res.json())
|
||||
.then(langs => langs.includes(language))
|
||||
.catch(err => false);
|
||||
.then(res => res.json())
|
||||
.then(langs => langs.includes(language))
|
||||
.catch(err => false);
|
||||
|
||||
if(hasLang)
|
||||
if (hasLang)
|
||||
return await fetch(`/lang/${language}`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
.then(response => {
|
||||
if (response.redirected)
|
||||
window.location.href = response.url;
|
||||
else if (!response.ok)
|
||||
return Promise.reject('Failed to set language');
|
||||
});
|
||||
.then(response => {
|
||||
if (response.redirected)
|
||||
window.location.href = response.url;
|
||||
else if (!response.ok)
|
||||
return Promise.reject('Failed to set language');
|
||||
});
|
||||
}
|
||||
|
||||
async function logout() {
|
||||
@@ -204,22 +204,23 @@ async function logout() {
|
||||
});
|
||||
}
|
||||
|
||||
function getAnnotationParams(leftInInch = 0, topInInch = 0, inchToPointFactor = 72) {
|
||||
return fetch(`${window.location.origin}/api/Config/Annotations`, {
|
||||
|
||||
async function getAnnotationParams(leftInInch = 0, topInInch = 0, inchToPointFactor = 72) {
|
||||
|
||||
const annotParams = await fetch(`${window.location.origin}/api/Config/Annotations`, {
|
||||
credentials: 'include',
|
||||
method: 'GET'
|
||||
})
|
||||
.then(res => res.json())
|
||||
.then(annotParams => {
|
||||
for(var key in annotParams){
|
||||
var annot = annotParams[key];
|
||||
annot.width *= inchToPointFactor;
|
||||
annot.height *= inchToPointFactor;
|
||||
annot.left += leftInInch;
|
||||
annot.left *= inchToPointFactor;
|
||||
annot.top += topInInch;
|
||||
annot.top *= inchToPointFactor;
|
||||
}
|
||||
return annotParams;
|
||||
});
|
||||
.then(res => res.json());
|
||||
|
||||
for (var key in annotParams) {
|
||||
var annot = annotParams[key];
|
||||
annot.width *= inchToPointFactor;
|
||||
annot.height *= inchToPointFactor;
|
||||
annot.left += leftInInch - 0.7;
|
||||
annot.left *= inchToPointFactor;
|
||||
annot.top += topInInch - 0.5;
|
||||
annot.top *= inchToPointFactor;
|
||||
}
|
||||
return annotParams;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
async function setLangAsync(n,t){document.getElementById("selectedFlag").className="fi "+t+" me-2";await fetch(`/lang/${n}`,{method:"POST",headers:{"Content-Type":"application/json"}})}async function setLanguage(n){const t=await fetch("/lang",{method:"GET",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(t=>t.includes(n)).catch(()=>!1);if(t)return await fetch(`/lang/${n}`,{method:"POST",headers:{"Content-Type":"application/json"}}).then(n=>{if(n.redirected)window.location.href=n.url;else if(!n.ok)return Promise.reject("Failed to set language")})}async function logout(){return await fetch(`/auth/logout`,{method:"POST",headers:{"Content-Type":"application/json"}}).then(n=>{n.ok&&(window.location.href="/")})}function getAnnotationParams(n=0,t=0,i=72){return fetch(`${window.location.origin}/api/Config/Annotations`,{credentials:"include",method:"GET"}).then(n=>n.json()).then(r=>{var f,u;for(f in r)u=r[f],u.width*=i,u.height*=i,u.left+=n,u.left*=i,u.top+=t,u.top*=i;return r})}class Network{async getEnvelope(n){return this.getRequest(`/api/envelope/${n}`).then(this.wrapJsonResponse.bind(this))}async postEnvelope(n,t,i){return this.postRequest(`/api/envelope/${n}?index=${t}`,i).then(this.wrapJsonResponse.bind(this))}async getDocument(n,t){return this.getRequest(`/api/document/${n}?index=${t}`).then(this.wrapBinaryResponse.bind(this))}async openDocument(n){return this.postRequest(`/api/document/${n}`,{}).then(this.wrapJsonResponse.bind(this))}withCSRFToken(n){const t=getCSRFToken;let i=n.headers;return n.headers={...i,...t},n}getCSRFToken(){const n=document.getElementsByName("__RequestVerificationToken")[0].value;return{"X-XSRF-TOKEN":n}}getRequest(n){const t=this.getCSRFToken(),i={credentials:"include",method:"GET",headers:{...t}};return fetch(n,i)}postRequest(n,t){const i=this.getCSRFToken(),r={credentials:"include",method:"POST",headers:{...i,"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)};return fetch(n,r)}async wrapJsonResponse(n){return await this.wrapResponse(n,async n=>await n.json())}async wrapBinaryResponse(n){return await this.wrapResponse(n,async n=>await n.arrayBuffer())}async wrapResponse(n,t){let i;if(n.status===200){const r=await t(n);i=new WrappedResponse(r,null)}else if(n.status===403){const t=await n.json();i=new WrappedResponse(null,t)}else i=new WrappedResponse(null,null);return i}}class WrappedResponse{constructor(n,t){this.data=n;this.error=t;this.fatal=n===null&&t===null}}
|
||||
async function setLangAsync(n,t){document.getElementById("selectedFlag").className="fi "+t+" me-2";await fetch(`/lang/${n}`,{method:"POST",headers:{"Content-Type":"application/json"}})}async function setLanguage(n){const t=await fetch("/lang",{method:"GET",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(t=>t.includes(n)).catch(()=>!1);if(t)return await fetch(`/lang/${n}`,{method:"POST",headers:{"Content-Type":"application/json"}}).then(n=>{if(n.redirected)window.location.href=n.url;else if(!n.ok)return Promise.reject("Failed to set language")})}async function logout(){return await fetch(`/auth/logout`,{method:"POST",headers:{"Content-Type":"application/json"}}).then(n=>{n.ok&&(window.location.href="/")})}async function getAnnotationParams(n=0,t=0,i=72){var f,r;const u=await fetch(`${window.location.origin}/api/Config/Annotations`,{credentials:"include",method:"GET"}).then(n=>n.json());for(f in u)r=u[f],r.width*=i,r.height*=i,r.left+=n-.7,r.left*=i,r.top+=t-.5,r.top*=i;return u}class Network{async getEnvelope(n){return this.getRequest(`/api/envelope/${n}`).then(this.wrapJsonResponse.bind(this))}async postEnvelope(n,t,i){return this.postRequest(`/api/envelope/${n}?index=${t}`,i).then(this.wrapJsonResponse.bind(this))}async getDocument(n,t){return this.getRequest(`/api/document/${n}?index=${t}`).then(this.wrapBinaryResponse.bind(this))}async openDocument(n){return this.postRequest(`/api/document/${n}`,{}).then(this.wrapJsonResponse.bind(this))}withCSRFToken(n){const t=getCSRFToken;let i=n.headers;return n.headers={...i,...t},n}getCSRFToken(){const n=document.getElementsByName("__RequestVerificationToken")[0].value;return{"X-XSRF-TOKEN":n}}getRequest(n){const t=this.getCSRFToken(),i={credentials:"include",method:"GET",headers:{...t}};return fetch(n,i)}postRequest(n,t){const i=this.getCSRFToken(),r={credentials:"include",method:"POST",headers:{...i,"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)};return fetch(n,r)}async wrapJsonResponse(n){return await this.wrapResponse(n,async n=>await n.json())}async wrapBinaryResponse(n){return await this.wrapResponse(n,async n=>await n.arrayBuffer())}async wrapResponse(n,t){let i;if(n.status===200){const r=await t(n);i=new WrappedResponse(r,null)}else if(n.status===403){const t=await n.json();i=new WrappedResponse(null,t)}else i=new WrappedResponse(null,null);return i}}class WrappedResponse{constructor(n,t){this.data=n;this.error=t;this.fatal=n===null&&t===null}}
|
||||
Reference in New Issue
Block a user