Change theme settings file name to Themes.xml and moved it to a Const in App.Info.Settings.

This commit is contained in:
Riley McArdle
2013-03-12 20:18:13 -05:00
parent 7e5e1e6342
commit bb42a31486
3 changed files with 3 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ Namespace App
#End If
Public Shared ReadOnly LayoutFileName As String = "pnlLayout.xml"
Public Shared ReadOnly ExtAppsFilesName As String = "extApps.xml"
Public Const ThemesFileName As String = "Themes.xml"
End Class
Public Class Update

View File

@@ -50,7 +50,7 @@ Public Class frmMain
Try
AddHandler Windows.Theme.ThemeChanged, AddressOf ApplyThemes
Dim themes As List(Of Theme) = ThemeSerializer.LoadFromXmlFile(Path.Combine(App.Info.Settings.SettingsPath, "Theme.xml"))
Dim themes As List(Of Theme) = ThemeSerializer.LoadFromXmlFile(Path.Combine(App.Info.Settings.SettingsPath, App.Info.Settings.ThemesFileName))
If themes.Count Then Windows.Theme.FromTheme(themes(0))
Catch ex As Exception
Debug.Print(ex.Message)

View File

@@ -1781,7 +1781,7 @@ Public Class frmOptions
My.Settings.XULRunnerPath = Me.txtXULrunnerPath.Text
Config.ThemeSerializer.SaveToXmlFile(Windows.Theme, Path.Combine(App.Info.Settings.SettingsPath, "Theme.xml"))
Config.ThemeSerializer.SaveToXmlFile(Windows.Theme, Path.Combine(App.Info.Settings.SettingsPath, App.Info.Settings.ThemesFileName))
If My.Settings.LoadConsFromCustomLocation = False Then
App.Runtime.SetMainFormText(App.Info.Connections.DefaultConnectionsPath & "\" & App.Info.Connections.DefaultConnectionsFile)