zooflow: msgbox
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
Public Class frmAdmin_IDBAttribute
|
||||
Imports DigitalData.GUIs.Common
|
||||
|
||||
Public Class frmAdmin_IDBAttribute
|
||||
Implements IAdminForm
|
||||
|
||||
Public Property HasChanges As Boolean = False Implements IAdminForm.HasChanges
|
||||
@@ -7,15 +9,16 @@
|
||||
Private Const ConstDetail = "Detail"
|
||||
Private Const ConstTranslate = "Translate"
|
||||
Private Property oMode As String = "Detail"
|
||||
Private Property 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
|
||||
@@ -30,7 +33,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()
|
||||
@@ -113,7 +116,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
|
||||
@@ -128,7 +131,7 @@
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
ShowErrorMessage(ex)
|
||||
FormHelper.ShowErrorMessage(ex, "DeleteAttribute")
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.IO.Path
|
||||
Imports System.Runtime
|
||||
Imports DigitalData.Modules.Config
|
||||
Imports DigitalData.Modules.EDMI.API
|
||||
Imports DigitalData.Modules.Logging
|
||||
@@ -74,6 +75,9 @@ Namespace My
|
||||
Logger = LogConfig.GetLogger()
|
||||
Logger.Debug("Starting ZooFlow...")
|
||||
|
||||
ProfileOptimization.SetProfileRoot("E:\Zooflow")
|
||||
ProfileOptimization.StartProfile("Startup.Profile")
|
||||
|
||||
If oConfigManager.Config.AppServerConfig <> String.Empty Then
|
||||
Try
|
||||
Dim oSplit() As String = oConfigManager.Config.AppServerConfig.ToString.Split(":"c)
|
||||
|
||||
@@ -20,6 +20,7 @@ Public Class ClassInit
|
||||
|
||||
Private ReadOnly _MainForm As frmFlowForm
|
||||
Private ReadOnly _Database As DatabaseWithFallback
|
||||
Private ReadOnly _FormHelper As FormHelper
|
||||
Private _Loader As ClassInitLoader
|
||||
|
||||
Public Event Completed As EventHandler
|
||||
@@ -27,6 +28,7 @@ Public Class ClassInit
|
||||
Public Sub New(LogConfig As LogConfig, ParentForm As frmFlowForm)
|
||||
MyBase.New(LogConfig)
|
||||
_MainForm = ParentForm
|
||||
_FormHelper = New FormHelper(LogConfig, ParentForm)
|
||||
End Sub
|
||||
|
||||
Public Sub InitializeApplication()
|
||||
@@ -49,6 +51,37 @@ Public Class ClassInit
|
||||
_Loader.Run()
|
||||
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 ==="
|
||||
Private Sub InitializeBase(MyApplication As My.MyApplication)
|
||||
@@ -358,37 +391,6 @@ Public Class ClassInit
|
||||
SplashScreenManager.Default.SendCommand(frmSplash.SplashScreenCommand.SetActionName, Progress.CurrentStep.Name)
|
||||
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)
|
||||
Dim oValue As Object = Row.Item("VALUE")
|
||||
Dim oName As String = Row.Item("NAME").ToString
|
||||
|
||||
@@ -40,6 +40,7 @@ Public Class frmGlobix_Index
|
||||
Private Property WindowLocation As ClassWindowLayout
|
||||
Private Property Database As DatabaseWithFallback
|
||||
Private Property Patterns2 As Patterns2
|
||||
Private ReadOnly FormHelper As FormHelper
|
||||
|
||||
Private Property OverlayHandle As IOverlaySplashScreenHandle
|
||||
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)
|
||||
WindowLocation = New ClassWindowLayout(pLogConfig)
|
||||
Patterns2 = New Patterns2(pLogConfig)
|
||||
FormHelper = New FormHelper(pLogConfig, Me)
|
||||
|
||||
Localizer.Active = New LookupGridLocalizer()
|
||||
End Sub
|
||||
@@ -183,6 +185,8 @@ Public Class frmGlobix_Index
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Unexpected error DTTBGI_REGEX_DOCTYPE - ErrorMessage: " & vbNewLine & ex.Message)
|
||||
|
||||
FormHelper.ShowErrorMessage(ex, "Laden des Formulars")
|
||||
Finally
|
||||
SplashScreenManager.CloseOverlayForm(OverlayHandle)
|
||||
FormLoaded = True
|
||||
@@ -271,8 +275,7 @@ Public Class frmGlobix_Index
|
||||
Try
|
||||
DocumentViewer1.LoadFile(My.Application.Globix.CurrentWorkfile.FilePath)
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler in PreviewFile:")
|
||||
FormHelper.ShowErrorMessage(ex, "Laden der Vorschau")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -326,8 +329,7 @@ INNER JOIN IDB.dbo.VWIDB_DOCTYPE_LANGUAGE DL ON DT.IDB_DOCTYPE_ID = DL.Doctype_I
|
||||
|
||||
DocTypes = oDocTypes
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Unexpected error in Refresh_Dokart: " & vbNewLine & ex.Message)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in Laden der Dokumentarten:")
|
||||
FormHelper.ShowErrorMessage(ex, "Laden des Profils")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -315,8 +315,8 @@ Public Class frmFlowForm
|
||||
Else
|
||||
oMsg = "File-Exclusions in Folderwatch could not be created!"
|
||||
End If
|
||||
Dim oMsgBox As New frmDialog(oMsg, Text, frmDialog.DialogType.Warning)
|
||||
oMsgBox.ShowDialog()
|
||||
|
||||
FormHelper.ShowWarningMessage(oMsg, Text)
|
||||
End If
|
||||
|
||||
Init_Folderwatch()
|
||||
@@ -508,10 +508,10 @@ Public Class frmFlowForm
|
||||
If My.Application.User.Language <> "de-DE" Then
|
||||
oTitle = "Exit Zooflow"
|
||||
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()
|
||||
Else
|
||||
ESCHitCount = 0
|
||||
@@ -613,8 +613,7 @@ Public Class frmFlowForm
|
||||
End If
|
||||
If TheFormIsAlreadyLoaded("frmIndexFileList") Then
|
||||
Cursor = Cursors.Default
|
||||
Dim oMsgBox As New frmDialog("Please index the active file first!", "Drag 'n Drop not allowed!", frmDialog.DialogType.Warning)
|
||||
oMsgBox.ShowDialog()
|
||||
FormHelper.ShowWarningMessage("Please index the active file first!", "Drag 'n Drop not allowed!")
|
||||
Exit Function
|
||||
End If
|
||||
|
||||
@@ -917,8 +916,7 @@ Public Class frmFlowForm
|
||||
If ex.Message.Contains("Sammlung wurde geändert") Or ex.Message.Contains("Enumeration") Then
|
||||
|
||||
Else
|
||||
Dim oMsgBox As New frmDialog("Error in Work FolderWatch-File:" & vbNewLine & ex.Message, "Drag 'n Drop not allowed!", frmDialog.DialogType.Error)
|
||||
oMsgBox.ShowDialog()
|
||||
FormHelper.ShowErrorMessage(ex, "Drag 'n Drop not allowed!")
|
||||
End If
|
||||
|
||||
End Try
|
||||
|
||||
@@ -34,7 +34,6 @@ Public Class frmServiceConfig
|
||||
Try
|
||||
Dim oIPAddress = txtServiceAddress.Text
|
||||
Dim oPort = Integer.Parse(txtServicePort.Text)
|
||||
Dim oEndpointURL = $"net.tcp://{oIPAddress}:{oPort}/DigitalData/Services/Main"
|
||||
|
||||
Client = New Client(My.LogConfig, oIPAddress, oPort)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user