diff --git a/app/DD_PM_WINDREAM/ApplicationEvents.vb b/app/DD_PM_WINDREAM/ApplicationEvents.vb
new file mode 100644
index 0000000..1314cba
--- /dev/null
+++ b/app/DD_PM_WINDREAM/ApplicationEvents.vb
@@ -0,0 +1,24 @@
+Imports Microsoft.VisualBasic.ApplicationServices
+
+Namespace My
+ ' Für MyApplication sind folgende Ereignisse verfügbar:
+ ' Startup: Wird beim Starten der Anwendung noch vor dem Erstellen des Startformulars ausgelöst.
+ ' Shutdown: Wird nach dem Schließen aller Anwendungsformulare ausgelöst. Dieses Ereignis wird nicht ausgelöst, wenn die Anwendung mit einem Fehler beendet wird.
+ ' UnhandledException: Wird bei einem Ausnahmefehler ausgelöst.
+ ' StartupNextInstance: Wird beim Starten einer Einzelinstanzanwendung ausgelöst, wenn die Anwendung bereits aktiv ist.
+ ' NetworkAvailabilityChanged: Wird beim Herstellen oder Trennen der Netzwerkverbindung ausgelöst.
+ Partial Friend Class MyApplication
+ Private Sub MyApplication_UnhandledException(sender As Object, e As UnhandledExceptionEventArgs) Handles Me.UnhandledException
+ Dim oMessage = "Application encountered an unhandled error!" & vbNewLine & vbNewLine &
+ "The errormessage was:" & vbNewLine & e.Exception.Message & vbNewLine &
+ "The stacktrace was:" & vbNewLine & e.Exception.StackTrace
+
+ If IsNothing(LOGGER) = False Then
+ LOGGER.Info(oMessage)
+ LOGGER.Error(e.Exception)
+ End If
+
+ MsgBox(oMessage, MsgBoxStyle.Critical, "Process Manager")
+ End Sub
+ End Class
+End Namespace
diff --git a/app/DD_PM_WINDREAM/DD_PM_WINDREAM.vbproj b/app/DD_PM_WINDREAM/DD_PM_WINDREAM.vbproj
index bcec307..b583cab 100644
--- a/app/DD_PM_WINDREAM/DD_PM_WINDREAM.vbproj
+++ b/app/DD_PM_WINDREAM/DD_PM_WINDREAM.vbproj
@@ -238,6 +238,7 @@
+
diff --git a/app/DD_PM_WINDREAM/My Project/AssemblyInfo.vb b/app/DD_PM_WINDREAM/My Project/AssemblyInfo.vb
index 8cecbf8..21d1bd3 100644
--- a/app/DD_PM_WINDREAM/My Project/AssemblyInfo.vb
+++ b/app/DD_PM_WINDREAM/My Project/AssemblyInfo.vb
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
'
-
+
diff --git a/app/DD_PM_WINDREAM/frmMain.vb b/app/DD_PM_WINDREAM/frmMain.vb
index e9fc57d..c98a258 100644
--- a/app/DD_PM_WINDREAM/frmMain.vb
+++ b/app/DD_PM_WINDREAM/frmMain.vb
@@ -89,7 +89,6 @@ Public Class frmMain
formopenClose = True
LOGGER.Debug("Initializing MainForm....")
-
' Create helper to save/load expanded GroupColumns at runtime
RefreshHelper = New RefreshHelper(GridView_Docs, "GUID")
@@ -1964,16 +1963,20 @@ Public Class frmMain
End Sub
Private Sub frmMain_Resize(sender As Object, e As EventArgs) Handles Me.Resize
- If formShown = False Then
- Exit Sub
- End If
+ Try
+ If formShown = False Then
+ Exit Sub
+ End If
- If WindowState = FormWindowState.Maximized Then
- My.Settings.frmMainWindowState = "Maximized"
- ElseIf WindowState = FormWindowState.Normal Then
- My.Settings.frmMainWindowState = "Normal"
- End If
- My.Settings.Save()
+ If WindowState = FormWindowState.Maximized Then
+ My.Settings.frmMainWindowState = "Maximized"
+ ElseIf WindowState = FormWindowState.Normal Then
+ My.Settings.frmMainWindowState = "Normal"
+ End If
+ My.Settings.Save()
+ Catch ex As Exception
+ LOGGER.Error(ex)
+ End Try
End Sub
Private Sub BarButtonItem3_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniGrundeinstellung.ItemClick
Try
@@ -2058,8 +2061,6 @@ Public Class frmMain
Catch ex As Exception
LOGGER.Warn($"Timer5Mins Error: {ex.Message}")
End Try
-
-
End Sub
Private Sub bwBasicData_DoWork(sender As Object, e As DoWorkEventArgs) Handles bwBasicData.DoWork
GetBaseData("bwBasicData")
@@ -2205,7 +2206,7 @@ Public Class frmMain
tslblObjectCount.Text = objectCount_Descr
tslblObjectCount.ForeColor = Color.DarkOrange
Catch ex As Exception
-
+ LOGGER.Error(ex.Message)
End Try
End Sub
diff --git a/app/DD_PM_WINDREAM/frmMassValidator.vb b/app/DD_PM_WINDREAM/frmMassValidator.vb
index e827f4f..453c32b 100644
--- a/app/DD_PM_WINDREAM/frmMassValidator.vb
+++ b/app/DD_PM_WINDREAM/frmMassValidator.vb
@@ -273,17 +273,31 @@ Public Class frmMassValidator
End If
#End Region
- Dim maxWith As Integer = cmb.Width
- Using g As Graphics = Me.CreateGraphics
- For Each oItem As Object In cmb.Items 'Für alle Einträge...
- Dim g1 As Graphics = cmb.CreateGraphics
- If g1.MeasureString(Text, cmb.Font).Width + 30 > maxWith Then
- maxWith = g1.MeasureString(Text, cmb.Font).Width + 30
- End If
- g1.Dispose()
- Next oItem
- End Using
- cmb.DropDownWidth = maxWith
+ 'Dim oMaxWidth As Integer = cmb.Width
+
+ 'Using oGraphics As Graphics = cmb.CreateGraphics()
+ ' Dim oStringLength = oGraphics.MeasureString(Text, cmb.Font).Width
+ ' If oStringLength + 30 > oMaxWidth Then
+ ' oMaxWidth = oStringLength + 30
+ ' End If
+ 'End Using
+
+ 'Using g As Graphics = Me.CreateGraphics
+ ' For Each oItem As Object In cmb.Items 'Für alle Einträge...
+ ' Dim g1 As Graphics = cmb.CreateGraphics
+ ' If g1.MeasureString(Text, cmb.Font).Width + 30 > oMaxWidth Then
+ ' oMaxWidth = g1.MeasureString(Text, cmb.Font).Width + 30
+ ' End If
+ ' g1.Dispose()
+ ' Next oItem
+ 'End Using
+
+ 'cmb.DropDownWidth = oMaxWidth
+
+
+
+
+
oControl = cmb
End If
diff --git a/app/DD_PM_WINDREAM/frmValidator.vb b/app/DD_PM_WINDREAM/frmValidator.vb
index 9b8f8da..84c4214 100644
--- a/app/DD_PM_WINDREAM/frmValidator.vb
+++ b/app/DD_PM_WINDREAM/frmValidator.vb
@@ -906,17 +906,26 @@ Public Class frmValidator
#End Region
- Dim maxWith As Integer = oComboBox.Width
- Using g As Graphics = Me.CreateGraphics
- For Each oItem As Object In oComboBox.Items 'Für alle Einträge...
- Dim g1 As Graphics = oComboBox.CreateGraphics
- If g1.MeasureString(Text, oComboBox.Font).Width + 30 > maxWith Then
- maxWith = g1.MeasureString(Text, oComboBox.Font).Width + 30
- End If
- g1.Dispose()
- Next oItem
- End Using
- oComboBox.DropDownWidth = maxWith
+ 'Dim oMaxWidth As Integer = oComboBox.Width
+
+ 'Using oGraphics As Graphics = oComboBox.CreateGraphics()
+ ' Dim oStringLength = oGraphics.MeasureString(Text, oComboBox.Font).Width
+ ' If oStringLength + 30 > oMaxWidth Then
+ ' oMaxWidth = oStringLength + 30
+ ' End If
+ 'End Using
+
+ 'Using g As Graphics = Me.CreateGraphics
+ ' For Each oItem As Object In oComboBox.Items 'Für alle Einträge...
+ ' Dim g1 As Graphics = oComboBox.CreateGraphics
+ ' If g1.MeasureString(Text, oComboBox.Font).Width + 30 > oMaxWidth Then
+ ' oMaxWidth = g1.MeasureString(Text, oComboBox.Font).Width + 30
+ ' End If
+ ' g1.Dispose()
+ ' Next oItem
+ 'End Using
+
+ 'oComboBox.DropDownWidth = oMaxWidth
oMyControl = oComboBox
End If
@@ -2269,17 +2278,28 @@ Public Class frmValidator
cmbpanel.DisplayMember = resultDT.Columns(0).ColumnName
cmbpanel.ValueMember = resultDT.Columns(0).ColumnName
- Dim maxWith As Integer = cmbpanel.Width
- Using g As Graphics = Me.CreateGraphics
- For Each oItem As Object In cmbpanel.Items 'Für alle Einträge...
- Dim g1 As Graphics = cmbpanel.CreateGraphics
- If g1.MeasureString(Text, cmbpanel.Font).Width + 30 > maxWith Then
- maxWith = g1.MeasureString(Text, cmbpanel.Font).Width + 30
- End If
- g1.Dispose()
- Next oItem
- End Using
- cmbpanel.DropDownWidth = maxWith
+
+
+ 'Dim oMaxWidth As Integer = cmbpanel.Width
+
+ 'Using oGraphics As Graphics = cmbpanel.CreateGraphics()
+ ' Dim oStringLength = oGraphics.MeasureString(Text, cmbpanel.Font).Width
+ ' If oStringLength + 30 > oMaxWidth Then
+ ' oMaxWidth = oStringLength + 30
+ ' End If
+ 'End Using
+
+ 'Using g As Graphics = Me.CreateGraphics
+ ' For Each oItem As Object In cmbpanel.Items 'Für alle Einträge...
+ ' Dim g1 As Graphics = cmbpanel.CreateGraphics
+ ' If g1.MeasureString(Text, cmbpanel.Font).Width + 30 > oMaxWidth Then
+ ' oMaxWidth = g1.MeasureString(Text, cmbpanel.Font).Width + 30
+ ' End If
+ ' g1.Dispose()
+ ' Next oItem
+ 'End Using
+
+ 'cmbpanel.DropDownWidth = oMaxWidth
ElseIf displayboxname.StartsWith(ClassControlCreator.PREFIX_LOOKUP) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_TABLE) Then
LOGGER.Warn("Depending_Control_Set_Result PREFIX_LOOKUP NOT IMPLEMENTED")