34 lines
929 B
VB.net
34 lines
929 B
VB.net
Imports DevExpress.XtraBars.Ribbon
|
|
Imports DigitalData.Modules.Logging
|
|
|
|
Partial Public MustInherit Class BaseForm
|
|
Inherits RibbonForm
|
|
|
|
Private Logger As Logger
|
|
|
|
Public Sub New()
|
|
Logger = My.LogConfig.GetLogger
|
|
End Sub
|
|
|
|
Public Sub ShowInfo(Message As String)
|
|
MessageBox.Show(Message, Text, MessageBoxButtons.OK, MessageBoxIcon.Information)
|
|
End Sub
|
|
|
|
Public Sub ShowError(Message As String)
|
|
MessageBox.Show(Message, Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
|
End Sub
|
|
|
|
Public Sub ShowError(Exception As Exception)
|
|
Dim oCallingClass = LogConfig.GetClassFullName(IncludeMethodNames:=True)
|
|
Logger.Error(Exception)
|
|
ShowError($"Error in {oCallingClass}:{vbNewLine}{Exception.Message}")
|
|
End Sub
|
|
End Class
|
|
|
|
Public Class BaseFormImpl
|
|
Inherits BaseForm
|
|
End Class
|
|
|
|
Partial Public Class frmAdmin_Base
|
|
Inherits BaseFormImpl
|
|
End Class |