Optimierung Speed Load_Next Document

This commit is contained in:
Developer01
2026-01-30 12:09:21 +01:00
parent 0e6848aa69
commit df4a8df25a
3 changed files with 149 additions and 80 deletions

View File

@@ -259,8 +259,8 @@ Partial Class frmValidator
'DocumentViewer1 'DocumentViewer1
' '
Me.DocumentViewer1.BackColor = System.Drawing.SystemColors.ControlLightLight Me.DocumentViewer1.BackColor = System.Drawing.SystemColors.ControlLightLight
Me.DocumentViewer1.FileLoaded = False
resources.ApplyResources(Me.DocumentViewer1, "DocumentViewer1") resources.ApplyResources(Me.DocumentViewer1, "DocumentViewer1")
Me.DocumentViewer1.FileLoaded = False
Me.DocumentViewer1.Name = "DocumentViewer1" Me.DocumentViewer1.Name = "DocumentViewer1"
Me.DocumentViewer1.Viewer_ForceTemporaryMode = False Me.DocumentViewer1.Viewer_ForceTemporaryMode = False
' '

View File

@@ -630,6 +630,9 @@
<data name="&gt;&gt;SplitContainer1.Panel1.ZOrder" xml:space="preserve"> <data name="&gt;&gt;SplitContainer1.Panel1.ZOrder" xml:space="preserve">
<value>0</value> <value>0</value>
</data> </data>
<data name="DocumentViewer1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="DocumentViewer1.Location" type="System.Drawing.Point, System.Drawing"> <data name="DocumentViewer1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value> <value>0, 0</value>
</data> </data>
@@ -637,7 +640,7 @@
<value>4, 4, 4, 4</value> <value>4, 4, 4, 4</value>
</data> </data>
<data name="DocumentViewer1.Size" type="System.Drawing.Size, System.Drawing"> <data name="DocumentViewer1.Size" type="System.Drawing.Size, System.Drawing">
<value>1121, 683</value> <value>669, 422</value>
</data> </data>
<data name="DocumentViewer1.TabIndex" type="System.Int32, mscorlib"> <data name="DocumentViewer1.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>

View File

@@ -126,6 +126,7 @@ Public Class frmValidator
Private frmMessages As frmValidator_Messages Private frmMessages As frmValidator_Messages
Private ReadOnly _SqlDataCache As New Dictionary(Of String, DataTable)(StringComparer.OrdinalIgnoreCase) Private ReadOnly _SqlDataCache As New Dictionary(Of String, DataTable)(StringComparer.OrdinalIgnoreCase)
Private ReadOnly _SqlScalarCache As New Dictionary(Of String, Object)(StringComparer.OrdinalIgnoreCase) Private ReadOnly _SqlScalarCache As New Dictionary(Of String, Object)(StringComparer.OrdinalIgnoreCase)
Private _SqlControlsByGuid As Dictionary(Of Integer, List(Of DataRow))
Private Class Translation_Strings Private Class Translation_Strings
Inherits My.Resources.frmValidator_Strings Inherits My.Resources.frmValidator_Strings
End Class End Class
@@ -749,6 +750,35 @@ Public Class frmValidator
End Try End Try
End Sub End Sub
Private Sub EnsureSqlControlLookup()
If _SqlControlsByGuid IsNot Nothing Then
Return
End If
_SqlControlsByGuid = New Dictionary(Of Integer, List(Of DataRow))()
If DTCONTROLS_WITH_SQL Is Nothing OrElse DTCONTROLS_WITH_SQL.Rows.Count = 0 Then
Return
End If
For Each row As DataRow In DTCONTROLS_WITH_SQL.Rows
If row.ItemEx("PROFIL_ID", 0) <> CURRENT_ProfilGUID Then
Continue For
End If
Dim controlId As Integer
If Not Integer.TryParse(row.Item("GUID").ToString(), controlId) Then
Continue For
End If
Dim list As List(Of DataRow) = Nothing
If Not _SqlControlsByGuid.TryGetValue(controlId, list) Then
list = New List(Of DataRow)()
_SqlControlsByGuid(controlId) = list
End If
list.Add(row)
Next
End Sub
Sub LoadSQLData(control As Control, pControlId As Integer) Sub LoadSQLData(control As Control, pControlId As Integer)
Try Try
If TypeOf control Is Label Then If TypeOf control Is Label Then
@@ -757,14 +787,14 @@ Public Class frmValidator
MyValidationLogger.Debug($"in LoadSQLData for ControlID [{pControlId}]...") MyValidationLogger.Debug($"in LoadSQLData for ControlID [{pControlId}]...")
Dim oDTforControl As DataTable = DTCONTROLS_WITH_SQL.Clone() EnsureSqlControlLookup()
Dim oExpression = $"GUID = {pControlId} AND PROFIL_ID = {CURRENT_ProfilGUID}"
DTCONTROLS_WITH_SQL.Select(oExpression).CopyToDataTable(oDTforControl, LoadOption.PreserveChanges)
If IsNothing(oDTforControl) Then Exit Sub Dim rows As List(Of DataRow) = Nothing
If oDTforControl.Rows.Count = 0 Then Exit Sub If _SqlControlsByGuid Is Nothing OrElse Not _SqlControlsByGuid.TryGetValue(pControlId, rows) Then
Exit Sub
End If
For Each row As DataRow In oDTforControl.Rows For Each row As DataRow In rows
Dim name As String = row.Item("NAME") Dim name As String = row.Item("NAME")
Dim oGUID As String = row.Item("GUID") Dim oGUID As String = row.Item("GUID")
Dim oReadOnly As Boolean = row.Item("READ_ONLY") Dim oReadOnly As Boolean = row.Item("READ_ONLY")
@@ -787,12 +817,12 @@ Public Class frmValidator
Dim oSQLStatement As String = row.Item("SQL_UEBERPRUEFUNG") Dim oSQLStatement As String = row.Item("SQL_UEBERPRUEFUNG")
Dim oConnectionId As Integer = row.Item("CONNECTION_ID") Dim oConnectionId As Integer = row.Item("CONNECTION_ID")
If IsNothing(oSQLStatement) Then If String.IsNullOrWhiteSpace(oSQLStatement) Then
Continue For Continue For
End If End If
oSQLStatement = clsPatterns.ReplaceAllValues(oSQLStatement, PanelValidatorControl, True) oSQLStatement = clsPatterns.ReplaceAllValues(oSQLStatement, PanelValidatorControl, True)
If IsNothing(oSQLStatement) Then If String.IsNullOrWhiteSpace(oSQLStatement) Then
Continue For Continue For
End If End If
If clsPatterns.HasComplexPatterns(oSQLStatement) Then If clsPatterns.HasComplexPatterns(oSQLStatement) Then
@@ -800,18 +830,9 @@ Public Class frmValidator
Continue For Continue For
End If End If
Dim oDTContent As DataTable = Nothing Dim oDTContent As DataTable = GetCachedDatatable(oSQLStatement, oConnectionId)
Dim cacheKey = $"{oConnectionId}|{oSQLStatement}" If oDTContent Is Nothing OrElse oDTContent.Rows.Count = 0 Then
Continue For
If Not _SqlDataCache.TryGetValue(cacheKey, oDTContent) Then
oDTContent = DatabaseFallback.GetDatatable(New GetDatatableOptions(oSQLStatement, DatabaseType.ECM) With {
.ConnectionId = oConnectionId
})
If IsNothing(oDTContent) Then
MyValidationLogger.Warn($"SQL-Query [{oSQLStatement}] for control {control.Name} is invalid.")
Exit Sub
End If
_SqlDataCache(cacheKey) = oDTContent
End If End If
Dim oValue Dim oValue
@@ -824,7 +845,6 @@ Public Class frmValidator
lookup.Properties.ValueMember = oDTContent.Columns.Item(0).ColumnName lookup.Properties.ValueMember = oDTContent.Columns.Item(0).ColumnName
lookup.Properties.DisplayMember = oDTContent.Columns.Item(0).ColumnName lookup.Properties.DisplayMember = oDTContent.Columns.Item(0).ColumnName
Catch ex As Exception Catch ex As Exception
MyValidationLogger.Warn("Error in LookUpLoadSQLData: " & ex.Message) MyValidationLogger.Warn("Error in LookUpLoadSQLData: " & ex.Message)
End Try End Try
@@ -838,7 +858,6 @@ Public Class frmValidator
oValue = value oValue = value
Catch ex As Exception Catch ex As Exception
MyValidationLogger.Warn("Error in TextBoxLoadSQLData: " & ex.Message) MyValidationLogger.Warn("Error in TextBoxLoadSQLData: " & ex.Message)
End Try End Try
ElseIf TypeOf control Is Windows.Forms.ComboBox Then ElseIf TypeOf control Is Windows.Forms.ComboBox Then
Try Try
@@ -863,10 +882,12 @@ Public Class frmValidator
Dim dataGridView As GridControl = control Dim dataGridView As GridControl = control
Dim oDataSource As DataTable = dataGridView.DataSource Dim oDataSource As DataTable = dataGridView.DataSource
If oDataSource Is Nothing OrElse oDataSource.Rows.Count = 0 Then If oDataSource Is Nothing Then
Dim oDatatable As DataTable = oDTContent.Clone() oDataSource = oDTContent.Clone()
End If
For Each oColumn As DataColumn In oDatatable.Columns If oDataSource.Rows.Count = 0 Then
For Each oColumn As DataColumn In oDTContent.Columns
If oDataSource.Columns(oColumn.ColumnName) Is Nothing Then If oDataSource.Columns(oColumn.ColumnName) Is Nothing Then
oDataSource.Columns.Add(oColumn.ColumnName, oColumn.DataType) oDataSource.Columns.Add(oColumn.ColumnName, oColumn.DataType)
End If End If
@@ -2784,8 +2805,17 @@ Public Class frmValidator
Sub Load_Next_Document(first As Boolean) Sub Load_Next_Document(first As Boolean)
Dim perfStart As DateTime = DateTime.MinValue
Dim perfLastCheck As DateTime = DateTime.MinValue
If LOG_HOTSPOTS Then
perfStart = DateTime.Now
perfLastCheck = perfStart
MyValidationLogger.Info("[PERF] Load_Next_Document START")
End If
_SqlDataCache.Clear() _SqlDataCache.Clear()
_SqlScalarCache.Clear() _SqlScalarCache.Clear()
_SqlControlsByGuid = Nothing
CURRENT_WMFILE = Nothing CURRENT_WMFILE = Nothing
activate_controls(False) activate_controls(False)
oErrMsgMissingInput = "" oErrMsgMissingInput = ""
@@ -2793,9 +2823,10 @@ Public Class frmValidator
Override = False Override = False
OverrideAll = False OverrideAll = False
'Me.lblerror.Visible = False
_Indexe_Loaded = False _Indexe_Loaded = False
MyValidationLogger.Debug("In Load_Next_Document") MyValidationLogger.Debug("In Load_Next_Document")
Dim layoutSuspended As Boolean = False
Try Try
If first = True Then If first = True Then
MyValidationLogger.Debug("First Document") MyValidationLogger.Debug("First Document")
@@ -2804,17 +2835,12 @@ Public Class frmValidator
MyValidationLogger.Debug("Following Document ") MyValidationLogger.Debug("Following Document ")
End If End If
' Controls nicht beim ersten Laden leeren
If first = False Then If first = False Then
PanelValidatorControl.SuspendLayout()
layoutSuspended = True
Clear_all_Input() Clear_all_Input()
End If End If
'Select Case navtype
' Case "next"
' Case "previous"
' Case "first"
' Case "last"
'End Select
MyValidationLogger.Debug($"CURRENT_JUMP_DOC_GUID: {CURRENT_JUMP_DOC_GUID}'") MyValidationLogger.Debug($"CURRENT_JUMP_DOC_GUID: {CURRENT_JUMP_DOC_GUID}'")
If CURRENT_JUMP_DOC_GUID = 0 Then If CURRENT_JUMP_DOC_GUID = 0 Then
CURRENT_DOC_GUID = Get_Next_GUID() CURRENT_DOC_GUID = Get_Next_GUID()
@@ -2822,11 +2848,23 @@ Public Class frmValidator
ElseIf first = False Then ElseIf first = False Then
CURRENT_DOC_GUID = 0 CURRENT_DOC_GUID = 0
End If End If
If LOG_HOTSPOTS Then
MyValidationLogger.Info($"[PERF] Nach Get_Next_GUID: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
perfLastCheck = DateTime.Now
End If
MyValidationLogger.Info("LoadNextDocument - Dokument-GUID: '" & CURRENT_DOC_GUID.ToString & "'") MyValidationLogger.Info("LoadNextDocument - Dokument-GUID: '" & CURRENT_DOC_GUID.ToString & "'")
If CURRENT_DOC_GUID > 0 Then If CURRENT_DOC_GUID > 0 Then
If (OPERATION_MODE_FS = ClassConstants.OpModeFS_PWM Or OPERATION_MODE_FS = ClassConstants.OpModeFS_IDBWM) And GetDocPathWindows(0) = False Then If (OPERATION_MODE_FS = ClassConstants.OpModeFS_PWM Or OPERATION_MODE_FS = ClassConstants.OpModeFS_IDBWM) And GetDocPathWindows(0) = False Then
SetStatusLabel($"File not accessible: {DocPathWindows}", "DarkOrange") SetStatusLabel($"File not accessible: {DocPathWindows}", "DarkOrange")
End If End If
If LOG_HOTSPOTS Then
MyValidationLogger.Info($"[PERF] Nach GetDocPathWindows: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
perfLastCheck = DateTime.Now
End If
If IDB_ACTIVE = False Then If IDB_ACTIVE = False Then
If CreateWMObject() = False Then If CreateWMObject() = False Then
Exit Sub Exit Sub
@@ -2843,17 +2881,22 @@ Public Class frmValidator
End If End If
End If End If
' >> >> >> >> >> >>##### Das Dokument in Bearbeitung nehmen ########################### If LOG_HOTSPOTS Then
'PRTF_PROFILE_FILES_WORK("InWork") MyValidationLogger.Info($"[PERF] Nach CreateWMObject/Load_IDB_DOC_DATA: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
perfLastCheck = DateTime.Now
End If
Dim sql = $"UPDATE TBPM_PROFILE_FILES Set IN_WORK = 1, IN_WORK_WHEN = GETDATE(), WORK_USER = '{USER_USERNAME}' WHERE GUID = {CURRENT_DOC_GUID}" Dim sql = $"UPDATE TBPM_PROFILE_FILES Set IN_WORK = 1, IN_WORK_WHEN = GETDATE(), WORK_USER = '{USER_USERNAME}' WHERE GUID = {CURRENT_DOC_GUID}"
DatabaseFallback.ExecuteNonQueryECM(sql) DatabaseFallback.ExecuteNonQueryECM(sql)
' ############ Infos eintragen ################# If LOG_HOTSPOTS Then
MyValidationLogger.Info($"[PERF] Nach IN_WORK-UPDATE: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
perfLastCheck = DateTime.Now
End If
If Amount_Docs2Validate > 1 Then If Amount_Docs2Validate > 1 Then
Dim omsg = String.Format(Translation_Strings.Verbleibende_Vorgänge___0_, Amount_Docs2Validate) Dim omsg = String.Format(Translation_Strings.Verbleibende_Vorgänge___0_, Amount_Docs2Validate)
bsiInformation.Caption = omsg bsiInformation.Caption = omsg
bsiInformation.Caption = omsg bsiInformation.Caption = omsg
If RbnPgGrpActions.Visible = False Then If RbnPgGrpActions.Visible = False Then
RbnPgGrpActions.Visible = True RbnPgGrpActions.Visible = True
@@ -2872,21 +2915,21 @@ Public Class frmValidator
MyValidationLogger.Debug("AllDocInfo created...") MyValidationLogger.Debug("AllDocInfo created...")
If IDB_ACTIVE = False Then If IDB_ACTIVE = False Then
oErrMsgMissingInput = Windream_get_Doc_info() oErrMsgMissingInput = Windream_get_Doc_info()
Else End If
' oErrorMessage = IDB_GetDocInfo()
If LOG_HOTSPOTS Then
MyValidationLogger.Info($"[PERF] Nach Windream_get_Doc_info: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
perfLastCheck = DateTime.Now
End If End If
Dim oCurrency As String Dim oCurrency As String
If PROFIL_CURRENCY_ATTRIBUTE <> "" Then If PROFIL_CURRENCY_ATTRIBUTE <> "" Then
oCurrency = GetVariableValuefromSource(PROFIL_CURRENCY_ATTRIBUTE, 1, False) oCurrency = GetVariableValuefromSource(PROFIL_CURRENCY_ATTRIBUTE, 1, False)
MyValidationLogger.Debug(String.Format("Read oCurrency from Attribute: {0} is {1}", PROFIL_CURRENCY_ATTRIBUTE, oCurrency))
Else Else
oCurrency = "EUR" oCurrency = "EUR"
MyValidationLogger.Debug(String.Format("oCurrency by default is {0}", oCurrency))
End If End If
If Not IsNothing(oCurrency) Then If Not IsNothing(oCurrency) Then
DocCurrency = oCurrency DocCurrency = oCurrency
Dim oValueType = DocCurrency.GetType.ToString
If IsDBNull(DocCurrency) Then If IsDBNull(DocCurrency) Then
DocCurrency = "EUR" DocCurrency = "EUR"
Else Else
@@ -2897,33 +2940,55 @@ Public Class frmValidator
DocCurrency = "EUR" DocCurrency = "EUR"
End Try End Try
End If End If
Else
MyValidationLogger.Warn($"oCurrency is Nothing - Check PROFIL_CURRENCY_ATTRIBUTE! ")
End If End If
If oErrMsgMissingInput = "" Then If oErrMsgMissingInput = "" Then
If WMDocPathWindows <> String.Empty Or OPERATION_MODE_FS = ClassConstants.OpModeFS_ZF Then If WMDocPathWindows <> String.Empty Or OPERATION_MODE_FS = ClassConstants.OpModeFS_ZF Then
MyValidationLogger.Debug($"Operationmode is {ClassConstants.OpModeFS_ZF}! Initializing Viewer ...")
LoadDocument_DDViewer() LoadDocument_DDViewer()
MyValidationLogger.Debug("Viewer loaded!!")
If Current_Document.Extension <> "pdf" Then If Current_Document.Extension <> "pdf" Then
bbtniAnnotation.Visibility = BarItemVisibility.Never bbtniAnnotation.Visibility = BarItemVisibility.Never
End If End If
End If End If
If LOG_HOTSPOTS Then
MyValidationLogger.Info($"[PERF] Nach LoadDocument_DDViewer: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
perfLastCheck = DateTime.Now
End If
FillIndexValues(first) FillIndexValues(first)
For Each oControl As Control In PanelValidatorControl.Controls If LOG_HOTSPOTS Then
LoadSQLData(oControl, DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid) MyValidationLogger.Info($"[PERF] Nach FillIndexValues: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
Next perfLastCheck = DateTime.Now
End If
MyValidationLogger.Debug("Indexmask loaded") Dim sqlControls As DataRow() = Nothing
If DTCONTROLS_WITH_SQL IsNot Nothing AndAlso DTCONTROLS_WITH_SQL.Rows.Count > 0 Then
sqlControls = DTCONTROLS_WITH_SQL.Select($"PROFIL_ID = {CURRENT_ProfilGUID}")
End If
If sqlControls IsNot Nothing AndAlso sqlControls.Length > 0 Then
Dim sqlControlIds As New HashSet(Of Integer)()
For Each r As DataRow In sqlControls
Dim controlId As Integer = 0
If Integer.TryParse(r.Item("GUID").ToString, controlId) Then
sqlControlIds.Add(controlId)
End If
Next
For Each oControl As Control In PanelValidatorControl.Controls
Dim controlId = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid
If sqlControlIds.Contains(controlId) Then
LoadSQLData(oControl, controlId)
End If
Next
End If
If LOG_HOTSPOTS Then
MyValidationLogger.Info($"[PERF] Nach LoadSQLData-Loop: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
perfLastCheck = DateTime.Now
End If
'Nun loggen das das Profil geladen wurde
If PROFIL_LOGINDEX <> "" Then If PROFIL_LOGINDEX <> "" Then
Dim oLogString = $"PMProfile loaded: [{CURRENT_ProfilGUID}-{CURRENT_ProfilName}]{PMDelimiter}{USER_USERNAME}{PMDelimiter}{Now.ToString}" Dim oLogString = $"PMProfile loaded: [{CURRENT_ProfilGUID}-{CURRENT_ProfilName}]{PMDelimiter}{USER_USERNAME}{PMDelimiter}{Now.ToString}"
If IDB_ACTIVE = False Then If IDB_ACTIVE = False Then
@@ -2951,19 +3016,14 @@ Public Class frmValidator
Me.Close() Me.Close()
End If End If
End If End If
Try Try
If DocCurrency <> String.Empty Then If DocCurrency <> String.Empty Then
If DocCurrency.ToString.Length <> 3 Then If DocCurrency.ToString.Length <> 3 Then
MyValidationLogger.Info("DocCurrency-Length = 3 - Setting to EUR")
DocCurrency = "EUR" DocCurrency = "EUR"
End If End If
MyValidationLogger.Debug($"DocCurrency = {DocCurrency}")
For Each oControl As Control In PanelValidatorControl.Controls For Each oControl As Control In PanelValidatorControl.Controls
Try Try
Dim oMeta = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata)
If TypeOf oControl Is GridControl Then If TypeOf oControl Is GridControl Then
Dim oGrid As GridControl = DirectCast(oControl, GridControl) Dim oGrid As GridControl = DirectCast(oControl, GridControl)
Dim oControlMeta = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata) Dim oControlMeta = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata)
@@ -2978,48 +3038,47 @@ Public Class frmValidator
settings.MaskExpression = "c" settings.MaskExpression = "c"
settings.Culture = oCultureInfo settings.Culture = oCultureInfo
End Sub) End Sub)
riTextEdit.UseMaskAsDisplayFormat = True 'Optional riTextEdit.UseMaskAsDisplayFormat = True
oGrid.RepositoryItems.Add(riTextEdit) oGrid.RepositoryItems.Add(riTextEdit)
Dim oGridView As GridView = DirectCast(oGrid.FocusedView, GridView) Dim oGridView As GridView = DirectCast(oGrid.FocusedView, GridView)
For Each oCol As GridColumn In oGridView.Columns For Each oCol As GridColumn In oGridView.Columns
Dim oColumnData As DataRow = oFilteredDatatable. Dim oColumnData As DataRow = oFilteredDatatable.Select($"SPALTENNAME = '{oCol.FieldName}'").FirstOrDefault()
Select($"SPALTENNAME = '{oCol.FieldName}'").
FirstOrDefault()
If oColumnData Is Nothing Then If oColumnData Is Nothing Then
Continue For Continue For
End If End If
Dim oColumnType As String = oColumnData.Item("TYPE_COLUMN") Dim oColumnType As String = oColumnData.Item("TYPE_COLUMN")
If oColumnType = "CURRENCY" Then
Select Case oColumnType oCol.DisplayFormat.FormatType = FormatType.Custom
Case "CURRENCY" oCol.ColumnEdit = riTextEdit
Console.WriteLine("CurrencyFormatNecessary") End If
oCol.DisplayFormat.FormatType = FormatType.Custom
oCol.ColumnEdit = riTextEdit
End Select
Next Next
End If End If
Catch ex As Exception Catch ex As Exception
MyValidationLogger.Error(ex) MyValidationLogger.Error(ex)
End Try End Try
Next Next
Else
MyValidationLogger.Warn($"DocCurrency is String.empty! ")
End If End If
Catch ex As Exception Catch ex As Exception
MyValidationLogger.Warn($"Unexpected error in display format Currency: " & ex.Message) MyValidationLogger.Warn($"Unexpected error in display format Currency: " & ex.Message)
End Try End Try
Try
If LOG_HOTSPOTS Then
MyValidationLogger.Info($"[PERF] Nach Currency-Format: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
perfLastCheck = DateTime.Now
End If
Try
Show_WF_Messages(False) Show_WF_Messages(False)
Catch ex As Exception Catch ex As Exception
MyValidationLogger.Error(ex) MyValidationLogger.Error(ex)
End Try End Try
Controls2B_EnDisabled() Controls2B_EnDisabled()
If LOG_HOTSPOTS Then
MyValidationLogger.Info($"[PERF] Nach Show_WF_Messages + Controls2B_EnDisabled: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
End If
MyValidationLogger.Debug("frmValidator: LoadNextDocument finished!") MyValidationLogger.Debug("frmValidator: LoadNextDocument finished!")
Catch ex As Exception Catch ex As Exception
MyValidationLogger.Error(ex) MyValidationLogger.Error(ex)
@@ -3027,6 +3086,13 @@ Public Class frmValidator
My.Settings.Save() My.Settings.Save()
MyValidationLogger.Info("unexpected error in Load_Next_Document: " & ex.Message) MyValidationLogger.Info("unexpected error in Load_Next_Document: " & ex.Message)
frmError.ShowDialog() frmError.ShowDialog()
Finally
If layoutSuspended Then
PanelValidatorControl.ResumeLayout()
End If
If LOG_HOTSPOTS Then
MyValidationLogger.Info($"[PERF] Load_Next_Document GESAMT: {(DateTime.Now - perfStart).TotalMilliseconds}ms")
End If
End Try End Try
End Sub End Sub
Sub Show_WF_Messages(pShow As Boolean) Sub Show_WF_Messages(pShow As Boolean)