From 53b5d2c5a16cfcb17a829503c4fcdf8ffb8d50ea Mon Sep 17 00:00:00 2001 From: alcexhim Date: Tue, 15 Sep 2015 16:00:09 -0400 Subject: [PATCH] Become more theme-agnostic --- .../MainWindow.cs | 18 ++++-------------- .../WindowsFormsEngine.cs | 9 +++++---- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/CSharp/V5/Engines/WindowsForms/Engines/UniversalEditor.Engines.WindowsForms/MainWindow.cs b/CSharp/V5/Engines/WindowsForms/Engines/UniversalEditor.Engines.WindowsForms/MainWindow.cs index 4d95ec57..a70ea693 100644 --- a/CSharp/V5/Engines/WindowsForms/Engines/UniversalEditor.Engines.WindowsForms/MainWindow.cs +++ b/CSharp/V5/Engines/WindowsForms/Engines/UniversalEditor.Engines.WindowsForms/MainWindow.cs @@ -436,24 +436,14 @@ namespace UniversalEditor.Engines.WindowsForms if (mvarCurrentSolution == null) { - AwesomeControls.Theming.BuiltinThemes.VisualStudio2012Theme theme = (AwesomeControls.Theming.Theme.CurrentTheme as AwesomeControls.Theming.BuiltinThemes.VisualStudio2012Theme); - if (theme != null) - { - theme.SetStatusBarState(AwesomeControls.Theming.BuiltinThemes.VisualStudio2012Theme.StatusBarState.Initial); - sbStatusBar.Refresh(); - } - return; + // AwesomeControls.Theming.Theme.CurrentTheme.Properties["StatusBarState"] = "Initial"; + sbStatusBar.Refresh(); } else { - AwesomeControls.Theming.BuiltinThemes.VisualStudio2012Theme theme = (AwesomeControls.Theming.Theme.CurrentTheme as AwesomeControls.Theming.BuiltinThemes.VisualStudio2012Theme); - if (theme != null) - { - theme.SetStatusBarState(AwesomeControls.Theming.BuiltinThemes.VisualStudio2012Theme.StatusBarState.SolutionLoaded); - sbStatusBar.Refresh(); - } + // AwesomeControls.Theming.Theme.CurrentTheme.Properties["StatusBarState"] = "SolutionLoaded"; + sbStatusBar.Refresh(); } - } #region Editor-Specific Menus diff --git a/CSharp/V5/Engines/WindowsForms/Engines/UniversalEditor.Engines.WindowsForms/WindowsFormsEngine.cs b/CSharp/V5/Engines/WindowsForms/Engines/UniversalEditor.Engines.WindowsForms/WindowsFormsEngine.cs index a513941b..b7c8d072 100644 --- a/CSharp/V5/Engines/WindowsForms/Engines/UniversalEditor.Engines.WindowsForms/WindowsFormsEngine.cs +++ b/CSharp/V5/Engines/WindowsForms/Engines/UniversalEditor.Engines.WindowsForms/WindowsFormsEngine.cs @@ -176,13 +176,14 @@ namespace UniversalEditor.Engines.WindowsForms // TODO: figure out why this is being done on BeforeInitialization and whether we could move it to after // the configuration is initialized, so we can specify the user's favorite theme in a configuration file - AwesomeControls.Theming.BuiltinThemes.VisualStudio2012Theme theme = new AwesomeControls.Theming.BuiltinThemes.VisualStudio2012Theme(AwesomeControls.Theming.BuiltinThemes.VisualStudio2012Theme.ColorMode.Dark); - theme.UseAllCapsMenus = false; - theme.SetStatusBarState(AwesomeControls.Theming.BuiltinThemes.VisualStudio2012Theme.StatusBarState.Initial); + // AwesomeControls.Theming.BuiltinThemes. theme = new AwesomeControls.Theming.BuiltinThemes.VisualStudio2012Theme(AwesomeControls.Theming.BuiltinThemes.VisualStudio2012Theme.ColorMode.Dark); + // theme.UseAllCapsMenus = false; + // theme.SetStatusBarState(AwesomeControls.Theming.BuiltinThemes.VisualStudio2012Theme.StatusBarState.Initial); // AwesomeControls.Theming.BuiltinThemes.Office2003Theme theme = new AwesomeControls.Theming.BuiltinThemes.Office2003Theme(); // AwesomeControls.Theming.BuiltinThemes.OfficeXPTheme theme = new AwesomeControls.Theming.BuiltinThemes.OfficeXPTheme(); // AwesomeControls.Theming.BuiltinThemes.SlickTheme theme = new AwesomeControls.Theming.BuiltinThemes.SlickTheme(); - AwesomeControls.Theming.Theme.CurrentTheme = theme; + AwesomeControls.Theming.Theme.CurrentTheme = AwesomeControls.Theming.Theme.GetByID(new Guid("{25134C94-B1EB-4C38-9B5B-A2E29FC57AE1}")); + // AwesomeControls.Theming.Theme.CurrentTheme.Properties["UseAllCapsMenus"] = false; Glue.ApplicationInformation.ApplicationID = new Guid("{b359fe9a-080a-43fc-ae38-00ba7ac1703e}");