Compare commits

..

2 Commits

Author SHA1 Message Date
Jonathan Jenne
6cd68bd776 Version 1.3.4 2021-07-28 15:35:00 +02:00
Jonathan Jenne
d8081ab122 Fix typo, same config for both projects 2021-07-28 15:34:46 +02:00
3 changed files with 7 additions and 23 deletions

View File

@@ -21,9 +21,7 @@ Module Module1
oReturnResult = CODE_SUCCESS oReturnResult = CODE_SUCCESS
' Console.WriteLine("Starting up WIDig...") ' Console.WriteLine("Starting up WIDig...")
Dim opath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) Dim opath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
Dim oLogConfig As New LogConfig(LogConfig.PathType.AppData, Nothing, Nothing, Dim oLogConfig As New LogConfig(LogConfig.PathType.AppData, Nothing, "Console", "Digital Data", "WIDig")
"Digital Data",
"WIDig")
LOGCONFIG = oLogConfig LOGCONFIG = oLogConfig
LOGGER = LOGCONFIG.GetLogger LOGGER = LOGCONFIG.GetLogger
@@ -34,7 +32,7 @@ Module Module1
System.Console.WriteLine($"Starting up WIDig...") System.Console.WriteLine($"Starting up WIDig...")
If Connect2Windream(oUserPW) = True Then If Connect2Windream(oUserPW) = False Then
Throw New ApplicationException("Could not initialize windream") Throw New ApplicationException("Could not initialize windream")
End If End If
@@ -82,17 +80,9 @@ Module Module1
End Function End Function
Public Sub InitUserConfig() Public Sub InitUserConfig()
Dim oProgramDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Digital Data", "WIDig") Dim oProgramDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Digital Data", "WIDig")
Dim oUserAppDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Digital Data", "WIDig") Dim oUserAppDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Digital Data", "WIDig")
CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, oUserAppDataPath, oProgramDataPath) 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 End Sub
Public Function InitDatabase() As Boolean Public Function InitDatabase() As Boolean
If CONFIG.Config.ConnectionString.Length = 0 Then If CONFIG.Config.ConnectionString.Length = 0 Then

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.3.3.0")> <Assembly: AssemblyVersion("1.3.4.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")> <Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@@ -8,11 +8,7 @@ Public Class frmMain
Try Try
Me.Hide() Me.Hide()
Me.Visible = False Me.Visible = False
Dim oLogConfig As New LogConfig(LogConfig.PathType.CustomPath, Dim oLogConfig As New LogConfig(LogConfig.PathType.AppData, Nothing, "Form", "Digital Data", "WIDig")
Application.LocalUserAppDataPath & "\Log",
Nothing,
My.Application.Info.CompanyName,
My.Application.Info.ProductName)
LOGCONFIG = oLogConfig LOGCONFIG = oLogConfig
LOGGER = LOGCONFIG.GetLogger LOGGER = LOGCONFIG.GetLogger
@@ -55,11 +51,9 @@ Public Class frmMain
End Sub End Sub
Public Sub InitUserConfig() Public Sub InitUserConfig()
CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, Application.UserAppDataPath, Application.CommonAppDataPath, Application.StartupPath) Dim oProgramDataPath = IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Digital Data", "WIDig")
LOGGER.Info("Config loaded") Dim oUserAppDataPath = IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Digital Data", "WIDig")
CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, oUserAppDataPath, oProgramDataPath)
'Settings_Load()
End Sub End Sub
Private Function Connect2Windream(oPW As String) Private Function Connect2Windream(oPW As String)
Try Try