ZooFlow: clean up classes, use base class
This commit is contained in:
@@ -3,16 +3,17 @@ Imports DigitalData.GUIs.ZooFlow.My
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class ClassInitLoader
|
||||
Inherits Base.BaseClass
|
||||
|
||||
Private _Worker As BackgroundWorker
|
||||
Private _Logger As Logger
|
||||
Private _CurrentStep As InitStep
|
||||
|
||||
Public Steps As New List(Of InitStep)
|
||||
Public Event ProgressChanged As EventHandler(Of InitProgress)
|
||||
Public Event InitCompleted As EventHandler(Of RunWorkerCompletedEventArgs)
|
||||
|
||||
Public Sub New()
|
||||
_Logger = My.LogConfig.GetLogger()
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
MyBase.New(LogConfig)
|
||||
End Sub
|
||||
|
||||
Public Sub AddStep(Name As String, Action As Action(Of Object), Optional Fatal As Boolean = False)
|
||||
@@ -61,11 +62,11 @@ Public Class ClassInitLoader
|
||||
My.Application.ClipboardWatcher = oMyApplication.ClipboardWatcher
|
||||
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
_Logger.Warn("Init Step '{0}' failed!", oStep.Name)
|
||||
Logger.Error(ex)
|
||||
Logger.Warn("Init Step '{0}' failed!", oStep.Name)
|
||||
|
||||
If oStep.Fatal Then
|
||||
_Logger.Warn("Fatal error in '{0}'. Init will be aborted!", oStep.Name)
|
||||
Logger.Warn("Fatal error in '{0}'. Init will be aborted!", oStep.Name)
|
||||
Throw ex
|
||||
End If
|
||||
End Try
|
||||
|
||||
Reference in New Issue
Block a user