diff --git a/EnvelopeGenerator.Common/Jobs/FinalizeDocument/FinalizeDocumentJob.vb b/EnvelopeGenerator.Common/Jobs/FinalizeDocument/FinalizeDocumentJob.vb index a3bba2b3..9b4feb68 100644 --- a/EnvelopeGenerator.Common/Jobs/FinalizeDocument/FinalizeDocumentJob.vb +++ b/EnvelopeGenerator.Common/Jobs/FinalizeDocument/FinalizeDocumentJob.vb @@ -114,11 +114,7 @@ Namespace Jobs If Config.ExportPath_DMZ <> String.Empty Then Logger.Debug("RuninDMZ - Using ExportPath_DMZ: [{0}] - Overwrite ExportPath", Config.ExportPath_DMZ) Config.ExportPath = Config.ExportPath_DMZ - Else - Config.ExportPath = Config.ExportPath End If - Else - Config.ExportPath = Config.ExportPath End If Logger.Debug("ExportPath: [{0}]", Config.ExportPath) @@ -138,7 +134,10 @@ Namespace Jobs Cast(Of Integer). ToList() - Logger.Info("Found [{0}] completed envelopes.", oEnvelopeIds.Count) + If oEnvelopeIds.Count > 0 Then + Logger.Info("Found [{0}] completed envelopes.", oEnvelopeIds.Count) + End If + Dim oTotal As Integer = oEnvelopeIds.Count Dim oCurrent As Integer = 1 @@ -157,16 +156,16 @@ Namespace Jobs Logger.Debug("Loading Envelope Data..") Dim oEnvelopeData = GetEnvelopeData(oId) - If Config.DOCUMENT_PATH_MOVE_AFTSEND <> String.Empty Then - oEnvelopeData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DOCUMENT_PATH_MOVE_AFTSEND) - Logger.Debug("Replaced Path in oEnvelopeData.DocumentPath!") - End If + If oEnvelopeData Is Nothing Then Logger.Warn("EnvelopeData could not be loaded for Id [{0}]!", oId) Throw New ArgumentNullException("EnvelopeData") End If - + If Config.DOCUMENT_PATH_MOVE_AFTSEND <> String.Empty Then + oEnvelopeData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DOCUMENT_PATH_MOVE_AFTSEND) + Logger.Debug("Replaced Path in oEnvelopeData.DocumentPath!") + End If Logger.Debug("Burning Annotations to pdf ...") Dim oBurnedDocument As Byte() = BurnAnnotationsToPdf(oEnvelopeData) If oBurnedDocument Is Nothing Then @@ -242,7 +241,7 @@ Namespace Jobs Next - Logger.Info("Completed job {0} successfully!", JobId) + Logger.Debug("Completed job {0} successfully!", JobId) Catch ex As MergeDocumentException Logger.Warn("Certificate Document job failed at step: Merging documents!") Logger.Error(ex) @@ -366,22 +365,24 @@ Namespace Jobs End If End Function - Private Function BurnAnnotationsToPdf(pData As EnvelopeData) As Byte() - Dim pEnvelopeId = pData.EnvelopeId + Private Function BurnAnnotationsToPdf(pEnvelopeData As EnvelopeData) As Byte() + Dim pEnvelopeId = pEnvelopeData.EnvelopeId - Logger.Info("Burning [{0}] signatures", pData.AnnotationData.Count) - Dim oAnnotations = pData.AnnotationData + Logger.Info($"Burning [{pEnvelopeData.AnnotationData.Count}] signatures") + Dim oAnnotations = pEnvelopeData.AnnotationData Dim oInputPath = "" If My.Settings.RuninDMZ Then - oInputPath = pData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DocumentPath) - Logger.Debug("Replaced Path in pData.DocumentPath!") + Logger.Debug("Replacing Path in pData.DocumentPath ...") + oInputPath = pEnvelopeData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DocumentPath) ElseIf Config.DOCUMENT_PATH_MOVE_AFTSEND <> String.Empty Then - oInputPath = pData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DOCUMENT_PATH_MOVE_AFTSEND) - Logger.Debug("Replaced Path in pData.DocumentPath!") + Logger.Debug("Replacing Path in pData.DocumentPath ...") + oInputPath = pEnvelopeData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DOCUMENT_PATH_MOVE_AFTSEND) + Else + oInputPath = pEnvelopeData.DocumentPath End If - Logger.Info("Input path: [{0}]", oInputPath) + Logger.Info($"Input path: [{oInputPath}]") Dim oDirectorySource As String = Path.GetDirectoryName(oInputPath) Dim split As String() = oDirectorySource.Split("\") ParentFolderUID = split(split.Length - 1) diff --git a/EnvelopeGenerator.Form/My Project/Application.Designer.vb b/EnvelopeGenerator.Form/My Project/Application.Designer.vb index bcb21872..b1785d9e 100644 --- a/EnvelopeGenerator.Form/My Project/Application.Designer.vb +++ b/EnvelopeGenerator.Form/My Project/Application.Designer.vb @@ -24,7 +24,7 @@ Namespace My _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) - Me.IsSingleInstance = false + Me.IsSingleInstance = true Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses @@ -34,5 +34,11 @@ Namespace My Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.EnvelopeGenerator.Form.frmSplashScreen End Sub + + _ + Protected Overrides Function OnInitialize(ByVal commandLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String)) As Boolean + Me.MinimumSplashScreenDisplayTime = 0 + Return MyBase.OnInitialize(commandLineArgs) + End Function End Class End Namespace diff --git a/EnvelopeGenerator.Form/My Project/Application.myapp b/EnvelopeGenerator.Form/My Project/Application.myapp index baa25a00..d6d2e5f3 100644 --- a/EnvelopeGenerator.Form/My Project/Application.myapp +++ b/EnvelopeGenerator.Form/My Project/Application.myapp @@ -2,9 +2,11 @@ true frmSplashScreen - false + true 0 true 0 + 0 true + false \ No newline at end of file diff --git a/EnvelopeGenerator.Form/frmMain.vb b/EnvelopeGenerator.Form/frmMain.vb index d23053e5..902b88cc 100644 --- a/EnvelopeGenerator.Form/frmMain.vb +++ b/EnvelopeGenerator.Form/frmMain.vb @@ -351,5 +351,6 @@ Public Class frmMain Else BarCheckItem1.Checked = False End If + RefreshTimer.Start() End Sub End Class \ No newline at end of file diff --git a/EnvelopeGenerator.Service/EnvelopeGenerator.Service.vbproj b/EnvelopeGenerator.Service/EnvelopeGenerator.Service.vbproj index 85a7395e..0c6767b9 100644 --- a/EnvelopeGenerator.Service/EnvelopeGenerator.Service.vbproj +++ b/EnvelopeGenerator.Service/EnvelopeGenerator.Service.vbproj @@ -156,6 +156,9 @@ ProjectInstaller.vb Designer + + Service.vb + diff --git a/EnvelopeGenerator.Service/My Project/AssemblyInfo.vb b/EnvelopeGenerator.Service/My Project/AssemblyInfo.vb index b8a34bf4..94cf9c00 100644 --- a/EnvelopeGenerator.Service/My Project/AssemblyInfo.vb +++ b/EnvelopeGenerator.Service/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/EnvelopeGenerator.Service/Service.Designer.vb b/EnvelopeGenerator.Service/Service.Designer.vb index e5973b23..aac70919 100644 --- a/EnvelopeGenerator.Service/Service.Designer.vb +++ b/EnvelopeGenerator.Service/Service.Designer.vb @@ -41,8 +41,11 @@ Partial Class Service ' Das Bearbeiten mit dem Code-Editor ist nicht möglich. Private Sub InitializeComponent() - components = New System.ComponentModel.Container() + ' + 'Service + ' Me.ServiceName = "EnvelopeGenerator.Service" + End Sub End Class diff --git a/EnvelopeGenerator.Service/Service.resx b/EnvelopeGenerator.Service/Service.resx new file mode 100644 index 00000000..e5858cc2 --- /dev/null +++ b/EnvelopeGenerator.Service/Service.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/EnvelopeGenerator.Service/Service.vb b/EnvelopeGenerator.Service/Service.vb index 6884c2cc..a1d93ad3 100644 --- a/EnvelopeGenerator.Service/Service.vb +++ b/EnvelopeGenerator.Service/Service.vb @@ -48,7 +48,7 @@ Public Class Service Throw New ApplicationException("Database connection could not be established!") End If - Dim oKey = Database.GetScalarValue("SELECT LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE NAME = 'GDPICTURE'") + Dim oKey = Database.GetScalarValue("SELECT LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE NAME = 'GDPICTURE' and ACTIVE = 1") If String.IsNullOrWhiteSpace(oKey) Then Throw New ApplicationException("GDPicture License could not be loaded!")