Zooflow: Fix messageboxes without title

This commit is contained in:
Jonathan Jenne
2022-05-23 15:07:07 +02:00
parent ce7261acca
commit 39c69704f4
56 changed files with 683 additions and 432 deletions

View File

@@ -2,7 +2,7 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class frmAdmin_Globix
Inherits BaseRibbonForm
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()>

View File

@@ -14,6 +14,9 @@ Public Class frmAdmin_Globix
Private AttributesAutomatic As New Dictionary(Of String, String)
Private Pages As ClassDetailPageManager
Private Logger As Logger = My.LogConfig.GetLogger
Private FormHelper As FormHelper
Public Sub New(PrimaryKey As Integer, Optional IsInsert As Boolean = False)
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
@@ -22,10 +25,10 @@ Public Class frmAdmin_Globix
Me.PrimaryKey = PrimaryKey
Me.IsInsert = IsInsert
Me.GlobixHelper = New ClassGIDatatables(My.LogConfig)
FormHelper = New FormHelper(My.LogConfig, Me)
End Sub
Private Sub frmAdmin_Globix_Load(sender As Object, e As EventArgs) Handles MyBase.Load
InitializeBaseForm(My.LogConfig)
Try
VWIDB_DOCTYPE_LANGUAGETableAdapter.Connection.ConnectionString = My.DatabaseIDB.CurrentSQLConnectionString
TBDD_DOKUMENTARTTableAdapter.Connection.ConnectionString = My.DatabaseECM.CurrentSQLConnectionString
@@ -107,7 +110,7 @@ Public Class frmAdmin_Globix
oDragDropManager.AddGridView(viewAssignedUsers)
oDragDropManager.AddGridView(viewAvailableUsers)
Catch ex As Exception
ShowErrorMessage(ex)
FormHelper.ShowErrorMessage(ex, "frmAdmin_Globix_Load")
End Try
End Sub
Sub Load_TabData()
@@ -212,7 +215,7 @@ Public Class frmAdmin_Globix
ShowStatus($"{oPage.Name} saved - {Now.ToString}", Color.DodgerBlue)
Catch ex As Exception
ShowErrorMessage(ex)
FormHelper.ShowErrorMessage(ex, "BarButtonSave_ItemClick")
ShowStatus($"{ex.Message} saved - {Now.ToString}", Color.Red)
End Try
'Else
@@ -302,7 +305,7 @@ Public Class frmAdmin_Globix
Return False
End If
Catch ex As Exception
ShowErrorMessage(ex)
FormHelper.ShowErrorMessage(ex, "Insert_Doctype")
ShowStatus($"Error Saving Fileflow Profile {ex.Message}", Color.Red)
Return False
End Try
@@ -325,7 +328,7 @@ Public Class frmAdmin_Globix
End If
Catch ex As Exception
ShowErrorMessage(ex)
FormHelper.ShowErrorMessage(ex, "Update_Doctype")
Return False
End Try
@@ -589,11 +592,11 @@ Public Class frmAdmin_Globix
Private Sub SimpleButton4_Click(sender As Object, e As EventArgs) Handles SimpleButton4.Click
Try
If Regex.IsMatch(REGEXTextBox.Text, txtDateinameTest.Text) Then
Dim oMsgBox As New frmDialog("The RegEx resulted in a proper match!", "", False)
Dim oMsgBox As New frmDialog("The RegEx resulted in a proper match!", "Testing Regex", frmDialog.DialogType.Success)
oMsgBox.ShowDialog()
Else
Dim oMsgBox As New frmDialog("No Match- There might be an error in the RegEx!", "", True)
Dim oMsgBox As New frmDialog("No Match- There might be an error in the RegEx!", "Testing Regex", frmDialog.DialogType.Warning)
oMsgBox.ShowDialog()
End If
@@ -668,7 +671,7 @@ Public Class frmAdmin_Globix
' ShowStatus($"{oPage.Name} deleted!")
Catch ex As Exception
ShowErrorMessage(ex)
FormHelper.ShowErrorMessage(ex, "BarButtonItem2_ItemClick")
End Try
End Sub

View File

@@ -2,7 +2,7 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class frmAdmin_IDBAttribute
Inherits BaseRibbonForm
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()>

View File

@@ -1,18 +1,21 @@
Public Class frmAdmin_IDBAttribute
Imports DigitalData.GUIs.Common
Public Class frmAdmin_IDBAttribute
Implements IAdminForm
Public Property HasChanges As Boolean = False Implements IAdminForm.HasChanges
Public Property IsInsert As Boolean = False Implements IAdminForm.IsInsert
Public Property PrimaryKey As Integer Implements IAdminForm.PrimaryKey
Private FormHelper As FormHelper
Public Sub New(PrimaryKey As Integer, Optional IsInsert As Boolean = False)
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
InitializeBaseForm(My.LogConfig)
Me.PrimaryKey = PrimaryKey
Me.IsInsert = IsInsert
FormHelper = New FormHelper(My.LogConfig, Me)
End Sub
Private Sub frmAdmin_Attribute_Load(sender As Object, e As EventArgs) Handles MyBase.Load
@@ -27,7 +30,7 @@
DSIDB_Stammdaten.VWIDB_BE_ATTRIBUTE.ADDED_WHOColumn.DefaultValue = My.Application.User.UserName
End If
Catch ex As Exception
ShowErrorMessage(ex)
FormHelper.ShowErrorMessage(ex, "frmAdmin_Attribute_Load")
End Try
End Sub
Private Sub FillAttribute()
@@ -105,7 +108,7 @@
FillAttribute()
Return True
Catch ex As Exception
ShowErrorMessage(ex)
FormHelper.ShowErrorMessage(ex, "SaveData")
ShowStatus($"Unexpeced error saving attribute {TextEdit2.Text} - {ex.Message}", Color.Red)
Return False
End Try
@@ -120,7 +123,7 @@
End If
Catch ex As Exception
ShowErrorMessage(ex)
FormHelper.ShowErrorMessage(ex, "DeleteAttribute")
Return False
End Try
End Function

View File

@@ -2,7 +2,7 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class frmAdmin_IDBEntity
Inherits BaseRibbonForm
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _

View File

@@ -1,19 +1,21 @@
Imports DigitalData.Modules.Logging
Imports DigitalData.GUIs.Common
Imports DigitalData.Modules.Logging
Public Class frmAdmin_IDBEntity
Implements IAdminForm
Public Property PrimaryKey As Integer Implements IAdminForm.PrimaryKey
Public Property HasChanges As Boolean Implements IAdminForm.HasChanges
Public Property IsInsert As Boolean Implements IAdminForm.IsInsert
Private FormHelper As FormHelper
Public Sub New(PrimaryKey As Integer, Optional IsInsert As Boolean = False)
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
InitializeBaseForm(My.LogConfig)
Me.PrimaryKey = PrimaryKey
Me.IsInsert = IsInsert
FormHelper = New FormHelper(My.LogConfig, Me)
End Sub
Private Sub frmAdmin_IDBEntity_Load(sender As Object, e As EventArgs) Handles MyBase.Load
@@ -27,7 +29,7 @@ Public Class frmAdmin_IDBEntity
End If
Catch ex As Exception
ShowErrorMessage(ex)
FormHelper.ShowErrorMessage(ex, "frmAdmin_IDBEntity_Load")
End Try
End Sub
@@ -74,7 +76,7 @@ Public Class frmAdmin_IDBEntity
Return True
Catch ex As Exception
ShowErrorMessage(ex)
FormHelper.ShowErrorMessage(ex, "SaveData")
Return False
End Try
End Function
@@ -84,7 +86,7 @@ Public Class frmAdmin_IDBEntity
TBIDB_BUSINESS_ENTITYTableAdapter.Delete(PrimaryKey)
Return True
Catch ex As Exception
ShowErrorMessage(ex)
FormHelper.ShowErrorMessage(ex, "DeleteData")
Return False
End Try
End Function

View File

@@ -2,7 +2,7 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class frmAdmin_IDBObjectStore
Inherits BaseRibbonForm
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _

View File

@@ -1,4 +1,6 @@
Public Class frmAdmin_IDBObjectStore
Imports DigitalData.GUIs.Common
Public Class frmAdmin_IDBObjectStore
Implements IAdminForm
Public Property PrimaryKey As Integer Implements IAdminForm.PrimaryKey
@@ -6,7 +8,7 @@
Public Property HasChanges As Boolean Implements IAdminForm.HasChanges
Private FormHelper As FormHelper
Public Property IsInsert As Boolean Implements IAdminForm.IsInsert
Dim oStorePath As String = String.Empty
@@ -19,9 +21,9 @@
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
InitializeBaseForm(My.LogConfig)
Me.PrimaryKey = PrimaryKey
Me.IsInsert = IsInsert
FormHelper = New FormHelper(My.LogConfig, Me)
End Sub
Private Sub BarButtonItem3_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem3.ItemClick
@@ -103,7 +105,7 @@
Return True
Catch ex As Exception
ShowErrorMessage(ex)
FormHelper.ShowErrorMessage(ex, "SaveData")
Return False
End Try
End Function

View File

@@ -12,9 +12,11 @@ Public Class frmAdmin_User
Public Property IsInsert As Boolean Implements IAdminForm.IsInsert
Private Property ErrorHandler As BaseErrorHandler
Private Property Pages As ClassDetailPageManager
Private Property Logger As Logger
Private Property FormHelper As FormHelper
Public Sub New(pPrimaryKey As Integer, Optional pIsInsert As Boolean = False)
' Dieser Aufruf ist für den Designer erforderlich.
@@ -23,7 +25,6 @@ Public Class frmAdmin_User
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
PrimaryKey = pPrimaryKey
IsInsert = pIsInsert
ErrorHandler = New BaseErrorHandler(My.LogConfig, My.LogConfig.GetLogger, Me)
Logger = My.LogConfig.GetLogger()
End Sub
@@ -69,7 +70,7 @@ Public Class frmAdmin_User
TBDD_USERTableAdapter.Delete(PrimaryKey)
Return True
Catch ex As Exception
ErrorHandler.ShowErrorMessage(ex, "DeleteData")
FormHelper.ShowErrorMessage(ex, "DeleteData")
Return False
End Try
End Function
@@ -94,7 +95,7 @@ Public Class frmAdmin_User
oPage.IsInsert = False
txtStatus.Caption = $"{oPage.Name} gespeichert!"
Catch ex As Exception
ErrorHandler.ShowErrorMessage(ex, "ItemClick")
FormHelper.ShowErrorMessage(ex, "ItemClick")
End Try
Else
txtStatus.Caption = $"Keine Änderungen"

View File

@@ -6,7 +6,8 @@ Public Class frmAdmin_UserGroupRelations
Public ReadOnly Property LogConfig As Modules.Logging.LogConfig Implements IBaseForm.LogConfig
Public ReadOnly Property Logger As Modules.Logging.Logger Implements IBaseForm.Logger
Public ReadOnly Property ErrorHandler As BaseErrorHandler Implements IBaseForm.ErrorHandler
Public Property PrimaryKey As Integer Implements IAdminForm.PrimaryKey
Public Property HasChanges As Boolean Implements IAdminForm.HasChanges
Public Property IsInsert As Boolean Implements IAdminForm.IsInsert
@@ -14,6 +15,7 @@ Public Class frmAdmin_UserGroupRelations
Private Property SelectedGroupId As Integer = Nothing
Private Property SelectedAvailableUser As Integer = Nothing
Private Property SelectedRelatedUser As Integer = Nothing
Private FormHelper As FormHelper = Nothing
Public Sub New(pPrimaryKey As Integer)
' Dieser Aufruf ist für den Designer erforderlich.
@@ -21,7 +23,7 @@ Public Class frmAdmin_UserGroupRelations
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
LogConfig = My.LogConfig
ErrorHandler = New BaseErrorHandler(LogConfig, Me)
FormHelper = New FormHelper(LogConfig, Me)
End Sub
Private Async Sub frmAdmin_UserGroupRelations_Load(sender As Object, e As EventArgs) Handles MyBase.Load
@@ -39,7 +41,7 @@ Public Class frmAdmin_UserGroupRelations
Dim oTable As DataTable = Await My.DatabaseECM.GetDatatableAsync(oSQL)
GridControl2.DataSource = oTable
Catch ex As Exception
ErrorHandler.ShowErrorMessage(ex, "Fehler beim Laden des Formulars")
FormHelper.ShowErrorMessage(ex, "Fehler beim Laden des Formulars")
End Try
End Sub
@@ -56,7 +58,7 @@ Public Class frmAdmin_UserGroupRelations
Dim oTable = Await My.DatabaseECM.GetDatatableAsync(oSql)
Return oTable
Catch ex As Exception
ErrorHandler.ShowErrorMessage(ex, "GetAvailableUsersByGroupId")
FormHelper.ShowErrorMessage(ex, "GetAvailableUsersByGroupId")
Return Nothing
End Try
End Function
@@ -72,7 +74,7 @@ Public Class frmAdmin_UserGroupRelations
Dim oTable = Await My.DatabaseECM.GetDatatableAsync(oSql)
Return oTable
Catch ex As Exception
ErrorHandler.ShowErrorMessage(ex, "GetRelatedUsersByGroupId")
FormHelper.ShowErrorMessage(ex, "GetRelatedUsersByGroupId")
Return Nothing
End Try
End Function

View File

@@ -2,7 +2,7 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class frmAdmin_ClipboardWatcher
Inherits BaseRibbonForm
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()>

View File

@@ -33,6 +33,7 @@ Public Class frmAdmin_ClipboardWatcher
Private Const PROFILE_TYPE_DATA_ONLY As Integer = 2
Private Pages As ClassDetailPageManager
Private FormHelper As FormHelper
Friend Class ProfileType
Public Property Id As Integer
@@ -57,15 +58,12 @@ Public Class frmAdmin_ClipboardWatcher
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
InitializeBaseForm(My.LogConfig)
Me.PrimaryKey = PrimaryKey
Me.IsInsert = IsInsert
FormHelper = New FormHelper(My.LogConfig, Me)
End Sub
Private Sub frmAdmin_CWProfile_Load(sender As Object, e As EventArgs) Handles Me.Load
InitializeBaseForm(My.LogConfig)
Try
TBCW_PROFILESTableAdapter.Connection.ConnectionString = My.DatabaseECM.CurrentSQLConnectionString
TBCW_PROFILESTableAdapter.Fill(DBCW_Stammdaten.TBCW_PROFILES, PrimaryKey)
@@ -129,7 +127,7 @@ Public Class frmAdmin_ClipboardWatcher
AddHandler Pages.CurrentPage_Changed, AddressOf CurrentPage_Changed
Catch ex As Exception
ShowErrorMessage(ex)
FormHelper.ShowErrorMessage(ex, "frmAdmin_CWProfile_Load")
End Try
End Sub
@@ -176,7 +174,7 @@ Public Class frmAdmin_ClipboardWatcher
ShowStatus($"{oPage.Name} gespeichert!")
Catch ex As Exception
ShowErrorMessage(ex)
FormHelper.ShowErrorMessage(ex, "BarButtonSave_ItemClick")
End Try
Else
ShowStatus("Keine Änderungen!")

View File

@@ -2,7 +2,7 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class frmAdmin_SourceSQL
Inherits BaseRibbonForm
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()>

View File

@@ -1,5 +1,6 @@
Imports DevExpress.XtraEditors.DXErrorProvider
Imports DevExpress.XtraLayout
Imports DigitalData.GUIs.Common
Public Class frmAdmin_SourceSQL
Implements IAdminForm
@@ -11,13 +12,15 @@ Public Class frmAdmin_SourceSQL
Public Property IsInsert As Boolean Implements IAdminForm.IsInsert
Private Pages As ClassDetailPageManager
Private FormHelper As FormHelper
Public Sub New(PrimaryKey As Integer)
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
InitializeBaseForm(My.LogConfig)
FormHelper = New FormHelper(My.LogConfig, Me)
Me.PrimaryKey = PrimaryKey
End Sub
@@ -45,7 +48,7 @@ Public Class frmAdmin_SourceSQL
ValidationHelper()
Catch ex As Exception
ShowErrorMessage(ex)
FormHelper.ShowErrorMessage(ex, "frmAdmin_SourceSQL_Load")
End Try
End Sub
@@ -105,8 +108,8 @@ Public Class frmAdmin_SourceSQL
Return True
Catch ex As Exception
ShowErrorMessage(ex)
Return False
FormHelper.ShowErrorMessage(ex, "SaveData")
Return False
End Try
End Function
@@ -115,7 +118,7 @@ Public Class frmAdmin_SourceSQL
TBZF_ADMIN_SOURCE_SQLTableAdapter.Delete(PrimaryKey)
Return True
Catch ex As Exception
ShowErrorMessage(ex)
FormHelper.ShowErrorMessage(ex, "DeleteData")
Return False
End Try
End Function

View File

@@ -4,7 +4,7 @@ Imports DigitalData.GUIs.Common.Base
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class frmAdmin_Start
Inherits BaseRibbonForm
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()>

View File

@@ -16,18 +16,14 @@ Public Class frmAdmin_Start
Private CurrentModule As String
Private CurrentPage As String
Private CurrentItem As ClassDetailForm.DetailData
Private FormHelper As FormHelper
Private Logger As Logger
Private DetailForm As ClassDetailForm
Public Sub New()
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
InitializeBaseForm(My.LogConfig)
End Sub
Private Sub frmAdministration_Load(sender As Object, e As EventArgs) Handles MyBase.Load
FormHelper = New FormHelper(My.LogConfig, Me)
Logger = My.LogConfig.GetLogger()
DetailForm = New ClassDetailForm(My.LogConfig)
AddHandler DetailForm.DetailFormClosed, AddressOf DetailForm_Closed
@@ -46,7 +42,7 @@ Public Class frmAdmin_Start
Load_GridData(oDetailData)
Else
Dim oMsgBox As New frmDialog($"Could not load data for Page [{oKey}] because it does not exist!", "Error", True)
Dim oMsgBox As New frmDialog($"Could not load data for Page [{oKey}] because it does not exist!", "Error", frmDialog.DialogType.Error)
oMsgBox.ShowDialog()
End If
End If
@@ -103,7 +99,7 @@ Public Class frmAdmin_Start
End If
Catch ex As Exception
ShowErrorMessage(ex)
FormHelper.ShowErrorMessage(ex, "TreeListMenu_FocusedNodeChanged")
End Try
End Sub
@@ -219,7 +215,7 @@ Public Class frmAdmin_Start
End If
End If
Catch ex As Exception
ShowErrorMessage(ex)
FormHelper.ShowErrorMessage(ex, "GridView1_RowClick")
End Try
End Sub
@@ -260,7 +256,7 @@ Public Class frmAdmin_Start
Try
DetailForm.Handle_OpenDetail(Nothing, CurrentPage, True)
Catch ex As Exception
ShowErrorMessage(ex)
FormHelper.ShowErrorMessage(ex, "btnAddRecord_ItemClick")
End Try
End Sub