Improve Base Form Properties, Improve PanelManager
This commit is contained in:
@@ -14,8 +14,14 @@ Imports DigitalData.Modules.Logging
|
||||
Public Class BaseForm
|
||||
Inherits Form
|
||||
|
||||
Protected ReadOnly _Logger As Logger
|
||||
Protected ReadOnly _ErrorHandler As ClassErrorHandler
|
||||
Private ReadOnly _Logger As Logger
|
||||
Private ReadOnly _ErrorHandler As ClassErrorHandler
|
||||
|
||||
Protected ReadOnly Property Logger As Logger
|
||||
Get
|
||||
Return _Logger
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub New()
|
||||
' Get the full name of the inheriting form
|
||||
@@ -30,4 +36,8 @@ Public Class BaseForm
|
||||
' depends on a global var like My.LogConfig
|
||||
' you might need to check for its existence with ?
|
||||
End Sub
|
||||
|
||||
Public Sub ShowErrorMessage(Exception As Exception)
|
||||
_ErrorHandler.ShowErrorMessage(Exception)
|
||||
End Sub
|
||||
End Class
|
||||
@@ -17,8 +17,14 @@ Imports DigitalData.Modules.Logging
|
||||
Public Class BaseRibbonForm
|
||||
Inherits RibbonForm
|
||||
|
||||
Protected ReadOnly _Logger As Logger
|
||||
Protected ReadOnly _ErrorHandler As ClassErrorHandler
|
||||
Private ReadOnly _Logger As Logger
|
||||
Private ReadOnly _ErrorHandler As ClassErrorHandler
|
||||
|
||||
Protected ReadOnly Property Logger As Logger
|
||||
Get
|
||||
Return _Logger
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub New()
|
||||
' Get the full name of the inheriting form
|
||||
@@ -34,6 +40,17 @@ Public Class BaseRibbonForm
|
||||
' you might need to check for its existence with ?
|
||||
End Sub
|
||||
|
||||
Public Sub ShowErrorMessage(Exception As Exception)
|
||||
_ErrorHandler.ShowErrorMessage(Exception)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Returns a list of panels that will be show when the form is opened.
|
||||
''' This can be overridden by all inheriting forms to extend the list of panels
|
||||
''' Panels will be created by PanelManager.
|
||||
''' </summary>
|
||||
''' <seealso cref="ClassPanelManager"/>
|
||||
''' <returns>A list of PanelInformation</returns>
|
||||
Public Overridable Function GetInitialPanels() As List(Of PanelInfo)
|
||||
Return New List(Of PanelInfo)
|
||||
End Function
|
||||
|
||||
Reference in New Issue
Block a user