ZooFlow: Add Startup Path to ConfigManagers
This commit is contained in:
parent
148092eb23
commit
3468544d42
@ -1,8 +1,6 @@
|
||||
Imports Microsoft.VisualBasic.ApplicationServices
|
||||
Imports DigitalData.Modules.Config
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Config
|
||||
Imports DigitalData.Modules.Logging.LogConfig
|
||||
Imports System.Text.RegularExpressions
|
||||
|
||||
Namespace My
|
||||
' Für MyApplication sind folgende Ereignisse verfügbar:
|
||||
@ -17,23 +15,24 @@ Namespace My
|
||||
Private _BaseUserConfigPath As String = Windows.Forms.Application.UserAppDataPath
|
||||
Private _BaseLocalUserConfigPath As String = Windows.Forms.Application.LocalUserAppDataPath
|
||||
Private _BaseMachineConfigPath As String = Windows.Forms.Application.CommonAppDataPath
|
||||
Private _BaseStartupPath As String = Windows.Forms.Application.StartupPath
|
||||
|
||||
Public Sub App_Startup() Handles Me.Startup
|
||||
Dim oLogConfig As New LogConfig(LogPath:=PathType.AppData, CompanyName:="Digital Data", ProductName:="ZooFlow") With {
|
||||
.Debug = True
|
||||
}
|
||||
Dim oLogConfig As New LogConfig(LogPath:=PathType.AppData, CompanyName:="Digital Data", ProductName:="ZooFlow") With {.Debug = True}
|
||||
|
||||
' System Config files like Service Url will be saved in %LocalAppdata% so they will remain on the machine
|
||||
Dim oSystemConfigManager As New ConfigManager(Of ClassConfig)(oLogConfig,
|
||||
_BaseLocalUserConfigPath,
|
||||
_BaseMachineConfigPath)
|
||||
_BaseMachineConfigPath,
|
||||
_BaseStartupPath)
|
||||
|
||||
' Layout files will be saved in %Appdata% (Roaming) so they will be syncronized with the user profile
|
||||
Dim oUIConfigPath = IO.Path.Combine(_BaseUserConfigPath, ClassConstants.FOLDER_NAME_LAYOUT)
|
||||
Dim oUIConfigManager As New ConfigManager(Of ClassUIConfig)(oLogConfig, oUIConfigPath, oUIConfigPath)
|
||||
Dim oUIConfigAlternatePath = IO.Path.Combine(_BaseStartupPath, ClassConstants.FOLDER_NAME_LAYOUT)
|
||||
Dim oUIConfigManager As New ConfigManager(Of ClassUIConfig)(oLogConfig, oUIConfigPath, oUIConfigPath, oUIConfigAlternatePath)
|
||||
|
||||
LogConfig = oLogConfig
|
||||
LogConfig.Debug = True 'oSystemConfigManager.Config.LogDebug
|
||||
LogConfig.Debug = True
|
||||
|
||||
SystemConfigManager = oSystemConfigManager
|
||||
UIConfigManager = oUIConfigManager
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user