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)
|
Public Property ResultDataWindowLocation As Point = New Size(0, 0)
|
||||||
<ConnectionStringAppServer>
|
<ConnectionStringAppServer>
|
||||||
Public Property ConnectionStringAppServer As String = ""
|
Public Property ConnectionStringAppServer As String = ""
|
||||||
<AppServerConfig>
|
<GlobalSetting>
|
||||||
Public Property AppServerConfig As String = ""
|
Public Property AppServerConfig As String = ""
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@ -87,15 +87,32 @@ Public Class ClassInit
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function InitBasics()
|
Public Function InitBasics()
|
||||||
Dim UserAppDataPath = Application.UserAppDataPath
|
Dim oUserAppDataPath As String = Application.UserAppDataPath
|
||||||
Dim CommonAppDataPath = Application.CommonAppDataPath
|
Dim oLegacyAppDataPath As String = Application.UserAppDataPath
|
||||||
Dim StartupPath = Application.StartupPath
|
Dim oCommonAppDataPath = Application.CommonAppDataPath
|
||||||
If My.Settings.UseAppConfigConString = True Then
|
Dim oStartupPath = Application.StartupPath
|
||||||
' UserAppDataPath = StartupPath
|
Dim oConfigPrefix As String = My.Settings.UserConfig_Prefix
|
||||||
CommonAppDataPath = StartupPath
|
|
||||||
|
' 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
|
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
|
With ConfigManager.Config
|
||||||
MyConnectionString = DecryptConnectionString(.ConnectionString)
|
MyConnectionString = DecryptConnectionString(.ConnectionString)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user