Save Layout Config in RoamingAppData, LogFiles in LocalAppData
This commit is contained in:
@@ -12,14 +12,18 @@ Namespace My
|
||||
Partial Friend Class MyApplication
|
||||
Private _Logger As Logger
|
||||
|
||||
Private _BaseUserConfigPath As String = Windows.Forms.Application.UserAppDataPath
|
||||
Private _BaseMachineConfigPath As String = Windows.Forms.Application.CommonAppDataPath
|
||||
|
||||
Public Sub App_Startup() Handles Me.Startup
|
||||
Dim oLogConfig As New LogConfig(PathType.AppData)
|
||||
|
||||
' TODO: WHERE SHOULD CONFIG BE SAVED? LOCAL/ROAMING
|
||||
Dim oUIConfigPAth = IO.Path.Combine(Windows.Forms.Application.UserAppDataPath, ClassConstants.FOLDER_NAME_LAYOUT)
|
||||
' 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 oSystemConfigManager As New ConfigManager(Of ClassConfig)(oLogConfig, Windows.Forms.Application.UserAppDataPath, Windows.Forms.Application.CommonAppDataPath)
|
||||
Dim oUIConfigManager As New ConfigManager(Of ClassUIConfig)(oLogConfig, oUIConfigPAth, oUIConfigPAth)
|
||||
' Set up config Managers for Layout and System Configs
|
||||
Dim oSystemConfigManager As New ConfigManager(Of ClassConfig)(oLogConfig, _BaseUserConfigPath, _BaseMachineConfigPath)
|
||||
Dim oUIConfigManager As New ConfigManager(Of ClassUIConfig)(oLogConfig, oUIConfigPath, oUIConfigPath)
|
||||
|
||||
LogConfig = oLogConfig
|
||||
SystemConfigManager = oSystemConfigManager
|
||||
|
||||
Reference in New Issue
Block a user