Use Computer Config

This commit is contained in:
Jonathan Jenne
2021-07-28 14:02:34 +02:00
parent 48f3038c0d
commit 9956741457

View File

@@ -19,7 +19,7 @@ Module Module1
Dim opath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
Dim oLogConfig As New LogConfig(LogConfig.PathType.AppData, Nothing, Nothing,
"Digital Data",
"WIDigCons")
"WIDig")
LOGCONFIG = oLogConfig
LOGGER = LOGCONFIG.GetLogger
@@ -82,12 +82,16 @@ Module Module1
End Function
Public Sub InitUserConfig()
Dim oUserAppDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
oUserAppDataPath = oUserAppDataPath & "\Digital Data\WIDigDat"
Dim oCommonAppDataPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)
CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, oUserAppDataPath, System.AppDomain.CurrentDomain.BaseDirectory, oCommonAppDataPath)
System.Console.WriteLine($"Config loaded!")
LOGGER.Info("Config loaded")
Dim oProgramDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Digital Data", "WIDig")
Dim oUserAppDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Digital Data", "WIDig")
CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, oUserAppDataPath, oProgramDataPath)
'oUserAppDataPath = oUserAppDataPath & "\Digital Data\WIDigDat"
'Dim oCommonAppDataPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)
'CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, oUserAppDataPath, System.AppDomain.CurrentDomain.BaseDirectory, oCommonAppDataPath)
'System.Console.WriteLine($"Config loaded!")
'LOGGER.Info("Config loaded")
'Settings_Load()
End Sub
Public Function InitDatabase() As Boolean