Merge branch 'master' of http://dd-vmp07-com04:3000/AppStd/ClipboardWatcher
This commit is contained in:
commit
73679224f8
@ -19,6 +19,6 @@ Public Class ClassConfig
|
||||
Public Property ResultDataWindowLocation As Point = New Size(0, 0)
|
||||
<ConnectionStringAppServer>
|
||||
Public Property ConnectionStringAppServer As String = ""
|
||||
<AppServerConfig>
|
||||
<GlobalSetting>
|
||||
Public Property AppServerConfig As String = ""
|
||||
End Class
|
||||
|
||||
@ -87,15 +87,32 @@ Public Class ClassInit
|
||||
End Function
|
||||
|
||||
Public Function InitBasics()
|
||||
Dim UserAppDataPath = Application.UserAppDataPath
|
||||
Dim CommonAppDataPath = Application.CommonAppDataPath
|
||||
Dim StartupPath = Application.StartupPath
|
||||
If My.Settings.UseAppConfigConString = True Then
|
||||
' UserAppDataPath = StartupPath
|
||||
CommonAppDataPath = StartupPath
|
||||
Dim oUserAppDataPath As String = Application.UserAppDataPath
|
||||
Dim oLegacyAppDataPath As String = Application.UserAppDataPath
|
||||
Dim oCommonAppDataPath = Application.CommonAppDataPath
|
||||
Dim oStartupPath = Application.StartupPath
|
||||
Dim oConfigPrefix As String = My.Settings.UserConfig_Prefix
|
||||
|
||||
' If prefix is configured, use it to create a subfolder in app data and migrate existing data
|
||||
If oConfigPrefix.Length > 0 Then
|
||||
oUserAppDataPath = IO.Path.Combine(Application.UserAppDataPath, oConfigPrefix)
|
||||
|
||||
Dim oConfigUtils As New ConfigUtils(LogConfig)
|
||||
|
||||
If oConfigUtils.TestMigrationNeeded(oUserAppDataPath) Then
|
||||
LogConfig.Debug = True
|
||||
oConfigUtils.MigrateConfig(oLegacyAppDataPath, oUserAppDataPath)
|
||||
LogConfig.Debug = False
|
||||
End If
|
||||
End If
|
||||
|
||||
ConfigManager = New ConfigManager(Of ClassConfig)(LogConfig, UserAppDataPath, CommonAppDataPath, StartupPath)
|
||||
' If AppConfig from Startup Path should be forced, rewrite the common app data path
|
||||
If My.Settings.UseAppConfigConString = True Then
|
||||
' UserAppDataPath = StartupPath
|
||||
oCommonAppDataPath = oStartupPath
|
||||
End If
|
||||
|
||||
ConfigManager = New ConfigManager(Of ClassConfig)(LogConfig, oUserAppDataPath, oCommonAppDataPath, oStartupPath)
|
||||
|
||||
With ConfigManager.Config
|
||||
MyConnectionString = DecryptConnectionString(.ConnectionString)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user