Include new Messagebox for important messages
This commit is contained in:
parent
271a3d1157
commit
97a2f6815c
@ -1,4 +1,5 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports DigitalData.GUIs.Common
|
||||||
|
|
||||||
Public Class ClassIndexFunctions
|
Public Class ClassIndexFunctions
|
||||||
Public Shared Function FileExistsinDropTable(pFilename As String, pHandleType As String) As Date
|
Public Shared Function FileExistsinDropTable(pFilename As String, pHandleType As String) As Date
|
||||||
@ -56,8 +57,9 @@ Public Class ClassIndexFunctions
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function CheckDuplicateFiles(pFilepath As String, pModuleTitle As String, Optional pHandleType As String = "")
|
Public Shared Function CheckDuplicateFiles(pForm As Form, pFilepath As String, pModuleTitle As String, Optional pHandleType As String = "")
|
||||||
Dim oFileInfo As New FileInfo(pFilepath)
|
Dim oFileInfo As New FileInfo(pFilepath)
|
||||||
|
Dim oFormHelper As New FormHelper(LOGCONFIG, pForm)
|
||||||
Dim oFilename As String = oFileInfo.Name
|
Dim oFilename As String = oFileInfo.Name
|
||||||
Dim oFileExists As Date = FileExistsinDropTable(pFilepath, pHandleType)
|
Dim oFileExists As Date = FileExistsinDropTable(pFilepath, pHandleType)
|
||||||
|
|
||||||
@ -70,12 +72,14 @@ Public Class ClassIndexFunctions
|
|||||||
Dim oMessage As String
|
Dim oMessage As String
|
||||||
|
|
||||||
If USER_LANGUAGE = "de-DE" Then
|
If USER_LANGUAGE = "de-DE" Then
|
||||||
oMessage = $"Die Datei [{oFilename}] wurde bereits am [{oDate}] verarbeitet. Wollen Sie die gleiche Datei noch einmal verarbeiten?"
|
oMessage = $"Die Datei [{oFilename}] wurde bereits am [{oDate}] verarbeitet.{vbNewLine}{vbNewLine}Wollen Sie die gleiche Datei noch einmal verarbeiten?"
|
||||||
Else
|
Else
|
||||||
oMessage = $"The file [{oFilename}] has already been processed at [{oDate}]. Do you want to process the same file again?"
|
oMessage = $"The file [{oFilename}] has already been processed at [{oDate}].{vbNewLine}{vbNewLine}Do you want to process the same file again?"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
oResult = MessageBox.Show(oMessage, oBoxTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly)
|
|
||||||
|
oResult = oFormHelper.ShowQuestionMessage(oMessage, oBoxTitle)
|
||||||
|
'oResult = MessageBox.Show(oMessage, oBoxTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly)
|
||||||
|
|
||||||
If oResult = DialogResult.Yes Then
|
If oResult = DialogResult.Yes Then
|
||||||
Return True
|
Return True
|
||||||
|
|||||||
@ -7,6 +7,12 @@ Imports DigitalData.Modules.Messaging
|
|||||||
Imports DigitalData.Modules.Database
|
Imports DigitalData.Modules.Database
|
||||||
Imports DLLLicenseManager
|
Imports DLLLicenseManager
|
||||||
Public Class ClassInit
|
Public Class ClassInit
|
||||||
|
Private Form As Form
|
||||||
|
|
||||||
|
Public Sub New(pForm As Form)
|
||||||
|
Form = pForm
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Sub InitLogger()
|
Public Sub InitLogger()
|
||||||
LOGCONFIG = New LogConfig(LogConfig.PathType.AppData, Nothing, Nothing,
|
LOGCONFIG = New LogConfig(LogConfig.PathType.AppData, Nothing, Nothing,
|
||||||
CompanyName:=My.Application.Info.CompanyName,
|
CompanyName:=My.Application.Info.CompanyName,
|
||||||
@ -218,7 +224,7 @@ Public Class ClassInit
|
|||||||
'Die Datei übergeben
|
'Die Datei übergeben
|
||||||
LOGGER.Info(">> OnCreated-File:" & e.FullPath)
|
LOGGER.Info(">> OnCreated-File:" & e.FullPath)
|
||||||
|
|
||||||
If ClassIndexFunctions.CheckDuplicateFiles(e.FullPath, "FolderWatch/Scan") Then
|
If ClassIndexFunctions.CheckDuplicateFiles(Form, e.FullPath, "FolderWatch/Scan") Then
|
||||||
FILE_HANDLER.Decide_FileHandle(e.FullPath, oHandleType)
|
FILE_HANDLER.Decide_FileHandle(e.FullPath, oHandleType)
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|||||||
@ -12,6 +12,7 @@ Imports DevExpress.XtraEditors.Controls
|
|||||||
Imports Limilabs.Mail
|
Imports Limilabs.Mail
|
||||||
Imports Limilabs.Mail.Headers
|
Imports Limilabs.Mail.Headers
|
||||||
Imports DevExpress.XtraEditors
|
Imports DevExpress.XtraEditors
|
||||||
|
Imports DigitalData.GUIs.Common
|
||||||
|
|
||||||
Public Class frmIndex
|
Public Class frmIndex
|
||||||
#Region "+++++ Variablen ++++++"
|
#Region "+++++ Variablen ++++++"
|
||||||
@ -47,6 +48,7 @@ Public Class frmIndex
|
|||||||
Private Property DocTypes As New List(Of DocType)
|
Private Property DocTypes As New List(Of DocType)
|
||||||
|
|
||||||
Private ReadOnly _Logger As Logger
|
Private ReadOnly _Logger As Logger
|
||||||
|
Private ReadOnly _FormHelper As FormHelper
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@ -80,6 +82,7 @@ Public Class frmIndex
|
|||||||
|
|
||||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||||
_Logger = LOGCONFIG.GetLogger()
|
_Logger = LOGCONFIG.GetLogger()
|
||||||
|
_FormHelper = New FormHelper(LOGCONFIG, Me)
|
||||||
|
|
||||||
Localizer.Active = New LookupGridLocalizer()
|
Localizer.Active = New LookupGridLocalizer()
|
||||||
End Sub
|
End Sub
|
||||||
@ -2812,10 +2815,14 @@ Public Class frmIndex
|
|||||||
Me.Cursor = Cursors.Default
|
Me.Cursor = Cursors.Default
|
||||||
If CONFIG.Config.ShowIndexResult = True Then
|
If CONFIG.Config.ShowIndexResult = True Then
|
||||||
If USER_LANGUAGE = LANG_DE Then
|
If USER_LANGUAGE = LANG_DE Then
|
||||||
MsgBox("Die Datei wurde erfolgreich verarbeitet!" & vbNewLine & "Ablagepfad:" & vbNewLine & CURRENT_NEWFILENAME, MsgBoxStyle.Information, "Erfolgsmeldung")
|
' MsgBox("Die Datei wurde erfolgreich verarbeitet!" & vbNewLine & "Ablagepfad:" & vbNewLine & CURRENT_NEWFILENAME, MsgBoxStyle.Information, "Erfolgsmeldung")
|
||||||
|
_FormHelper.ShowSuccessMessage($"Die Datei wurde erfolgreich verarbeitet!{vbNewLine}Ablagepfad:{vbNewLine}{CURRENT_NEWFILENAME}", "Erfolgsmeldung")
|
||||||
Else
|
Else
|
||||||
MsgBox("File sucessfully processed!" & vbNewLine & "Path:" & vbNewLine & CURRENT_NEWFILENAME, MsgBoxStyle.Information, "Success")
|
'MsgBox($"File sucessfully processed!{vbNewLine}Path:{vbNewLine}{CURRENT_NEWFILENAME}" & vbNewLine & "Path:" & vbNewLine & CURRENT_NEWFILENAME, MsgBoxStyle.Information, "Success")
|
||||||
|
_FormHelper.ShowSuccessMessage($"File sucessfully processed!{vbNewLine}Path:{vbNewLine}{CURRENT_NEWFILENAME}", "Success")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CloseViewer()
|
CloseViewer()
|
||||||
|
|||||||
@ -50,7 +50,7 @@ Public NotInheritable Class frmSplash
|
|||||||
|
|
||||||
<STAThread()> _
|
<STAThread()> _
|
||||||
Private Sub bw_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs)
|
Private Sub bw_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs)
|
||||||
Dim Init = New ClassInit()
|
Dim Init = New ClassInit(Me)
|
||||||
|
|
||||||
bw.ReportProgress(CalcProgress(1), "Initialize Logging")
|
bw.ReportProgress(CalcProgress(1), "Initialize Logging")
|
||||||
Init.InitLogger()
|
Init.InitLogger()
|
||||||
|
|||||||
@ -7,6 +7,7 @@ Imports System.Runtime.InteropServices
|
|||||||
Imports DigitalData.Modules.Language
|
Imports DigitalData.Modules.Language
|
||||||
Imports DigitalData.Modules.Windows
|
Imports DigitalData.Modules.Windows
|
||||||
Imports DigitalData.Modules.License
|
Imports DigitalData.Modules.License
|
||||||
|
Imports DigitalData.GUIs.Common
|
||||||
|
|
||||||
Public Class frmStart
|
Public Class frmStart
|
||||||
Public LicenseManager As LicenseManagerLegacy
|
Public LicenseManager As LicenseManagerLegacy
|
||||||
@ -16,6 +17,7 @@ Public Class frmStart
|
|||||||
|
|
||||||
Private FileDrop As FileDrop
|
Private FileDrop As FileDrop
|
||||||
Private DroppedFiles As List(Of FileDrop.DroppedFile)
|
Private DroppedFiles As List(Of FileDrop.DroppedFile)
|
||||||
|
Private FormHelper As FormHelper
|
||||||
|
|
||||||
'Private DroppedFiles As List(Of FileDrop.DroppedFile)
|
'Private DroppedFiles As List(Of FileDrop.DroppedFile)
|
||||||
|
|
||||||
@ -37,7 +39,7 @@ Public Class frmStart
|
|||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
|
|
||||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||||
|
FormHelper = New FormHelper(LOGCONFIG, Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "=== FORM EVENTS ==="
|
#Region "=== FORM EVENTS ==="
|
||||||
@ -212,7 +214,7 @@ Public Class frmStart
|
|||||||
Dim oDropType = oDroppedFile.DropType
|
Dim oDropType = oDroppedFile.DropType
|
||||||
Dim oFileName = oDroppedFile.FilePath
|
Dim oFileName = oDroppedFile.FilePath
|
||||||
|
|
||||||
If ClassIndexFunctions.CheckDuplicateFiles(oFileName, "Manuelle Ablage", oDropType) Then
|
If ClassIndexFunctions.CheckDuplicateFiles(Me, oFileName, "Manuelle Ablage", oDropType) Then
|
||||||
FILE_HANDLER.Decide_FileHandle(oFileName, oDropType)
|
FILE_HANDLER.Decide_FileHandle(oFileName, oDropType)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@ -418,7 +420,7 @@ Public Class frmStart
|
|||||||
'Die Datei übergeben
|
'Die Datei übergeben
|
||||||
LOGGER.Info(">> Adding file from Scanfolder after startup:" & oFileName)
|
LOGGER.Info(">> Adding file from Scanfolder after startup:" & oFileName)
|
||||||
|
|
||||||
If ClassIndexFunctions.CheckDuplicateFiles(oFileName, "FolderWatch/Scan") Then
|
If ClassIndexFunctions.CheckDuplicateFiles(Me, oFileName, "FolderWatch/Scan") Then
|
||||||
FILE_HANDLER.Decide_FileHandle(oFileName, oHandleType)
|
FILE_HANDLER.Decide_FileHandle(oFileName, oHandleType)
|
||||||
End If
|
End If
|
||||||
Next oFileName
|
Next oFileName
|
||||||
@ -454,7 +456,7 @@ Public Class frmStart
|
|||||||
'Die Datei übergeben
|
'Die Datei übergeben
|
||||||
LOGGER.Info(">> Adding file from Folderwatch after startup:" & oFileName)
|
LOGGER.Info(">> Adding file from Folderwatch after startup:" & oFileName)
|
||||||
|
|
||||||
If ClassIndexFunctions.CheckDuplicateFiles(oFileName, "FolderWatch/Scan") Then
|
If ClassIndexFunctions.CheckDuplicateFiles(Me, oFileName, "FolderWatch/Scan") Then
|
||||||
FILE_HANDLER.Decide_FileHandle(oFileName, handleType)
|
FILE_HANDLER.Decide_FileHandle(oFileName, handleType)
|
||||||
End If
|
End If
|
||||||
Next oFileName
|
Next oFileName
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user