add logging for export button

This commit is contained in:
Jonathan Jenne 2023-11-24 10:33:47 +01:00
parent 6fa8f157a0
commit 55fc44ab45
2 changed files with 11 additions and 1 deletions

View File

@ -344,7 +344,7 @@
<value>DocumentViewerValidator</value> <value>DocumentViewerValidator</value>
</data> </data>
<data name="&gt;&gt;DocumentViewerValidator.Type" xml:space="preserve"> <data name="&gt;&gt;DocumentViewerValidator.Type" xml:space="preserve">
<value>DigitalData.Controls.DocumentViewer.DocumentViewer, DigitalData.Controls.DocumentViewer, Version=1.9.0.0, Culture=neutral, PublicKeyToken=null</value> <value>DigitalData.Controls.DocumentViewer.DocumentViewer, DigitalData.Controls.DocumentViewer, Version=1.9.2.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;DocumentViewerValidator.Parent" xml:space="preserve"> <data name="&gt;&gt;DocumentViewerValidator.Parent" xml:space="preserve">
<value>SplitContainer1.Panel2</value> <value>SplitContainer1.Panel2</value>

View File

@ -3609,6 +3609,7 @@ Public Class frmValidator
Catch ex As Exception Catch ex As Exception
End Try End Try
Try Try
If RibbonPageCustTitle <> "" Then If RibbonPageCustTitle <> "" Then
RibbonPageGroupCustom.Text = RibbonPageCustTitle RibbonPageGroupCustom.Text = RibbonPageCustTitle
@ -3618,18 +3619,26 @@ Public Class frmValidator
End If End If
If Not (IsNothing(WMDocPathWindows) And ActiveWorkflowType = ConstAHWorkflow_BlindFile) Then If Not (IsNothing(WMDocPathWindows) And ActiveWorkflowType = ConstAHWorkflow_BlindFile) Then
If ButtonExport2Folder_Caption <> "" And WMDocPathWindows <> "" Then If ButtonExport2Folder_Caption <> "" And WMDocPathWindows <> "" Then
Logger.Debug("Enabling Export2File, Caption set")
Logger.Debug("Button Caption: [{0}]", ButtonExport2Folder_Caption)
Logger.Debug("Export root folder: [{0}]", ButtonExport2Folder_RootFolder)
If File.Exists(WMDocPathWindows) Then If File.Exists(WMDocPathWindows) Then
Logger.Debug("File exists, Showing Export Button")
barbtnitmExport.Caption = ButtonExport2Folder_Caption barbtnitmExport.Caption = ButtonExport2Folder_Caption
barbtnitmExport.Visibility = BarItemVisibility.Always barbtnitmExport.Visibility = BarItemVisibility.Always
Try Try
If ButtonExport2Folder_RootFolder <> "" Then If ButtonExport2Folder_RootFolder <> "" Then
If Directory.Exists(ButtonExport2Folder_RootFolder) Then If Directory.Exists(ButtonExport2Folder_RootFolder) Then
If CONFIG.Config.LastExportPath <> String.Empty Then If CONFIG.Config.LastExportPath <> String.Empty Then
Logger.Debug("Last export path exists, using as default path")
FolderBrowserDialog1.SelectedPath = CONFIG.Config.LastExportPath FolderBrowserDialog1.SelectedPath = CONFIG.Config.LastExportPath
Else Else
FolderBrowserDialog1.SelectedPath = ButtonExport2Folder_RootFolder FolderBrowserDialog1.SelectedPath = ButtonExport2Folder_RootFolder
End If End If
Logger.Debug("Setting default export path to [{0}]", FolderBrowserDialog1.SelectedPath)
Else Else
Logger.Warn($"### Dis/Enabale Export2Path - RootFolder {ButtonExport2Folder_RootFolder} not existing or accessible!###") Logger.Warn($"### Dis/Enabale Export2Path - RootFolder {ButtonExport2Folder_RootFolder} not existing or accessible!###")
End If End If
@ -3642,6 +3651,7 @@ Public Class frmValidator
End If End If
End If End If
End If End If
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)
End Try End Try