diff --git a/mRemoteV1/Forms/frmOptions.vb b/mRemoteV1/Forms/frmOptions.vb index eaac0f2f..1bba6937 100644 --- a/mRemoteV1/Forms/frmOptions.vb +++ b/mRemoteV1/Forms/frmOptions.vb @@ -1865,6 +1865,7 @@ Public Class frmOptions lvPages.Items(4).Text = My.Language.strSQLServer lvPages.Items(5).Text = My.Language.strTabUpdates lvPages.Items(6).Text = My.Language.strTabAdvanced + lvPages.Items(7).Text = Language.strOptionsTabTheme #If Not PORTABLE Then lblUpdatesExplanation.Text = My.Language.strUpdateCheck #Else @@ -1942,6 +1943,8 @@ Public Class frmOptions chkEncryptCompleteFile.Text = My.Language.strEncryptCompleteConnectionFile lblLanguage.Text = My.Language.strLanguage lblLanguageRestartRequired.Text = String.Format(My.Language.strLanguageRestartRequired, My.Application.Info.ProductName) + btnThemeDelete.Text = Language.strOptionsThemeButtonDelete + btnThemeNew.Text = Language.strOptionsThemeButtonNew End Sub Public Shadows Sub Show(ByVal dockPanel As DockPanel, Optional ByVal initialTab As Integer = 0) @@ -2105,7 +2108,7 @@ Public Class frmOptions Private Sub btnThemeNew_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnThemeNew.Click Dim newTheme As ThemeInfo = ThemeManager.ActiveTheme.Clone() - newTheme.Name = "Unnamed Theme" + newTheme.Name = Language.strUnnamedTheme _themeList.Add(newTheme) diff --git a/mRemoteV1/Language/Language.Designer.vb b/mRemoteV1/Language/Language.Designer.vb index 92aaafb0..d645983e 100644 --- a/mRemoteV1/Language/Language.Designer.vb +++ b/mRemoteV1/Language/Language.Designer.vb @@ -1326,6 +1326,15 @@ Namespace My End Get End Property + ''' + ''' Looks up a localized string similar to Default Theme. + ''' + Friend Shared ReadOnly Property strDefaultTheme() As String + Get + Return ResourceManager.GetString("strDefaultTheme", resourceCulture) + End Get + End Property + ''' ''' Looks up a localized string similar to Detect. ''' @@ -3239,6 +3248,33 @@ Namespace My End Get End Property + ''' + ''' Looks up a localized string similar to Theme. + ''' + Friend Shared ReadOnly Property strOptionsTabTheme() As String + Get + Return ResourceManager.GetString("strOptionsTabTheme", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to &Delete. + ''' + Friend Shared ReadOnly Property strOptionsThemeButtonDelete() As String + Get + Return ResourceManager.GetString("strOptionsThemeButtonDelete", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to &New. + ''' + Friend Shared ReadOnly Property strOptionsThemeButtonNew() As String + Get + Return ResourceManager.GetString("strOptionsThemeButtonNew", resourceCulture) + End Get + End Property + ''' ''' Looks up a localized string similar to Panel Name. ''' @@ -5456,6 +5492,339 @@ Namespace My End Get End Property + ''' + ''' Looks up a localized string similar to Config Panel. + ''' + Friend Shared ReadOnly Property strThemeCategoryConfigPanel() As String + Get + Return ResourceManager.GetString("strThemeCategoryConfigPanel", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Connections Panel. + ''' + Friend Shared ReadOnly Property strThemeCategoryConnectionsPanel() As String + Get + Return ResourceManager.GetString("strThemeCategoryConnectionsPanel", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to General. + ''' + Friend Shared ReadOnly Property strThemeCategoryGeneral() As String + Get + Return ResourceManager.GetString("strThemeCategoryGeneral", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to The background color of the config panel.. + ''' + Friend Shared ReadOnly Property strThemeDescriptionConfigPanelBackgroundColor() As String + Get + Return ResourceManager.GetString("strThemeDescriptionConfigPanelBackgroundColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to The color of the category text in the config panel.. + ''' + Friend Shared ReadOnly Property strThemeDescriptionConfigPanelCategoryTextColor() As String + Get + Return ResourceManager.GetString("strThemeDescriptionConfigPanelCategoryTextColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to The color of the grid lines in the config panel. + ''' + Friend Shared ReadOnly Property strThemeDescriptionConfigPanelGridLineColor() As String + Get + Return ResourceManager.GetString("strThemeDescriptionConfigPanelGridLineColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to The background color of the help area of the config panel.. + ''' + Friend Shared ReadOnly Property strThemeDescriptionConfigPanelHelpBackgroundColor() As String + Get + Return ResourceManager.GetString("strThemeDescriptionConfigPanelHelpBackgroundColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to The color of the text in the help area of the config panel.. + ''' + Friend Shared ReadOnly Property strThemeDescriptionConfigPanelHelpTextColor() As String + Get + Return ResourceManager.GetString("strThemeDescriptionConfigPanelHelpTextColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to The color of the text in the config panel.. + ''' + Friend Shared ReadOnly Property strThemeDescriptionConfigPanelTextColor() As String + Get + Return ResourceManager.GetString("strThemeDescriptionConfigPanelTextColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to The background color of the connections panel.. + ''' + Friend Shared ReadOnly Property strThemeDescriptionConnectionsPanelBackgroundColor() As String + Get + Return ResourceManager.GetString("strThemeDescriptionConnectionsPanelBackgroundColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to The color of the text in the connections panel.. + ''' + Friend Shared ReadOnly Property strThemeDescriptionConnectionsPanelTextColor() As String + Get + Return ResourceManager.GetString("strThemeDescriptionConnectionsPanelTextColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to The color of the tree lines in the connections panel.. + ''' + Friend Shared ReadOnly Property strThemeDescriptionConnectionsPanelTreeLineColor() As String + Get + Return ResourceManager.GetString("strThemeDescriptionConnectionsPanelTreeLineColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to The background color of the menus.. + ''' + Friend Shared ReadOnly Property strThemeDescriptionMenuBackgroundColor() As String + Get + Return ResourceManager.GetString("strThemeDescriptionMenuBackgroundColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to The color of the text in the menus.. + ''' + Friend Shared ReadOnly Property strThemeDescriptionMenuTextColor() As String + Get + Return ResourceManager.GetString("strThemeDescriptionMenuTextColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to The background color of the search box.. + ''' + Friend Shared ReadOnly Property strThemeDescriptionSearchBoxBackgroundColor() As String + Get + Return ResourceManager.GetString("strThemeDescriptionSearchBoxBackgroundColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to The color of the text in the search box.. + ''' + Friend Shared ReadOnly Property strThemeDescriptionSearchBoxTextColor() As String + Get + Return ResourceManager.GetString("strThemeDescriptionSearchBoxTextColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to The color of the prompt text in the search box.. + ''' + Friend Shared ReadOnly Property strThemeDescriptionSearchBoxTextPromptColor() As String + Get + Return ResourceManager.GetString("strThemeDescriptionSearchBoxTextPromptColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to The background color of the toolbars.. + ''' + Friend Shared ReadOnly Property strThemeDescriptionToolbarBackgroundColor() As String + Get + Return ResourceManager.GetString("strThemeDescriptionToolbarBackgroundColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to The color of the text in the toolbars.. + ''' + Friend Shared ReadOnly Property strThemeDescriptionToolbarTextColor() As String + Get + Return ResourceManager.GetString("strThemeDescriptionToolbarTextColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to The background color of the main window.. + ''' + Friend Shared ReadOnly Property strThemeDescriptionWindowBackgroundColor() As String + Get + Return ResourceManager.GetString("strThemeDescriptionWindowBackgroundColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Config Panel Background Color. + ''' + Friend Shared ReadOnly Property strThemeNameConfigPanelBackgroundColor() As String + Get + Return ResourceManager.GetString("strThemeNameConfigPanelBackgroundColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Config Panel Category Text Color. + ''' + Friend Shared ReadOnly Property strThemeNameConfigPanelCategoryTextColor() As String + Get + Return ResourceManager.GetString("strThemeNameConfigPanelCategoryTextColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Config Panel Grid Line Color. + ''' + Friend Shared ReadOnly Property strThemeNameConfigPanelGridLineColor() As String + Get + Return ResourceManager.GetString("strThemeNameConfigPanelGridLineColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Config Panel Help Background Color. + ''' + Friend Shared ReadOnly Property strThemeNameConfigPanelHelpBackgroundColor() As String + Get + Return ResourceManager.GetString("strThemeNameConfigPanelHelpBackgroundColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Config Panel Help Text Color. + ''' + Friend Shared ReadOnly Property strThemeNameConfigPanelHelpTextColor() As String + Get + Return ResourceManager.GetString("strThemeNameConfigPanelHelpTextColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Config Panel Text Color. + ''' + Friend Shared ReadOnly Property strThemeNameConfigPanelTextColor() As String + Get + Return ResourceManager.GetString("strThemeNameConfigPanelTextColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Connections Panel Background Color. + ''' + Friend Shared ReadOnly Property strThemeNameConnectionsPanelBackgroundColor() As String + Get + Return ResourceManager.GetString("strThemeNameConnectionsPanelBackgroundColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Connections Panel Text Color. + ''' + Friend Shared ReadOnly Property strThemeNameConnectionsPanelTextColor() As String + Get + Return ResourceManager.GetString("strThemeNameConnectionsPanelTextColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Connections Panel Tree Line Color. + ''' + Friend Shared ReadOnly Property strThemeNameConnectionsPanelTreeLineColor() As String + Get + Return ResourceManager.GetString("strThemeNameConnectionsPanelTreeLineColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Menu Background Color. + ''' + Friend Shared ReadOnly Property strThemeNameMenuBackgroundColor() As String + Get + Return ResourceManager.GetString("strThemeNameMenuBackgroundColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Menu Text Color. + ''' + Friend Shared ReadOnly Property strThemeNameMenuTextColor() As String + Get + Return ResourceManager.GetString("strThemeNameMenuTextColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Search Box Background Color. + ''' + Friend Shared ReadOnly Property strThemeNameSearchBoxBackgroundColor() As String + Get + Return ResourceManager.GetString("strThemeNameSearchBoxBackgroundColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Search Box Text Color. + ''' + Friend Shared ReadOnly Property strThemeNameSearchBoxTextColor() As String + Get + Return ResourceManager.GetString("strThemeNameSearchBoxTextColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Search Box Text Prompt Color. + ''' + Friend Shared ReadOnly Property strThemeNameSearchBoxTextPromptColor() As String + Get + Return ResourceManager.GetString("strThemeNameSearchBoxTextPromptColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Toolbar Background Color. + ''' + Friend Shared ReadOnly Property strThemeNameToolbarBackgroundColor() As String + Get + Return ResourceManager.GetString("strThemeNameToolbarBackgroundColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Toolbar Text Color. + ''' + Friend Shared ReadOnly Property strThemeNameToolbarTextColor() As String + Get + Return ResourceManager.GetString("strThemeNameToolbarTextColor", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Window Background Color. + ''' + Friend Shared ReadOnly Property strThemeNameWindowBackgroundColor() As String + Get + Return ResourceManager.GetString("strThemeNameWindowBackgroundColor", resourceCulture) + End Get + End Property + ''' ''' Looks up a localized string similar to Error ({0}). ''' @@ -5564,6 +5933,15 @@ Namespace My End Get End Property + ''' + ''' Looks up a localized string similar to Unnamed Theme. + ''' + Friend Shared ReadOnly Property strUnnamedTheme() As String + Get + Return ResourceManager.GetString("strUnnamedTheme", resourceCulture) + End Get + End Property + ''' ''' Looks up a localized string similar to mRemoteNG requires an update. ''' diff --git a/mRemoteV1/Language/Language.resx b/mRemoteV1/Language/Language.resx index 61f2f8dd..29b6c748 100644 --- a/mRemoteV1/Language/Language.resx +++ b/mRemoteV1/Language/Language.resx @@ -2085,4 +2085,130 @@ mRemoteNG will now quit and begin with the installation. Do &not warn me when closing connections + + General + + + The background color of the config panel. + + + The color of the category text in the config panel. + + + The color of the grid lines in the config panel + + + The background color of the help area of the config panel. + + + The color of the text in the help area of the config panel. + + + The color of the text in the config panel. + + + The background color of the connections panel. + + + The color of the text in the connections panel. + + + The color of the tree lines in the connections panel. + + + The background color of the menus. + + + The color of the text in the menus. + + + The background color of the search box. + + + The color of the text in the search box. + + + The color of the prompt text in the search box. + + + The background color of the toolbars. + + + The color of the text in the toolbars. + + + The background color of the main window. + + + Config Panel Background Color + + + Config Panel Category Text Color + + + Config Panel Grid Line Color + + + Config Panel Help Background Color + + + Config Panel Help Text Color + + + Config Panel Text Color + + + Connections Panel Background Color + + + Connections Panel Text Color + + + Connections Panel Tree Line Color + + + Menu Background Color + + + Menu Text Color + + + Search Box Background Color + + + Search Box Text Color + + + Search Box Text Prompt Color + + + Toolbar Background Color + + + Toolbar Text Color + + + Window Background Color + + + Config Panel + + + Connections Panel + + + Default Theme + + + Theme + + + &Delete + + + &New + + + Unnamed Theme + \ No newline at end of file diff --git a/mRemoteV1/Themes/ThemeInfo.vb b/mRemoteV1/Themes/ThemeInfo.vb index ac37a6e5..3cac6c12 100644 --- a/mRemoteV1/Themes/ThemeInfo.vb +++ b/mRemoteV1/Themes/ThemeInfo.vb @@ -1,4 +1,5 @@ Imports System.ComponentModel +Imports mRemoteNG.Tools.LocalizedAttributes Imports mRemoteNG.My Namespace Themes @@ -42,7 +43,7 @@ Namespace Themes #End Region #Region "Properties" - Private _name As String = "Unnamed Theme" + Private _name As String = Language.strUnnamedTheme _ Public Property Name As String Get @@ -57,9 +58,9 @@ Namespace Themes #Region "General" Private _windowBackgroundColor As Color = SystemColors.AppWorkspace - _ + _ Public Property WindowBackgroundColor() As Color Get Return (_windowBackgroundColor) @@ -72,10 +73,10 @@ Namespace Themes End Property Private _menuBackgroundColor As Color = SystemColors.Control - + LocalizedDisplayName("strThemeNameMenuBackgroundColor"), + LocalizedDescription("strThemeDescriptionMenuBackgroundColor")> Public Property MenuBackgroundColor() As Color Get Return _menuBackgroundColor @@ -88,10 +89,10 @@ Namespace Themes End Property Private _menuTextColor As Color = SystemColors.ControlText - + LocalizedDisplayName("strThemeNameMenuTextColor"), + LocalizedDescription("strThemeDescriptionMenuTextColor")> Public Property MenuTextColor() As Color Get Return _menuTextColor @@ -104,10 +105,10 @@ Namespace Themes End Property Private _toolbarBackgroundColor As Color = SystemColors.Control - _ + LocalizedDisplayName("strThemeNameToolbarBackgroundColor"), _ + LocalizedDescription("strThemeDescriptionToolbarBackgroundColor")> _ Public Property ToolbarBackgroundColor() As Color Get Return _toolbarBackgroundColor @@ -120,10 +121,10 @@ Namespace Themes End Property Private _toolbarTextColor As Color = SystemColors.ControlText - _ + LocalizedDisplayName("strThemeNameToolbarTextColor"), _ + LocalizedDescription("strThemeDescriptionToolbarTextColor")> _ Public Property ToolbarTextColor() As Color Get Return _toolbarTextColor @@ -138,9 +139,9 @@ Namespace Themes #Region "Connections Panel" Private _connectionsPanelBackgroundColor As Color = SystemColors.Window - _ + _ Public Property ConnectionsPanelBackgroundColor() As Color Get Return _connectionsPanelBackgroundColor @@ -153,9 +154,9 @@ Namespace Themes End Property Private _connectionsPanelTextColor As Color = SystemColors.WindowText - + Public Property ConnectionsPanelTextColor() As Color Get Return _connectionsPanelTextColor @@ -168,9 +169,9 @@ Namespace Themes End Property Private _connectionsPanelTreeLineColor As Color = Color.Black - + Public Property ConnectionsPanelTreeLineColor() As Color Get Return _connectionsPanelTreeLineColor @@ -183,9 +184,9 @@ Namespace Themes End Property Private _searchBoxBackgroundColor As Color = SystemColors.Window - _ + _ Public Property SearchBoxBackgroundColor() As Color Get Return _searchBoxBackgroundColor @@ -198,9 +199,9 @@ Namespace Themes End Property Private _searchBoxTextPromptColor As Color = SystemColors.GrayText - _ + _ Public Property SearchBoxTextPromptColor() As Color Get Return _searchBoxTextPromptColor @@ -213,9 +214,9 @@ Namespace Themes End Property Private _searchBoxTextColor As Color = SystemColors.WindowText - _ + _ Public Property SearchBoxTextColor() As Color Get Return _searchBoxTextColor @@ -230,9 +231,9 @@ Namespace Themes #Region "Config Panel" Private _configPanelBackgroundColor As Color = SystemColors.Window - _ + _ Public Property ConfigPanelBackgroundColor() As Color Get Return _configPanelBackgroundColor @@ -245,9 +246,9 @@ Namespace Themes End Property Private _configPanelTextColor As Color = SystemColors.WindowText - _ + _ Public Property ConfigPanelTextColor() As Color Get Return _configPanelTextColor @@ -260,9 +261,9 @@ Namespace Themes End Property Private _configPanelCategoryTextColor As Color = SystemColors.ControlText - _ + _ Public Property ConfigPanelCategoryTextColor() As Color Get Return _configPanelCategoryTextColor @@ -275,9 +276,9 @@ Namespace Themes End Property Private _configPanelHelpBackgroundColor As Color = SystemColors.Control - _ + _ Public Property ConfigPanelHelpBackgroundColor() As Color Get Return _configPanelHelpBackgroundColor @@ -290,9 +291,9 @@ Namespace Themes End Property Private _configPanelHelpTextColor As Color = SystemColors.ControlText - _ + _ Public Property ConfigPanelHelpTextColor() As Color Get Return _configPanelHelpTextColor @@ -305,9 +306,9 @@ Namespace Themes End Property Private _configPanelGridLineColor As Color = SystemColors.InactiveBorder - _ + _ Public Property ConfigPanelGridLineColor() As Color Get Return _configPanelGridLineColor diff --git a/mRemoteV1/Themes/ThemeManager.vb b/mRemoteV1/Themes/ThemeManager.vb index f04a64d4..28263950 100644 --- a/mRemoteV1/Themes/ThemeManager.vb +++ b/mRemoteV1/Themes/ThemeManager.vb @@ -1,5 +1,6 @@ Imports System.IO Imports System.ComponentModel +Imports mRemoteNG.My Namespace Themes Public Class ThemeManager @@ -53,7 +54,7 @@ Namespace Themes #Region "Properties" ' ReSharper disable InconsistentNaming - Private Shared ReadOnly _defaultTheme As New ThemeInfo("(Default Theme)") + Private Shared ReadOnly _defaultTheme As New ThemeInfo(Language.strDefaultTheme) ' ReSharper restore InconsistentNaming Public Shared ReadOnly Property DefaultTheme As ThemeInfo Get