zooflow: msgbox
This commit is contained in:
parent
6cefffc2a6
commit
ba3b4c7bf5
@ -15,18 +15,15 @@ Public Class FormHelper
|
|||||||
Public Function ShowInfoMessage(pMessage As String, pTitle As String) As DialogResult
|
Public Function ShowInfoMessage(pMessage As String, pTitle As String) As DialogResult
|
||||||
Logger.Info(pMessage)
|
Logger.Info(pMessage)
|
||||||
|
|
||||||
Dim oForm As New frmDialog(pMessage, pTitle, frmDialog.DialogType.Info)
|
Return ShowMessage(pMessage, pTitle, frmDialog.DialogType.Info)
|
||||||
Return oForm.ShowDialog()
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function ShowErrorMessage(pMessage As String, pTitle As String) As DialogResult
|
|
||||||
Return ShowErrorMessage(New ApplicationException(pMessage), pTitle)
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function ShowErrorMessage(pException As Exception, pTitle As String) As DialogResult
|
Public Function ShowErrorMessage(pException As Exception, pTitle As String) As DialogResult
|
||||||
Logger.Error(pException)
|
Logger.Error(pException)
|
||||||
|
|
||||||
Dim oMessage = String.Format("In der Funktion '{0}' ist folgender Fehler aufgetreten: {1}", pTitle, vbNewLine & vbNewLine & pException.Message)
|
Dim oMethodName = GetMethodName()
|
||||||
|
Dim oBaseMessage = "In der Funktion '{0}' ist folgender Fehler aufgetreten: {1}"
|
||||||
|
Dim oMessage = String.Format(oBaseMessage, oMethodName, vbNewLine & vbNewLine & pException.Message)
|
||||||
|
|
||||||
If LogConfig.Debug Then
|
If LogConfig.Debug Then
|
||||||
oMessage &= vbNewLine & vbNewLine & "=== Debug Information ==="
|
oMessage &= vbNewLine & vbNewLine & "=== Debug Information ==="
|
||||||
@ -34,14 +31,32 @@ Public Class FormHelper
|
|||||||
oMessage &= vbNewLine & pException.StackTrace
|
oMessage &= vbNewLine & pException.StackTrace
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim oForm As New frmDialog(oMessage, pTitle, frmDialog.DialogType.Error)
|
Return ShowMessage(oMessage, pTitle, frmDialog.DialogType.Error)
|
||||||
Return oForm.ShowDialog()
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function ShowWarningMessage(pMessage As String, pTitle As String) As DialogResult
|
Public Function ShowWarningMessage(pMessage As String, pTitle As String) As DialogResult
|
||||||
Logger.Warn(pMessage)
|
Logger.Info(pTitle & " - " & pMessage)
|
||||||
|
Return ShowMessage(pMessage, pTitle, frmDialog.DialogType.Warning)
|
||||||
|
End Function
|
||||||
|
|
||||||
Dim oForm As New frmDialog(pMessage, pTitle, frmDialog.DialogType.Error)
|
Public Function ShowQuestionMessage(pMessage As String, pTitle As String) As DialogResult
|
||||||
|
Logger.Info(pTitle & " - " & pMessage)
|
||||||
|
Return ShowMessage(pMessage, pTitle, frmDialog.DialogType.Question)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function ShowSuccessMessage(pMessage As String, pTitle As String) As DialogResult
|
||||||
|
Logger.Info(pTitle & " - " & pMessage)
|
||||||
|
Return ShowMessage(pMessage, pTitle, frmDialog.DialogType.Success)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function ShowMessage(pMessage As String, pTitle As String, pType As frmDialog.DialogType) As DialogResult
|
||||||
|
Dim oForm As New frmDialog(pMessage, pTitle, pType)
|
||||||
Return oForm.ShowDialog()
|
Return oForm.ShowDialog()
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function GetMethodName() As String
|
||||||
|
Dim oStackTrace As New StackTrace()
|
||||||
|
Dim oMethodName As String = oStackTrace.GetFrame(2).GetMethod.Name
|
||||||
|
Return oMethodName
|
||||||
|
End Function
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
41
GUIs.Common/frmDialog.Designer.vb
generated
41
GUIs.Common/frmDialog.Designer.vb
generated
@ -26,13 +26,13 @@ Partial Class frmDialog
|
|||||||
Me.btnPositive = New DevExpress.XtraEditors.SimpleButton()
|
Me.btnPositive = New DevExpress.XtraEditors.SimpleButton()
|
||||||
Me.btnNegative = New DevExpress.XtraEditors.SimpleButton()
|
Me.btnNegative = New DevExpress.XtraEditors.SimpleButton()
|
||||||
Me.pnlContent = New DevExpress.XtraEditors.PanelControl()
|
Me.pnlContent = New DevExpress.XtraEditors.PanelControl()
|
||||||
Me.txtContent = New DevExpress.XtraEditors.LabelControl()
|
|
||||||
Me.SvgImageBox1 = New DevExpress.XtraEditors.SvgImageBox()
|
Me.SvgImageBox1 = New DevExpress.XtraEditors.SvgImageBox()
|
||||||
Me.PanelControl1 = New DevExpress.XtraEditors.PanelControl()
|
Me.PanelControl1 = New DevExpress.XtraEditors.PanelControl()
|
||||||
Me.pnlHeader = New DevExpress.XtraEditors.PanelControl()
|
Me.pnlHeader = New DevExpress.XtraEditors.PanelControl()
|
||||||
Me.txtTitle = New DevExpress.XtraEditors.LabelControl()
|
Me.txtTitle = New DevExpress.XtraEditors.LabelControl()
|
||||||
Me.pnlFooter = New DevExpress.XtraEditors.PanelControl()
|
Me.pnlFooter = New DevExpress.XtraEditors.PanelControl()
|
||||||
Me.SvgImageCollection1 = New DevExpress.Utils.SvgImageCollection(Me.components)
|
Me.SvgImageCollection1 = New DevExpress.Utils.SvgImageCollection(Me.components)
|
||||||
|
Me.txtContent2 = New DevExpress.XtraEditors.LabelControl()
|
||||||
CType(Me.pnlContent, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.pnlContent, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.pnlContent.SuspendLayout()
|
Me.pnlContent.SuspendLayout()
|
||||||
CType(Me.SvgImageBox1, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.SvgImageBox1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
@ -70,7 +70,7 @@ Partial Class frmDialog
|
|||||||
'
|
'
|
||||||
'pnlContent
|
'pnlContent
|
||||||
'
|
'
|
||||||
Me.pnlContent.Controls.Add(Me.txtContent)
|
Me.pnlContent.Controls.Add(Me.txtContent2)
|
||||||
Me.pnlContent.Controls.Add(Me.SvgImageBox1)
|
Me.pnlContent.Controls.Add(Me.SvgImageBox1)
|
||||||
Me.pnlContent.Controls.Add(Me.PanelControl1)
|
Me.pnlContent.Controls.Add(Me.PanelControl1)
|
||||||
Me.pnlContent.Dock = System.Windows.Forms.DockStyle.Fill
|
Me.pnlContent.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
@ -79,24 +79,6 @@ Partial Class frmDialog
|
|||||||
Me.pnlContent.Size = New System.Drawing.Size(498, 145)
|
Me.pnlContent.Size = New System.Drawing.Size(498, 145)
|
||||||
Me.pnlContent.TabIndex = 3
|
Me.pnlContent.TabIndex = 3
|
||||||
'
|
'
|
||||||
'txtContent
|
|
||||||
'
|
|
||||||
Me.txtContent.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
|
||||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
|
||||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
|
||||||
Me.txtContent.Appearance.Font = New System.Drawing.Font("Segoe UI", 9.75!)
|
|
||||||
Me.txtContent.Appearance.Options.UseFont = True
|
|
||||||
Me.txtContent.Appearance.Options.UseTextOptions = True
|
|
||||||
Me.txtContent.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Top
|
|
||||||
Me.txtContent.AutoEllipsis = True
|
|
||||||
Me.txtContent.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None
|
|
||||||
Me.txtContent.Location = New System.Drawing.Point(98, 6)
|
|
||||||
Me.txtContent.Name = "txtContent"
|
|
||||||
Me.txtContent.Padding = New System.Windows.Forms.Padding(10)
|
|
||||||
Me.txtContent.Size = New System.Drawing.Size(388, 133)
|
|
||||||
Me.txtContent.TabIndex = 1
|
|
||||||
Me.txtContent.Text = "txtContent"
|
|
||||||
'
|
|
||||||
'SvgImageBox1
|
'SvgImageBox1
|
||||||
'
|
'
|
||||||
Me.SvgImageBox1.BackColor = System.Drawing.Color.Transparent
|
Me.SvgImageBox1.BackColor = System.Drawing.Color.Transparent
|
||||||
@ -144,6 +126,9 @@ Partial Class frmDialog
|
|||||||
'
|
'
|
||||||
'pnlFooter
|
'pnlFooter
|
||||||
'
|
'
|
||||||
|
Me.pnlFooter.Appearance.BackColor = System.Drawing.Color.FromArgb(CType(CType(230, Byte), Integer), CType(CType(230, Byte), Integer), CType(CType(230, Byte), Integer))
|
||||||
|
Me.pnlFooter.Appearance.Options.UseBackColor = True
|
||||||
|
Me.pnlFooter.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder
|
||||||
Me.pnlFooter.Controls.Add(Me.btnPositive)
|
Me.pnlFooter.Controls.Add(Me.btnPositive)
|
||||||
Me.pnlFooter.Controls.Add(Me.btnNegative)
|
Me.pnlFooter.Controls.Add(Me.btnNegative)
|
||||||
Me.pnlFooter.Dock = System.Windows.Forms.DockStyle.Bottom
|
Me.pnlFooter.Dock = System.Windows.Forms.DockStyle.Bottom
|
||||||
@ -160,6 +145,20 @@ Partial Class frmDialog
|
|||||||
Me.SvgImageCollection1.Add("info", "image://svgimages/outlook inspired/about.svg")
|
Me.SvgImageCollection1.Add("info", "image://svgimages/outlook inspired/about.svg")
|
||||||
Me.SvgImageCollection1.Add("question", "image://svgimages/icon builder/actions_question.svg")
|
Me.SvgImageCollection1.Add("question", "image://svgimages/icon builder/actions_question.svg")
|
||||||
'
|
'
|
||||||
|
'txtContent2
|
||||||
|
'
|
||||||
|
Me.txtContent2.Appearance.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.txtContent2.Appearance.Options.UseFont = True
|
||||||
|
Me.txtContent2.Appearance.Options.UseTextOptions = True
|
||||||
|
Me.txtContent2.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Top
|
||||||
|
Me.txtContent2.Appearance.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap
|
||||||
|
Me.txtContent2.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None
|
||||||
|
Me.txtContent2.Location = New System.Drawing.Point(98, 16)
|
||||||
|
Me.txtContent2.Name = "txtContent2"
|
||||||
|
Me.txtContent2.Size = New System.Drawing.Size(388, 124)
|
||||||
|
Me.txtContent2.TabIndex = 3
|
||||||
|
Me.txtContent2.Text = "LabelControl1"
|
||||||
|
'
|
||||||
'frmDialog
|
'frmDialog
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
@ -195,7 +194,7 @@ Partial Class frmDialog
|
|||||||
Friend WithEvents pnlFooter As DevExpress.XtraEditors.PanelControl
|
Friend WithEvents pnlFooter As DevExpress.XtraEditors.PanelControl
|
||||||
Friend WithEvents SvgImageBox1 As DevExpress.XtraEditors.SvgImageBox
|
Friend WithEvents SvgImageBox1 As DevExpress.XtraEditors.SvgImageBox
|
||||||
Friend WithEvents SvgImageCollection1 As DevExpress.Utils.SvgImageCollection
|
Friend WithEvents SvgImageCollection1 As DevExpress.Utils.SvgImageCollection
|
||||||
Friend WithEvents txtContent As DevExpress.XtraEditors.LabelControl
|
|
||||||
Friend WithEvents txtTitle As DevExpress.XtraEditors.LabelControl
|
Friend WithEvents txtTitle As DevExpress.XtraEditors.LabelControl
|
||||||
Friend WithEvents PanelControl1 As DevExpress.XtraEditors.PanelControl
|
Friend WithEvents PanelControl1 As DevExpress.XtraEditors.PanelControl
|
||||||
|
Friend WithEvents txtContent2 As DevExpress.XtraEditors.LabelControl
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@ -28,7 +28,7 @@ Public Class frmDialog
|
|||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
|
|
||||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||||
txtContent.Text = pMessageText
|
txtContent2.Text = pMessageText
|
||||||
txtTitle.Text = pTitle
|
txtTitle.Text = pTitle
|
||||||
|
|
||||||
Select Case pDialogType
|
Select Case pDialogType
|
||||||
@ -62,7 +62,7 @@ Public Class frmDialog
|
|||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Dim oLineBreaks = txtContent.Text.Split(vbNewLine).Count
|
Dim oLineBreaks = txtContent2.Text.Split(vbNewLine).Count
|
||||||
|
|
||||||
If oLineBreaks > 6 Then
|
If oLineBreaks > 6 Then
|
||||||
Dim oHeightOffset = oLineBreaks * 20
|
Dim oHeightOffset = oLineBreaks * 20
|
||||||
|
|||||||
@ -288,7 +288,7 @@ Public Class frmDocumentResultList
|
|||||||
DocumentViewer1.LoadFile(oFileName, New MemoryStream(oDocument.Contents))
|
DocumentViewer1.LoadFile(oFileName, New MemoryStream(oDocument.Contents))
|
||||||
If IsNothing(oDocument) Then
|
If IsNothing(oDocument) Then
|
||||||
DocumentViewer1.CloseDocument()
|
DocumentViewer1.CloseDocument()
|
||||||
FormHelper.ShowErrorMessage("File could not be loaded!", "GridView_FocusedRowChanged")
|
FormHelper.ShowErrorMessage(New IOException("File could not be loaded!"), "GridView_FocusedRowChanged")
|
||||||
|
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|||||||
@ -87,7 +87,7 @@ Public Class frmMonitor
|
|||||||
ConfigManager.Save()
|
ConfigManager.Save()
|
||||||
Application.Restart()
|
Application.Restart()
|
||||||
Else
|
Else
|
||||||
FormHelper.ShowErrorMessage("No Database configured. Application will close!", "frmStart_Load")
|
FormHelper.ShowErrorMessage(New ApplicationException("No Database configured. Application will close!"), "frmStart_Load")
|
||||||
Application.Exit()
|
Application.Exit()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
@ -3,23 +3,28 @@ Imports DigitalData.Modules.Database
|
|||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
|
|
||||||
Public Class frmMsgBox
|
Public Class frmMsgBox
|
||||||
Private LogConfig As LogConfig
|
Private ReadOnly LogConfig As LogConfig
|
||||||
Private SQLServer As MSSQLServer
|
Private ReadOnly SQLServer As MSSQLServer
|
||||||
|
Public ReadOnly FormHelper As FormHelper
|
||||||
|
|
||||||
Public Sub New(LogConfig As LogConfig, SQLServer As MSSQLServer)
|
Public Sub New(LogConfig As LogConfig, SQLServer As MSSQLServer)
|
||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
|
|
||||||
Me.LogConfig = LogConfig
|
Me.LogConfig = LogConfig
|
||||||
Me.SQLServer = SQLServer
|
Me.SQLServer = SQLServer
|
||||||
|
Me.FormHelper = New FormHelper(LogConfig, Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles SimpleButton1.Click
|
Private Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles SimpleButton1.Click
|
||||||
Dim oMsgbox = New frmDialog("Diese Datei ist hier unerwünscht!", "Zooflow", frmDialog.DialogType.Error)
|
FormHelper.ShowErrorMessage(New ApplicationException("Diese Datei ist hier unerwünscht!"), "Mein Titel")
|
||||||
oMsgbox.ShowDialog()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SimpleButton2_Click(sender As Object, e As EventArgs) Handles SimpleButton2.Click
|
Private Sub SimpleButton2_Click(sender As Object, e As EventArgs) Handles SimpleButton2.Click
|
||||||
Dim oMsgbox = New frmDialog("Der Fluxkompensator ist leer. Bitte auffüllen!", "File Flow", frmDialog.DialogType.Warning)
|
Dim oMsgbox = New frmDialog("Der Fluxkompensator ist leer. Bitte auffüllen!", "File Flow", frmDialog.DialogType.Warning)
|
||||||
oMsgbox.ShowDialog()
|
oMsgbox.ShowDialog()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub frmMsgBox_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
@ -1,4 +1,6 @@
|
|||||||
Public Class frmAdmin_IDBAttribute
|
Imports DigitalData.GUIs.Common
|
||||||
|
|
||||||
|
Public Class frmAdmin_IDBAttribute
|
||||||
Implements IAdminForm
|
Implements IAdminForm
|
||||||
|
|
||||||
Public Property HasChanges As Boolean = False Implements IAdminForm.HasChanges
|
Public Property HasChanges As Boolean = False Implements IAdminForm.HasChanges
|
||||||
@ -7,15 +9,16 @@
|
|||||||
Private Const ConstDetail = "Detail"
|
Private Const ConstDetail = "Detail"
|
||||||
Private Const ConstTranslate = "Translate"
|
Private Const ConstTranslate = "Translate"
|
||||||
Private Property oMode As String = "Detail"
|
Private Property oMode As String = "Detail"
|
||||||
|
Private Property FormHelper As FormHelper
|
||||||
|
|
||||||
Public Sub New(PrimaryKey As Integer, Optional IsInsert As Boolean = False)
|
Public Sub New(PrimaryKey As Integer, Optional IsInsert As Boolean = False)
|
||||||
' Dieser Aufruf ist für den Designer erforderlich.
|
' Dieser Aufruf ist für den Designer erforderlich.
|
||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
|
|
||||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||||
InitializeBaseForm(My.LogConfig)
|
|
||||||
Me.PrimaryKey = PrimaryKey
|
Me.PrimaryKey = PrimaryKey
|
||||||
Me.IsInsert = IsInsert
|
Me.IsInsert = IsInsert
|
||||||
|
FormHelper = New FormHelper(My.LogConfig, Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmAdmin_Attribute_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub frmAdmin_Attribute_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
@ -30,7 +33,7 @@
|
|||||||
DSIDB_Stammdaten.VWIDB_BE_ATTRIBUTE.ADDED_WHOColumn.DefaultValue = My.Application.User.UserName
|
DSIDB_Stammdaten.VWIDB_BE_ATTRIBUTE.ADDED_WHOColumn.DefaultValue = My.Application.User.UserName
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ShowErrorMessage(ex)
|
FormHelper.ShowErrorMessage(ex, "frmAdmin_Attribute_Load")
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub FillAttribute()
|
Private Sub FillAttribute()
|
||||||
@ -113,7 +116,7 @@
|
|||||||
FillAttribute()
|
FillAttribute()
|
||||||
Return True
|
Return True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ShowErrorMessage(ex)
|
FormHelper.ShowErrorMessage(ex, "SaveData")
|
||||||
ShowStatus($"Unexpeced error saving attribute {TextEdit2.Text} - {ex.Message}", Color.Red)
|
ShowStatus($"Unexpeced error saving attribute {TextEdit2.Text} - {ex.Message}", Color.Red)
|
||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
@ -128,7 +131,7 @@
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ShowErrorMessage(ex)
|
FormHelper.ShowErrorMessage(ex, "DeleteAttribute")
|
||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
Imports System.IO.Path
|
Imports System.IO.Path
|
||||||
|
Imports System.Runtime
|
||||||
Imports DigitalData.Modules.Config
|
Imports DigitalData.Modules.Config
|
||||||
Imports DigitalData.Modules.EDMI.API
|
Imports DigitalData.Modules.EDMI.API
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
@ -74,6 +75,9 @@ Namespace My
|
|||||||
Logger = LogConfig.GetLogger()
|
Logger = LogConfig.GetLogger()
|
||||||
Logger.Debug("Starting ZooFlow...")
|
Logger.Debug("Starting ZooFlow...")
|
||||||
|
|
||||||
|
ProfileOptimization.SetProfileRoot("E:\Zooflow")
|
||||||
|
ProfileOptimization.StartProfile("Startup.Profile")
|
||||||
|
|
||||||
If oConfigManager.Config.AppServerConfig <> String.Empty Then
|
If oConfigManager.Config.AppServerConfig <> String.Empty Then
|
||||||
Try
|
Try
|
||||||
Dim oSplit() As String = oConfigManager.Config.AppServerConfig.ToString.Split(":"c)
|
Dim oSplit() As String = oConfigManager.Config.AppServerConfig.ToString.Split(":"c)
|
||||||
|
|||||||
@ -20,6 +20,7 @@ Public Class ClassInit
|
|||||||
|
|
||||||
Private ReadOnly _MainForm As frmFlowForm
|
Private ReadOnly _MainForm As frmFlowForm
|
||||||
Private ReadOnly _Database As DatabaseWithFallback
|
Private ReadOnly _Database As DatabaseWithFallback
|
||||||
|
Private ReadOnly _FormHelper As FormHelper
|
||||||
Private _Loader As ClassInitLoader
|
Private _Loader As ClassInitLoader
|
||||||
|
|
||||||
Public Event Completed As EventHandler
|
Public Event Completed As EventHandler
|
||||||
@ -27,6 +28,7 @@ Public Class ClassInit
|
|||||||
Public Sub New(LogConfig As LogConfig, ParentForm As frmFlowForm)
|
Public Sub New(LogConfig As LogConfig, ParentForm As frmFlowForm)
|
||||||
MyBase.New(LogConfig)
|
MyBase.New(LogConfig)
|
||||||
_MainForm = ParentForm
|
_MainForm = ParentForm
|
||||||
|
_FormHelper = New FormHelper(LogConfig, ParentForm)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub InitializeApplication()
|
Public Sub InitializeApplication()
|
||||||
@ -49,6 +51,37 @@ Public Class ClassInit
|
|||||||
_Loader.Run()
|
_Loader.Run()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub InitCompleted(sender As Object, e As RunWorkerCompletedEventArgs)
|
||||||
|
If Not IsNothing(e.Error) Then
|
||||||
|
Dim oMessageStart = $"Beim Initialisieren des Programms ist folgender Fehler aufgetreten:"
|
||||||
|
Dim oMessageEnd = "Das Program wird nun beendet"
|
||||||
|
Dim oMessage1 = $"{vbNewLine}{vbNewLine}{e.Error.Message}"
|
||||||
|
Dim oMessage2 = ""
|
||||||
|
|
||||||
|
If TypeOf e.Error Is InitException Then
|
||||||
|
Dim oException As InitException = DirectCast(e.Error, InitException)
|
||||||
|
oMessage2 = $"{vbNewLine}{vbNewLine}Details: {oException?.InnerException?.Message}"
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oMessage = $"{oMessageStart}{oMessage1}{oMessage2}{oMessageEnd}"
|
||||||
|
|
||||||
|
Dim oMsgBox As New frmDialog(oMessage, _MainForm.Text, frmDialog.DialogType.Error)
|
||||||
|
oMsgBox.ShowDialog()
|
||||||
|
Application.ExitThread()
|
||||||
|
Else
|
||||||
|
' Copy back state from MyApplication Helper to My.Application
|
||||||
|
Dim oMyApplication As My.MyApplication = DirectCast(e.Result, My.MyApplication)
|
||||||
|
|
||||||
|
My.Application.Settings = oMyApplication.Settings
|
||||||
|
My.Application.User = oMyApplication.User
|
||||||
|
My.Application.Modules = oMyApplication.Modules
|
||||||
|
My.Application.ModulesActive = oMyApplication.ModulesActive
|
||||||
|
My.Application.ClipboardWatcher = oMyApplication.ClipboardWatcher
|
||||||
|
|
||||||
|
RaiseEvent Completed(sender, Nothing)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#Region "=== Init Steps ==="
|
#Region "=== Init Steps ==="
|
||||||
Private Sub InitializeBase(MyApplication As My.MyApplication)
|
Private Sub InitializeBase(MyApplication As My.MyApplication)
|
||||||
@ -358,37 +391,6 @@ Public Class ClassInit
|
|||||||
SplashScreenManager.Default.SendCommand(frmSplash.SplashScreenCommand.SetActionName, Progress.CurrentStep.Name)
|
SplashScreenManager.Default.SendCommand(frmSplash.SplashScreenCommand.SetActionName, Progress.CurrentStep.Name)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub InitCompleted(sender As Object, e As RunWorkerCompletedEventArgs)
|
|
||||||
If Not IsNothing(e.Error) Then
|
|
||||||
Dim oMessageStart = $"Beim Initialisieren des Programms ist folgender Fehler aufgetreten:"
|
|
||||||
Dim oMessageEnd = "Das Program wird nun beendet"
|
|
||||||
Dim oMessage1 = $"{vbNewLine}{vbNewLine}{e.Error.Message}"
|
|
||||||
Dim oMessage2 = ""
|
|
||||||
|
|
||||||
If TypeOf e.Error Is InitException Then
|
|
||||||
Dim oException As InitException = DirectCast(e.Error, InitException)
|
|
||||||
oMessage2 = $"{vbNewLine}{vbNewLine}Details: {oException?.InnerException?.Message}"
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim oMessage = $"{oMessageStart}{oMessage1}{oMessage2}{oMessageEnd}"
|
|
||||||
|
|
||||||
Dim oMsgBox As New frmDialog(oMessage, _MainForm.Text, frmDialog.DialogType.Error)
|
|
||||||
oMsgBox.ShowDialog()
|
|
||||||
Application.ExitThread()
|
|
||||||
Else
|
|
||||||
' Copy back state from MyApplication Helper to My.Application
|
|
||||||
Dim oMyApplication As My.MyApplication = DirectCast(e.Result, My.MyApplication)
|
|
||||||
|
|
||||||
My.Application.Settings = oMyApplication.Settings
|
|
||||||
My.Application.User = oMyApplication.User
|
|
||||||
My.Application.Modules = oMyApplication.Modules
|
|
||||||
My.Application.ModulesActive = oMyApplication.ModulesActive
|
|
||||||
My.Application.ClipboardWatcher = oMyApplication.ClipboardWatcher
|
|
||||||
|
|
||||||
RaiseEvent Completed(sender, Nothing)
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub HandleUserInfo(MyApplication As My.MyApplication, Row As DataRow)
|
Private Sub HandleUserInfo(MyApplication As My.MyApplication, Row As DataRow)
|
||||||
Dim oValue As Object = Row.Item("VALUE")
|
Dim oValue As Object = Row.Item("VALUE")
|
||||||
Dim oName As String = Row.Item("NAME").ToString
|
Dim oName As String = Row.Item("NAME").ToString
|
||||||
|
|||||||
@ -40,6 +40,7 @@ Public Class frmGlobix_Index
|
|||||||
Private Property WindowLocation As ClassWindowLayout
|
Private Property WindowLocation As ClassWindowLayout
|
||||||
Private Property Database As DatabaseWithFallback
|
Private Property Database As DatabaseWithFallback
|
||||||
Private Property Patterns2 As Patterns2
|
Private Property Patterns2 As Patterns2
|
||||||
|
Private ReadOnly FormHelper As FormHelper
|
||||||
|
|
||||||
Private Property OverlayHandle As IOverlaySplashScreenHandle
|
Private Property OverlayHandle As IOverlaySplashScreenHandle
|
||||||
Public Property oSuccess As Boolean = False
|
Public Property oSuccess As Boolean = False
|
||||||
@ -62,6 +63,7 @@ Public Class frmGlobix_Index
|
|||||||
Database = New DatabaseWithFallback(pLogConfig, My.Application.Service.Client, My.DatabaseECM, My.DatabaseIDB)
|
Database = New DatabaseWithFallback(pLogConfig, My.Application.Service.Client, My.DatabaseECM, My.DatabaseIDB)
|
||||||
WindowLocation = New ClassWindowLayout(pLogConfig)
|
WindowLocation = New ClassWindowLayout(pLogConfig)
|
||||||
Patterns2 = New Patterns2(pLogConfig)
|
Patterns2 = New Patterns2(pLogConfig)
|
||||||
|
FormHelper = New FormHelper(pLogConfig, Me)
|
||||||
|
|
||||||
Localizer.Active = New LookupGridLocalizer()
|
Localizer.Active = New LookupGridLocalizer()
|
||||||
End Sub
|
End Sub
|
||||||
@ -183,6 +185,8 @@ Public Class frmGlobix_Index
|
|||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Logger.Warn("Unexpected error DTTBGI_REGEX_DOCTYPE - ErrorMessage: " & vbNewLine & ex.Message)
|
Logger.Warn("Unexpected error DTTBGI_REGEX_DOCTYPE - ErrorMessage: " & vbNewLine & ex.Message)
|
||||||
|
|
||||||
|
FormHelper.ShowErrorMessage(ex, "Laden des Formulars")
|
||||||
Finally
|
Finally
|
||||||
SplashScreenManager.CloseOverlayForm(OverlayHandle)
|
SplashScreenManager.CloseOverlayForm(OverlayHandle)
|
||||||
FormLoaded = True
|
FormLoaded = True
|
||||||
@ -271,8 +275,7 @@ Public Class frmGlobix_Index
|
|||||||
Try
|
Try
|
||||||
DocumentViewer1.LoadFile(My.Application.Globix.CurrentWorkfile.FilePath)
|
DocumentViewer1.LoadFile(My.Application.Globix.CurrentWorkfile.FilePath)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Logger.Error(ex)
|
FormHelper.ShowErrorMessage(ex, "Laden der Vorschau")
|
||||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler in PreviewFile:")
|
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@ -326,8 +329,7 @@ INNER JOIN IDB.dbo.VWIDB_DOCTYPE_LANGUAGE DL ON DT.IDB_DOCTYPE_ID = DL.Doctype_I
|
|||||||
|
|
||||||
DocTypes = oDocTypes
|
DocTypes = oDocTypes
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Logger.Warn("Unexpected error in Refresh_Dokart: " & vbNewLine & ex.Message)
|
FormHelper.ShowErrorMessage(ex, "Laden des Profils")
|
||||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in Laden der Dokumentarten:")
|
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@ -315,8 +315,8 @@ Public Class frmFlowForm
|
|||||||
Else
|
Else
|
||||||
oMsg = "File-Exclusions in Folderwatch could not be created!"
|
oMsg = "File-Exclusions in Folderwatch could not be created!"
|
||||||
End If
|
End If
|
||||||
Dim oMsgBox As New frmDialog(oMsg, Text, frmDialog.DialogType.Warning)
|
|
||||||
oMsgBox.ShowDialog()
|
FormHelper.ShowWarningMessage(oMsg, Text)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Init_Folderwatch()
|
Init_Folderwatch()
|
||||||
@ -508,10 +508,10 @@ Public Class frmFlowForm
|
|||||||
If My.Application.User.Language <> "de-DE" Then
|
If My.Application.User.Language <> "de-DE" Then
|
||||||
oTitle = "Exit Zooflow"
|
oTitle = "Exit Zooflow"
|
||||||
End If
|
End If
|
||||||
Dim oMsgBox As New frmDialog(oMessage, oTitle, frmDialog.DialogType.Question)
|
|
||||||
oMsgBox.ShowDialog()
|
|
||||||
|
|
||||||
If oMsgBox.DialogResult = DialogResult.Yes Then
|
Dim oResult = FormHelper.ShowQuestionMessage(oMessage, oTitle)
|
||||||
|
|
||||||
|
If oResult = DialogResult.Yes Then
|
||||||
Close()
|
Close()
|
||||||
Else
|
Else
|
||||||
ESCHitCount = 0
|
ESCHitCount = 0
|
||||||
@ -613,8 +613,7 @@ Public Class frmFlowForm
|
|||||||
End If
|
End If
|
||||||
If TheFormIsAlreadyLoaded("frmIndexFileList") Then
|
If TheFormIsAlreadyLoaded("frmIndexFileList") Then
|
||||||
Cursor = Cursors.Default
|
Cursor = Cursors.Default
|
||||||
Dim oMsgBox As New frmDialog("Please index the active file first!", "Drag 'n Drop not allowed!", frmDialog.DialogType.Warning)
|
FormHelper.ShowWarningMessage("Please index the active file first!", "Drag 'n Drop not allowed!")
|
||||||
oMsgBox.ShowDialog()
|
|
||||||
Exit Function
|
Exit Function
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -917,8 +916,7 @@ Public Class frmFlowForm
|
|||||||
If ex.Message.Contains("Sammlung wurde geändert") Or ex.Message.Contains("Enumeration") Then
|
If ex.Message.Contains("Sammlung wurde geändert") Or ex.Message.Contains("Enumeration") Then
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Dim oMsgBox As New frmDialog("Error in Work FolderWatch-File:" & vbNewLine & ex.Message, "Drag 'n Drop not allowed!", frmDialog.DialogType.Error)
|
FormHelper.ShowErrorMessage(ex, "Drag 'n Drop not allowed!")
|
||||||
oMsgBox.ShowDialog()
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
@ -34,7 +34,6 @@ Public Class frmServiceConfig
|
|||||||
Try
|
Try
|
||||||
Dim oIPAddress = txtServiceAddress.Text
|
Dim oIPAddress = txtServiceAddress.Text
|
||||||
Dim oPort = Integer.Parse(txtServicePort.Text)
|
Dim oPort = Integer.Parse(txtServicePort.Text)
|
||||||
Dim oEndpointURL = $"net.tcp://{oIPAddress}:{oPort}/DigitalData/Services/Main"
|
|
||||||
|
|
||||||
Client = New Client(My.LogConfig, oIPAddress, oPort)
|
Client = New Client(My.LogConfig, oIPAddress, oPort)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user