MS
This commit is contained in:
@@ -17,7 +17,6 @@ Imports DigitalData.Modules.Patterns
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DevExpress.XtraSplashScreen
|
||||
Imports DigitalData.GUIs.Common
|
||||
|
||||
Public Class frmGlobix_Index
|
||||
#Region "+++++ Variablen ++++++"
|
||||
Private ReadOnly LogConfig As LogConfig
|
||||
@@ -52,6 +51,7 @@ Public Class frmGlobix_Index
|
||||
'End Class
|
||||
|
||||
#End Region
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig)
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
@@ -185,8 +185,9 @@ Public Class frmGlobix_Index
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Unexpected error DTTBGI_REGEX_DOCTYPE - ErrorMessage: " & vbNewLine & ex.Message)
|
||||
|
||||
Me.Visible = False
|
||||
FormHelper.ShowErrorMessage(ex, "Laden des Formulars")
|
||||
Me.Visible = True
|
||||
Finally
|
||||
SplashScreenManager.CloseOverlayForm(OverlayHandle)
|
||||
FormLoaded = True
|
||||
@@ -275,7 +276,9 @@ Public Class frmGlobix_Index
|
||||
Try
|
||||
DocumentViewer1.LoadFile(My.Application.Globix.CurrentWorkfile.FilePath)
|
||||
Catch ex As Exception
|
||||
Me.Visible = False
|
||||
FormHelper.ShowErrorMessage(ex, "Laden der Vorschau")
|
||||
Me.Visible = True
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -329,7 +332,9 @@ INNER JOIN IDB.dbo.VWIDB_DOCTYPE_LANGUAGE DL ON DT.IDB_DOCTYPE_ID = DL.Doctype_I
|
||||
|
||||
DocTypes = oDocTypes
|
||||
Catch ex As Exception
|
||||
Me.Visible = False
|
||||
FormHelper.ShowErrorMessage(ex, "Laden des Profils")
|
||||
Me.Visible = True
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -392,7 +397,9 @@ INNER JOIN IDB.dbo.VWIDB_DOCTYPE_LANGUAGE DL ON DT.IDB_DOCTYPE_ID = DL.Doctype_I
|
||||
Return oManualIndexes
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in Refresh_IndexeMan:")
|
||||
Me.Visible = False
|
||||
FormHelper.ShowErrorMessage(ex, "Unexpected error in Refresh_IndexeMan:")
|
||||
Me.Visible = True
|
||||
Return Nothing
|
||||
|
||||
End Try
|
||||
@@ -472,8 +479,9 @@ INNER JOIN IDB.dbo.VWIDB_DOCTYPE_LANGUAGE DL ON DT.IDB_DOCTYPE_ID = DL.Doctype_I
|
||||
Else
|
||||
omsg = "Please check Datatype of Indexvalue!"
|
||||
End If
|
||||
Dim oMsgBox As New frmDialog(omsg, "Indexe Laden", frmDialog.DialogType.Warning)
|
||||
oMsgBox.ShowDialog()
|
||||
Me.Visible = False
|
||||
Dim oResult = FormHelper.ShowWarningMessage(omsg, "Index Load")
|
||||
Me.Visible = True
|
||||
Logger.Warn("DataType [{0}] not implemented!", oIndex.DataType)
|
||||
End Select
|
||||
|
||||
@@ -498,7 +506,9 @@ INNER JOIN IDB.dbo.VWIDB_DOCTYPE_LANGUAGE DL ON DT.IDB_DOCTYPE_ID = DL.Doctype_I
|
||||
SendKeys.Send("{TAB}")
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in LoadIndexe_Man:")
|
||||
Me.Visible = False
|
||||
FormHelper.ShowErrorMessage(ex, "Unexpected error in LoadIndexe_Man:")
|
||||
Me.Visible = True
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub PrepareDependingControl(pControl As Control)
|
||||
@@ -652,31 +662,36 @@ INNER JOIN IDB.dbo.VWIDB_DOCTYPE_LANGUAGE DL ON DT.IDB_DOCTYPE_ID = DL.Doctype_I
|
||||
|
||||
Private Sub frmGlobix_Index_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
|
||||
If File.Exists(My.Application.Globix.CurrentWorkfile.FilePath) Then
|
||||
Dim oMsg As String
|
||||
Dim oMsg As String, oTitle As String
|
||||
Select Case CancelAttempts
|
||||
Case 0
|
||||
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
oMsg = "Bitte indexieren Sie die Datei vollständig!" & vbNewLine & "(Abbruch 1 des Indexierungsvorgangs)"
|
||||
oTitle = "Fehlende Eingaben"
|
||||
Else
|
||||
oMsg = "Please Index file completely" & vbNewLine & "(Abort 1 of Indexdialog)"
|
||||
oTitle = "Missung Input"
|
||||
End If
|
||||
Dim oMsgBox As New frmDialog(oMsg, Text, frmDialog.DialogType.Warning)
|
||||
oMsgBox.CancelButtonInvisible()
|
||||
oMsgBox.ShowDialog()
|
||||
Me.TopMost = False
|
||||
Me.Visible = False
|
||||
Dim oResult = FormHelper.ShowWarningMessage(oMsg, oTitle)
|
||||
Me.Visible = True
|
||||
CancelAttempts += 1
|
||||
e.Cancel = True
|
||||
Case 1
|
||||
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
oMsg = "Sie brechen nun zum zweiten Mal den Indexierungsvorgang ab!" & vbNewLine & "Wollen Sie die Indexierung aller Dateien abbrechen?"
|
||||
oTitle = "Fehlende Eingaben"
|
||||
Else
|
||||
oMsg = "You abort the indexdialog for the 2nd time!" & vbNewLine & "Do You want to abort indexing?"
|
||||
oTitle = "Missung Input"
|
||||
End If
|
||||
Dim oMsgBox As New frmDialog(oMsg, Text, frmDialog.DialogType.Question)
|
||||
oMsgBox.CancelButtonVisible()
|
||||
|
||||
If oMsgBox.DialogResult = DialogResult.Yes Then
|
||||
Me.Visible = False
|
||||
Dim oResult = FormHelper.ShowQuestionMessage(oMsg, oTitle)
|
||||
Me.Visible = True
|
||||
If oResult = DialogResult.Yes Then
|
||||
Dim containsfw_file As Boolean = False
|
||||
Try
|
||||
My.Application.Globix.ABORT_INDEXING = True
|
||||
@@ -702,19 +717,22 @@ INNER JOIN IDB.dbo.VWIDB_DOCTYPE_LANGUAGE DL ON DT.IDB_DOCTYPE_ID = DL.Doctype_I
|
||||
'Zuerst die Daten des Ablaufs löschen
|
||||
If My.Database.ExecuteNonQueryECM($"DELETE FROM TBGI_FILES_USER WHERE USER@WORK = '{My.Application.User.UserName}'") = True Then
|
||||
If containsfw_file = True Then
|
||||
Me.Visible = False
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
MsgBox("Der Indexierungsprozess beinhaltete (auch) Dateien per Folderwatch!" & vbNewLine & "Diese Dateien wurden nicht gelöscht und verbleiben im Folderwatch-Verzeichnis!" & vbNewLine & "Bitte verschieben Sie die Dateien ggfls.", MsgBoxStyle.Information, "Achtung - Hinweis:")
|
||||
FormHelper.ShowInfoMessage("Der Indexierungsprozess beinhaltete (auch) Dateien per Folderwatch!" & vbNewLine & "Diese Dateien wurden nicht gelöscht und verbleiben im Folderwatch-Verzeichnis!" & vbNewLine & "Bitte verschieben Sie die Dateien ggfls.", "Hinweis")
|
||||
Else
|
||||
MsgBox("The Indexingprocess contained (also) files from folderwatch!" & vbNewLine & "These files weren't deleted and will stay in the folderwatch-folder!" & vbNewLine & "Please move these files manually.", MsgBoxStyle.Information, "Achtung - Hinweis:")
|
||||
FormHelper.ShowInfoMessage("The Indexingprocess contained (also) files from folderwatch!" & vbNewLine & "These files weren't deleted and will stay in the folderwatch-folder!" & vbNewLine & "Please move these files manually.", "Attention")
|
||||
End If
|
||||
|
||||
Me.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
MsgBox("Unexpected Error in Abort Indexing: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Me.Visible = False
|
||||
FormHelper.ShowErrorMessage(ex, "Unexpected Error in Abort Indexing")
|
||||
Me.Visible = True
|
||||
End Try
|
||||
|
||||
Try
|
||||
@@ -727,7 +745,9 @@ INNER JOIN IDB.dbo.VWIDB_DOCTYPE_LANGUAGE DL ON DT.IDB_DOCTYPE_ID = DL.Doctype_I
|
||||
Catch ex As Exception
|
||||
Logger.Info(" - Unexpected error in Schliessen des Formulares - Fehler: " & vbNewLine & ex.Message)
|
||||
Logger.Error(ex.Message)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in Schliessen des Formulares:")
|
||||
Me.Visible = False
|
||||
FormHelper.ShowErrorMessage(ex, "Unexpected error in FormClosing:")
|
||||
Me.Visible = True
|
||||
End Try
|
||||
|
||||
e.Cancel = False
|
||||
@@ -743,9 +763,11 @@ INNER JOIN IDB.dbo.VWIDB_DOCTYPE_LANGUAGE DL ON DT.IDB_DOCTYPE_ID = DL.Doctype_I
|
||||
WindowLocation.SaveFormLocationSize(Me)
|
||||
My.Settings.Save()
|
||||
Catch ex As Exception
|
||||
Logger.Warn(" - Unexpected error in Schliessen des Formulares - Fehler: " & vbNewLine & ex.Message)
|
||||
Logger.Warn(" - Unexpected error in Schliessen des Formulares2 - Fehler: " & vbNewLine & ex.Message)
|
||||
Logger.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in Schliessen des Formulares:")
|
||||
Me.Visible = False
|
||||
FormHelper.ShowErrorMessage(ex, "Unexpected error in FormClosing2:")
|
||||
Me.Visible = True
|
||||
End Try
|
||||
End Select
|
||||
Else
|
||||
@@ -798,13 +820,23 @@ INNER JOIN IDB.dbo.VWIDB_DOCTYPE_LANGUAGE DL ON DT.IDB_DOCTYPE_ID = DL.Doctype_I
|
||||
Return True
|
||||
Else
|
||||
Logger.Warn("Import failed with message: [{0}] and details [{1}]", oResult.ErrorMessage, oResult.ErrorDetails)
|
||||
MsgBox($"Die Datei wurde nicht verarbeitet.{vbNewLine}{vbNewLine}Fehler: {oResult.ErrorMessage}", MsgBoxStyle.Critical, Text)
|
||||
Dim oMsg As String, oTitle As String
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
oMsg = $"Die Datei wurde nicht verarbeitet.{vbNewLine}{vbNewLine}Fehler: {oResult.ErrorMessage}"
|
||||
oTitle = "Achtung"
|
||||
Else
|
||||
oMsg = $"Unexpected Error in FileFlow{vbNewLine}{vbNewLine}Fehler: {oResult.ErrorMessage}"
|
||||
oTitle = "Attention"
|
||||
End If
|
||||
FormHelper.ShowWarningMessage(oMsg, oTitle)
|
||||
|
||||
Return False
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
MsgBox("Ablage fehlgeschlagen!", MsgBoxStyle.Critical, Text)
|
||||
Me.TopMost = False
|
||||
FormHelper.ShowErrorMessage(ex, Text)
|
||||
Return False
|
||||
|
||||
Finally
|
||||
|
||||
Reference in New Issue
Block a user