directories per template, export tweaks
This commit is contained in:
@@ -3,9 +3,11 @@ Imports MultiTool.Shared.Exceptions
|
||||
|
||||
Public Class FormHelper
|
||||
Private ReadOnly Logger As Logger
|
||||
Private ReadOnly Form As Windows.Forms.Form
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig)
|
||||
Public Sub New(pLogConfig As LogConfig, pForm As Windows.Forms.Form)
|
||||
Logger = pLogConfig.GetLogger()
|
||||
Form = pForm
|
||||
End Sub
|
||||
|
||||
Public Sub ShowError(pException As Exception, pFunction As String, Optional pDetails As String = "")
|
||||
@@ -24,7 +26,7 @@ Public Class FormHelper
|
||||
End If
|
||||
|
||||
Logger.Error(pException)
|
||||
MsgBox(oMessage, MsgBoxStyle.Critical, Application.ProductName)
|
||||
MsgBox(oMessage, MsgBoxStyle.Critical, Form.Text)
|
||||
End Sub
|
||||
|
||||
Public Sub ShowWarning(pMessage As String, Optional pDetails As String = "")
|
||||
@@ -34,7 +36,25 @@ Public Class FormHelper
|
||||
End If
|
||||
|
||||
Logger.Info(oMessage)
|
||||
MsgBox(oMessage, MsgBoxStyle.Exclamation, Application.ProductName)
|
||||
MsgBox(oMessage, MsgBoxStyle.Exclamation, Form.Text)
|
||||
End Sub
|
||||
|
||||
Public Sub TryOpenDirectory(pPath As String, pDisplayName As String)
|
||||
If IO.Directory.Exists(pPath) Then
|
||||
Process.Start(pPath)
|
||||
Else
|
||||
Dim oMessage = String.Format(My.Resources.frmImportMainExtra._0__nicht_konfiguriert_oder_nicht_gefunden, pDisplayName)
|
||||
MsgBox(oMessage, MsgBoxStyle.Exclamation, Form.Text)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub TryOpenFile(pPath As String, pDisplayName As String)
|
||||
If IO.File.Exists(pPath) Then
|
||||
Process.Start(pPath)
|
||||
Else
|
||||
Dim oMessage = String.Format(My.Resources.frmImportMainExtra._0__nicht_konfiguriert_oder_nicht_gefunden, pDisplayName)
|
||||
MsgBox(oMessage, MsgBoxStyle.Exclamation, Form.Text)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user