diff --git a/mRemoteV1/App/Info/SettingsFileInfo.cs b/mRemoteV1/App/Info/SettingsFileInfo.cs
index f4ce9d72..812259a7 100644
--- a/mRemoteV1/App/Info/SettingsFileInfo.cs
+++ b/mRemoteV1/App/Info/SettingsFileInfo.cs
@@ -13,5 +13,7 @@ namespace mRemoteNG.App.Info
public static string LayoutFileName { get; } = "pnlLayout.xml";
public static string ExtAppsFilesName { get; } = "extApps.xml";
public static string ThemesFileName { get; } = "Themes.xml";
+ public static string ThemeFolder { get; } = SettingsPath != null ? Path.Combine(SettingsPath, "Themes") : String.Empty;
+ public static string InstalledThemeFolder { get; } = ExePath != null ? Path.Combine(ExePath, "Themes") : String.Empty;
}
}
\ No newline at end of file
diff --git a/mRemoteV1/Themes/ThemeManager.cs b/mRemoteV1/Themes/ThemeManager.cs
index 772cd4e2..6941446e 100644
--- a/mRemoteV1/Themes/ThemeManager.cs
+++ b/mRemoteV1/Themes/ThemeManager.cs
@@ -1,3 +1,6 @@
+using mRemoteNG.App;
+using mRemoteNG.Messages;
+using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
@@ -66,47 +69,72 @@ namespace mRemoteNG.Themes
themes = new Hashtable();
//Load the files in theme folder first, to incluide vstheme light as default
- string execPath = App.Info.SettingsFileInfo.SettingsPath;
- if(execPath != null)
+ string themePath = App.Info.SettingsFileInfo.ThemeFolder;
+ if (themePath != null)
{
- //Check that theme folder exist before trying to load themes
- if(Directory.Exists(Path.Combine(execPath, "themes")))
+ try
{
- string[] themeFiles = Directory.GetFiles(Path.Combine(execPath, "themes"), "*.vstheme");
- string defaultThemeURL = Directory.GetFiles(Path.Combine(execPath, "themes"), "vs2015light" + ".vstheme")[0];
- //First we load the default theme, its vs2015light
- ThemeInfo defaultTheme = ThemeSerializer.LoadFromXmlFile(defaultThemeURL);
- themes.Add(defaultTheme.Name, defaultTheme);
- //Then the rest
- foreach (string themeFile in themeFiles)
+ //In install mode first time is necesary to copy the themes folder
+ if (!Directory.Exists(themePath))
{
- //filter default one
- ThemeInfo extTheme = ThemeSerializer.LoadFromXmlFile(themeFile, defaultTheme);
- if (extTheme.Theme != null && !themes.ContainsKey(extTheme.Name))
- {
- themes.Add(extTheme.Name, extTheme);
- }
+ Directory.CreateDirectory(themePath);
+
+ }
+ DirectoryInfo orig = new DirectoryInfo(App.Info.SettingsFileInfo.InstalledThemeFolder);
+ FileInfo[] files = orig.GetFiles();
+ foreach (FileInfo file in files)
+ {
+
+ if (!File.Exists(Path.Combine(themePath, file.Name)))
+ file.CopyTo(Path.Combine(themePath, file.Name), true);
}
- //Load the embedded themes, extended palettes are taken from the vs2015 themes, trying to match the color theme
- ThemeInfo vs2003 = new ThemeInfo("Vs2003", new VS2003Theme(), "", VisualStudioToolStripExtender.VsVersion.Vs2003, ((ThemeInfo)themes["vs2015light"]).ExtendedPalette);
- themes.Add(vs2003.Name, vs2003);
- ThemeInfo vs2005 = new ThemeInfo("Vs2005", new VS2005Theme(), "", VisualStudioToolStripExtender.VsVersion.Vs2005, ((ThemeInfo)themes["vs2015light"]).ExtendedPalette);
- themes.Add(vs2005.Name, vs2005);
- ThemeInfo vs2012Light = new ThemeInfo("vs2012Light", new VS2012LightTheme(), "", VisualStudioToolStripExtender.VsVersion.Vs2012, ((ThemeInfo)themes["vs2015light"]).ExtendedPalette);
- themes.Add(vs2012Light.Name, vs2012Light);
- ThemeInfo vs2012Dark = new ThemeInfo("vs2012Dark", new VS2012DarkTheme(), "", VisualStudioToolStripExtender.VsVersion.Vs2012, ((ThemeInfo)themes["vs2015dark"]).ExtendedPalette);
- themes.Add(vs2012Dark.Name, vs2012Dark);
- ThemeInfo vs2012Blue = new ThemeInfo("vs2012Blue", new VS2012BlueTheme(), "", VisualStudioToolStripExtender.VsVersion.Vs2012, ((ThemeInfo)themes["vs2015blue"]).ExtendedPalette);
- themes.Add(vs2012Blue.Name, vs2012Blue);
- ThemeInfo vs2013Light = new ThemeInfo("vs2013Light", new VS2013LightTheme(), "", VisualStudioToolStripExtender.VsVersion.Vs2013, ((ThemeInfo)themes["vs2015light"]).ExtendedPalette);
- themes.Add(vs2013Light.Name, vs2013Light);
- ThemeInfo vs2013Dark = new ThemeInfo("vs2013Dark", new VS2013DarkTheme(), "", VisualStudioToolStripExtender.VsVersion.Vs2013, ((ThemeInfo)themes["vs2015dark"]).ExtendedPalette);
- themes.Add(vs2013Dark.Name, vs2013Dark);
- ThemeInfo vs2013Blue = new ThemeInfo("vs2013Blue", new VS2013BlueTheme(), "", VisualStudioToolStripExtender.VsVersion.Vs2013, ((ThemeInfo)themes["vs2015blue"]).ExtendedPalette);
- themes.Add(vs2013Blue.Name, vs2013Blue);
- }
+
+ //Check that theme folder exist before trying to load themes
+ if (Directory.Exists(themePath))
+ {
+ string[] themeFiles = Directory.GetFiles(themePath, "*.vstheme");
+ string defaultThemeURL = Directory.GetFiles(themePath, "vs2015light" + ".vstheme")[0];
+ //First we load the default theme, its vs2015light
+ ThemeInfo defaultTheme = ThemeSerializer.LoadFromXmlFile(defaultThemeURL);
+ themes.Add(defaultTheme.Name, defaultTheme);
+ //Then the rest
+ foreach (string themeFile in themeFiles)
+ {
+ //filter default one
+ ThemeInfo extTheme = ThemeSerializer.LoadFromXmlFile(themeFile, defaultTheme);
+ if (extTheme.Theme != null && !themes.ContainsKey(extTheme.Name))
+ {
+ themes.Add(extTheme.Name, extTheme);
+ }
+ }
+
+
+ //Load the embedded themes, extended palettes are taken from the vs2015 themes, trying to match the color theme
+ ThemeInfo vs2003 = new ThemeInfo("Vs2003", new VS2003Theme(), "", VisualStudioToolStripExtender.VsVersion.Vs2003, ((ThemeInfo)themes["vs2015light"]).ExtendedPalette);
+ themes.Add(vs2003.Name, vs2003);
+ ThemeInfo vs2005 = new ThemeInfo("Vs2005", new VS2005Theme(), "", VisualStudioToolStripExtender.VsVersion.Vs2005, ((ThemeInfo)themes["vs2015light"]).ExtendedPalette);
+ themes.Add(vs2005.Name, vs2005);
+ ThemeInfo vs2012Light = new ThemeInfo("vs2012Light", new VS2012LightTheme(), "", VisualStudioToolStripExtender.VsVersion.Vs2012, ((ThemeInfo)themes["vs2015light"]).ExtendedPalette);
+ themes.Add(vs2012Light.Name, vs2012Light);
+ ThemeInfo vs2012Dark = new ThemeInfo("vs2012Dark", new VS2012DarkTheme(), "", VisualStudioToolStripExtender.VsVersion.Vs2012, ((ThemeInfo)themes["vs2015dark"]).ExtendedPalette);
+ themes.Add(vs2012Dark.Name, vs2012Dark);
+ ThemeInfo vs2012Blue = new ThemeInfo("vs2012Blue", new VS2012BlueTheme(), "", VisualStudioToolStripExtender.VsVersion.Vs2012, ((ThemeInfo)themes["vs2015blue"]).ExtendedPalette);
+ themes.Add(vs2012Blue.Name, vs2012Blue);
+ ThemeInfo vs2013Light = new ThemeInfo("vs2013Light", new VS2013LightTheme(), "", VisualStudioToolStripExtender.VsVersion.Vs2013, ((ThemeInfo)themes["vs2015light"]).ExtendedPalette);
+ themes.Add(vs2013Light.Name, vs2013Light);
+ ThemeInfo vs2013Dark = new ThemeInfo("vs2013Dark", new VS2013DarkTheme(), "", VisualStudioToolStripExtender.VsVersion.Vs2013, ((ThemeInfo)themes["vs2015dark"]).ExtendedPalette);
+ themes.Add(vs2013Dark.Name, vs2013Dark);
+ ThemeInfo vs2013Blue = new ThemeInfo("vs2013Blue", new VS2013BlueTheme(), "", VisualStudioToolStripExtender.VsVersion.Vs2013, ((ThemeInfo)themes["vs2015blue"]).ExtendedPalette);
+ themes.Add(vs2013Blue.Name, vs2013Blue);
+ }
+ }
+ catch(Exception ex )
+ {
+ Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "Error loading themes" + Environment.NewLine + ex.Message, true);
+ }
+
}
}
diff --git a/mRemoteV1/Tools/DesignModeTest.cs b/mRemoteV1/Tools/DesignModeTest.cs
deleted file mode 100644
index 17c04eb3..00000000
--- a/mRemoteV1/Tools/DesignModeTest.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-using System.Reflection;
-
-
-//Taken from https://www.codeproject.com/Tips/447319/Resolve-DesignMode-for-a-user-control
-//Help to determine design mode is true in custom controls
-namespace mRemoteNG.Tools
-{
- public static class DesignModeTest
- {
- ///
- /// Extension method to return if the control is in design mode
- ///
- /// Control to examine
- /// True if in design mode, otherwise false
- public static bool IsInDesignMode(this System.Windows.Forms.Control control)
- {
- return ResolveDesignMode(control);
- }
-
- ///
- /// Method to test if the control or it's parent is in design mode
- ///
- /// Control to examine
- /// True if in design mode, otherwise false
- private static bool ResolveDesignMode(System.Windows.Forms.Control control)
- {
- // Get the protected property
- var designModeProperty = control.GetType().GetProperty(
- "DesignMode",
- BindingFlags.Instance
- | BindingFlags.NonPublic);
-
- // Get the controls DesignMode value
- var designMode = designModeProperty != null && (bool)designModeProperty.GetValue(control, null);
-
- // Test the parent if it exists
- if (control.Parent != null)
- {
- designMode |= ResolveDesignMode(control.Parent);
- }
-
- return designMode;
- }
- }
-}
diff --git a/mRemoteV1/UI/Controls/Base/NGButton.cs b/mRemoteV1/UI/Controls/Base/NGButton.cs
index cdd8d1a3..5403d93d 100644
--- a/mRemoteV1/UI/Controls/Base/NGButton.cs
+++ b/mRemoteV1/UI/Controls/Base/NGButton.cs
@@ -13,6 +13,9 @@ namespace mRemoteNG.UI.Controls.Base
{
private ThemeManager _themeManager ;
+ ///
+ /// Store the mouse state, required for coloring the component according to the mouse state
+ ///
public enum MouseState
{
HOVER,
@@ -27,10 +30,12 @@ namespace mRemoteNG.UI.Controls.Base
public MouseState _mice { get; set; }
+ ///
+ /// Rewrite the function to allow for coloring the component depending on the mouse state
+ ///
protected override void OnCreateControl()
{
- base.OnCreateControl();
- if (Tools.DesignModeTest.IsInDesignMode(this)) return;
+ base.OnCreateControl();
_themeManager = ThemeManager.getInstance();
if (_themeManager.ThemingActive)
{
@@ -63,9 +68,14 @@ namespace mRemoteNG.UI.Controls.Base
}
}
+
+ ///
+ /// Repaint the componente, the elements considered are the clipping rectangle, text and an icon
+ ///
+ ///
protected override void OnPaint(PaintEventArgs e)
{
- if (Tools.DesignModeTest.IsInDesignMode(this) || !_themeManager.ThemingActive)
+ if (!_themeManager.ThemingActive)
{
base.OnPaint(e);
return;
diff --git a/mRemoteV1/UI/Controls/Base/NGCheckBox.cs b/mRemoteV1/UI/Controls/Base/NGCheckBox.cs
index 1019e10f..fb75a651 100644
--- a/mRemoteV1/UI/Controls/Base/NGCheckBox.cs
+++ b/mRemoteV1/UI/Controls/Base/NGCheckBox.cs
@@ -26,8 +26,7 @@ namespace mRemoteNG.UI.Controls.Base
protected override void OnCreateControl()
{
- base.OnCreateControl();
- if (Tools.DesignModeTest.IsInDesignMode(this)) return;
+ base.OnCreateControl();
_themeManager = ThemeManager.getInstance();
if (!_themeManager.ThemingActive) return;
_mice = MouseState.OUT;
@@ -60,7 +59,7 @@ namespace mRemoteNG.UI.Controls.Base
protected override void OnPaint(PaintEventArgs e)
{
- if (Tools.DesignModeTest.IsInDesignMode(this) || !_themeManager.ThemingActive)
+ if ( !_themeManager.ThemingActive)
{
base.OnPaint(e);
return;
@@ -108,7 +107,7 @@ namespace mRemoteNG.UI.Controls.Base
if (Checked)
{
- e.Graphics.DrawString("ü", new Font("Wingdings", 9f), new SolidBrush(glyph), -1, 1);
+ e.Graphics.DrawString("\u2714", new Font(Font.FontFamily, 7f), new SolidBrush(glyph), -1, 1);
}
var textRect = new Rectangle(16, 0, Width - 16, Height);
diff --git a/mRemoteV1/UI/Controls/Base/NGComboBox.cs b/mRemoteV1/UI/Controls/Base/NGComboBox.cs
index ed0d1b2e..a3ca197b 100644
--- a/mRemoteV1/UI/Controls/Base/NGComboBox.cs
+++ b/mRemoteV1/UI/Controls/Base/NGComboBox.cs
@@ -24,8 +24,7 @@ namespace mRemoteNG.UI.Controls.Base
protected override void OnCreateControl()
{
- base.OnCreateControl();
- if (Tools.DesignModeTest.IsInDesignMode(this)) return;
+ base.OnCreateControl();
_themeManager = ThemeManager.getInstance();
if (!_themeManager.ThemingActive) return;
_themeManager = ThemeManager.getInstance();
@@ -89,7 +88,7 @@ namespace mRemoteNG.UI.Controls.Base
protected override void OnPaint(PaintEventArgs e)
{
- if (Tools.DesignModeTest.IsInDesignMode(this) || !_themeManager.ThemingActive)
+ if ( !_themeManager.ThemingActive)
{
base.OnPaint(e);
return;
@@ -130,7 +129,7 @@ namespace mRemoteNG.UI.Controls.Base
}
//Arrow
- e.Graphics.DrawString("q", new Font("Wingdings 3", 8f), new SolidBrush(ButtFore), Width-17, Height/2 -5);
+ e.Graphics.DrawString("\u25BC", this.Font, new SolidBrush(ButtFore), Width-17, Height/2 -5);
//Text
var textRect = new Rectangle(2, 2, Width - 20, Height - 4);
diff --git a/mRemoteV1/UI/Controls/Base/NGGroupBox.cs b/mRemoteV1/UI/Controls/Base/NGGroupBox.cs
index 093b6123..4fbaf951 100644
--- a/mRemoteV1/UI/Controls/Base/NGGroupBox.cs
+++ b/mRemoteV1/UI/Controls/Base/NGGroupBox.cs
@@ -18,8 +18,7 @@ namespace mRemoteNG.UI.Controls.Base
protected override void OnCreateControl()
{
- base.OnCreateControl();
- if (Tools.DesignModeTest.IsInDesignMode(this)) return;
+ base.OnCreateControl();
_themeManager = ThemeManager.getInstance();
if (_themeManager.ThemingActive)
{
@@ -29,7 +28,7 @@ namespace mRemoteNG.UI.Controls.Base
protected override void OnPaint(PaintEventArgs e)
{
- if (Tools.DesignModeTest.IsInDesignMode(this) || !_themeManager.ThemingActive)
+ if ( !_themeManager.ThemingActive)
{
base.OnPaint(e);
return;
diff --git a/mRemoteV1/UI/Controls/Base/NGLabel.cs b/mRemoteV1/UI/Controls/Base/NGLabel.cs
index 2e49dc46..b2775bf5 100644
--- a/mRemoteV1/UI/Controls/Base/NGLabel.cs
+++ b/mRemoteV1/UI/Controls/Base/NGLabel.cs
@@ -22,9 +22,9 @@ namespace mRemoteNG.UI.Controls.Base
protected override void OnCreateControl()
{
base.OnCreateControl();
- if (!Tools.DesignModeTest.IsInDesignMode(this))
- {
- _themeManager = ThemeManager.getInstance();
+ _themeManager = ThemeManager.getInstance();
+ if (_themeManager.ThemingActive)
+ {
Invalidate();
}
}
@@ -32,7 +32,7 @@ namespace mRemoteNG.UI.Controls.Base
protected override void OnPaint(PaintEventArgs e)
{
- if (Tools.DesignModeTest.IsInDesignMode(this) || !_themeManager.ThemingActive)
+ if (!_themeManager.ThemingActive)
{
base.OnPaint(e);
return;
diff --git a/mRemoteV1/UI/Controls/Base/NGListView.cs b/mRemoteV1/UI/Controls/Base/NGListView.cs
index f42f0308..35c69c7a 100644
--- a/mRemoteV1/UI/Controls/Base/NGListView.cs
+++ b/mRemoteV1/UI/Controls/Base/NGListView.cs
@@ -24,9 +24,7 @@ namespace mRemoteNG.UI.Controls.Base
protected override void OnCreateControl()
{
- base.OnCreateControl();
- if (Tools.DesignModeTest.IsInDesignMode(this))
- return;
+ base.OnCreateControl();
var _themeManager = ThemeManager.getInstance();
if (!_themeManager.ThemingActive) return;
//List back color
diff --git a/mRemoteV1/UI/Controls/Base/NGNumericUpDown.cs b/mRemoteV1/UI/Controls/Base/NGNumericUpDown.cs
index 370b19ac..9afc7d92 100644
--- a/mRemoteV1/UI/Controls/Base/NGNumericUpDown.cs
+++ b/mRemoteV1/UI/Controls/Base/NGNumericUpDown.cs
@@ -16,14 +16,13 @@ namespace mRemoteNG.UI.Controls.Base
public NGNumericUpDown() : base()
{
+ _themeManager = ThemeManager.getInstance();
ThemeManager.getInstance().ThemeChanged += OnCreateControl;
}
protected override void OnCreateControl()
{
- base.OnCreateControl();
- if (Tools.DesignModeTest.IsInDesignMode(this)) return;
- _themeManager = ThemeManager.getInstance();
+ base.OnCreateControl();
if (!_themeManager.ThemingActive) return;
ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Foreground");
BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Background");
@@ -33,15 +32,15 @@ namespace mRemoteNG.UI.Controls.Base
//Add new themable buttons
Up = new NGButton
{
- Text = "p",
- Font = new Font("Wingdings 3", 6f)
+ Text = "\u25B2",
+ Font = new Font(Font.FontFamily, 6f)
};
Up.SetBounds(Width - 17, 1, 16, Height / 2 - 1);
Up.Click += Up_Click;
Down = new NGButton
{
- Text = "q",
- Font = new Font("Wingdings 3", 6f)
+ Text = "\u25BC",
+ Font = new Font(Font.FontFamily, 6f)
};
Down.SetBounds(Width - 17, Height/2, 16, Height / 2 - 1);
Down.Click += Down_Click;
@@ -63,22 +62,18 @@ namespace mRemoteNG.UI.Controls.Base
protected override void OnEnabledChanged(EventArgs e)
{
- if (!Tools.DesignModeTest.IsInDesignMode(this))
+ if (_themeManager.ThemingActive)
{
- _themeManager = ThemeManager.getInstance();
- if (_themeManager.ThemingActive)
+ if (Enabled)
{
- if (Enabled)
- {
- ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Foreground");
- BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Background");
- }
- else
- {
- BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Disabled_Background");
- }
+ ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Foreground");
+ BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Background");
}
- }
+ else
+ {
+ BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Disabled_Background");
+ }
+ }
base.OnEnabledChanged(e);
Invalidate();
}
@@ -88,7 +83,6 @@ namespace mRemoteNG.UI.Controls.Base
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
- if (Tools.DesignModeTest.IsInDesignMode(this)) return;
if (!_themeManager.ThemingActive) return;
//Fix Border
if (BorderStyle != BorderStyle.None)
diff --git a/mRemoteV1/UI/Controls/Base/NGProgressBar.cs b/mRemoteV1/UI/Controls/Base/NGProgressBar.cs
index 5a10cd9c..f45bfe73 100644
--- a/mRemoteV1/UI/Controls/Base/NGProgressBar.cs
+++ b/mRemoteV1/UI/Controls/Base/NGProgressBar.cs
@@ -18,8 +18,7 @@ namespace mRemoteNG.UI.Controls.Base
protected override void OnCreateControl()
{
- base.OnCreateControl();
- if (Tools.DesignModeTest.IsInDesignMode(this)) return;
+ base.OnCreateControl();
_themeManager = ThemeManager.getInstance();
if (!_themeManager.ThemingActive) return;
SetStyle(ControlStyles.UserPaint, true);
@@ -29,7 +28,7 @@ namespace mRemoteNG.UI.Controls.Base
protected override void OnPaint(PaintEventArgs e)
{
- if (Tools.DesignModeTest.IsInDesignMode(this) || !_themeManager.ThemingActive)
+ if ( !_themeManager.ThemingActive)
{
base.OnPaint(e);
return;
diff --git a/mRemoteV1/UI/Controls/Base/NGRadioButton.cs b/mRemoteV1/UI/Controls/Base/NGRadioButton.cs
index f5282dfd..6b480f5e 100644
--- a/mRemoteV1/UI/Controls/Base/NGRadioButton.cs
+++ b/mRemoteV1/UI/Controls/Base/NGRadioButton.cs
@@ -34,8 +34,7 @@ namespace mRemoteNG.UI.Controls.Base
protected override void OnCreateControl()
{
- base.OnCreateControl();
- if (Tools.DesignModeTest.IsInDesignMode(this)) return;
+ base.OnCreateControl();
_themeManager = ThemeManager.getInstance();
if (!_themeManager.ThemingActive) return;
// Allows for Overlaying
@@ -71,7 +70,7 @@ namespace mRemoteNG.UI.Controls.Base
//This class is painted with the checkbox colors, the glyph color is used for the radio inside
protected override void OnPaint(PaintEventArgs e)
{
- if (Tools.DesignModeTest.IsInDesignMode(this) || !_themeManager.ThemingActive)
+ if ( !_themeManager.ThemingActive)
{
base.OnPaint(e);
return;
diff --git a/mRemoteV1/UI/Controls/Base/NGTextBox.cs b/mRemoteV1/UI/Controls/Base/NGTextBox.cs
index 0e99e197..0d51c25e 100644
--- a/mRemoteV1/UI/Controls/Base/NGTextBox.cs
+++ b/mRemoteV1/UI/Controls/Base/NGTextBox.cs
@@ -17,8 +17,7 @@ namespace mRemoteNG.UI.Controls.Base
protected override void OnCreateControl()
{
- base.OnCreateControl();
- if (Tools.DesignModeTest.IsInDesignMode(this)) return;
+ base.OnCreateControl();
_themeManager = ThemeManager.getInstance();
if (!_themeManager.ThemingActive) return;
ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Foreground");
@@ -30,7 +29,8 @@ namespace mRemoteNG.UI.Controls.Base
protected override void OnEnabledChanged(EventArgs e)
{
- if (!Tools.DesignModeTest.IsInDesignMode(this))
+ _themeManager = ThemeManager.getInstance();
+ if (_themeManager.ThemingActive)
{
_themeManager = ThemeManager.getInstance();
if(_themeManager.ThemingActive)
diff --git a/mRemoteV1/UI/Controls/IPTextBox.cs b/mRemoteV1/UI/Controls/IPTextBox.cs
index bde3f5f5..0634c76b 100644
--- a/mRemoteV1/UI/Controls/IPTextBox.cs
+++ b/mRemoteV1/UI/Controls/IPTextBox.cs
@@ -85,8 +85,7 @@ namespace mRemoteNG.UI.Controls
}
private void ApplyTheme()
- {
- if (Tools.DesignModeTest.IsInDesignMode(this)) return;
+ {
if (Themes.ThemeManager.getInstance().ThemingActive)
panel1.BackColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("TextBox_Background");
}
diff --git a/mRemoteV1/UI/Forms/OptionsPages/OptionsPage.cs b/mRemoteV1/UI/Forms/OptionsPages/OptionsPage.cs
index 1014d96c..36ef5cc2 100644
--- a/mRemoteV1/UI/Forms/OptionsPages/OptionsPage.cs
+++ b/mRemoteV1/UI/Forms/OptionsPages/OptionsPage.cs
@@ -9,8 +9,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
protected OptionsPage()
{
//InitializeComponent();
- if (!Tools.DesignModeTest.IsInDesignMode(this))
- Themes.ThemeManager.getInstance().ThemeChanged += ApplyTheme;
+ Themes.ThemeManager.getInstance().ThemeChanged += ApplyTheme;
}
diff --git a/mRemoteV1/UI/Forms/OptionsPages/ThemePage.cs b/mRemoteV1/UI/Forms/OptionsPages/ThemePage.cs
index 77c7ec0b..5f911cf3 100644
--- a/mRemoteV1/UI/Forms/OptionsPages/ThemePage.cs
+++ b/mRemoteV1/UI/Forms/OptionsPages/ThemePage.cs
@@ -24,7 +24,8 @@ namespace mRemoteNG.UI.Forms.OptionsPages
{
InitializeComponent();
- if (!Tools.DesignModeTest.IsInDesignMode(this))
+ _themeManager = ThemeManager.getInstance();
+ if (_themeManager.ThemingActive)
{
_themeManager = ThemeManager.getInstance();
_themeManager.ThemeChanged += ApplyTheme;
@@ -51,12 +52,9 @@ namespace mRemoteNG.UI.Forms.OptionsPages
private new void ApplyTheme()
{
- if (Tools.DesignModeTest.IsInDesignMode(this))
+ if (!_themeManager.ThemingActive)
return;
- if (Themes.ThemeManager.getInstance().ThemingActive)
- {
- base.ApplyTheme();
- }
+ base.ApplyTheme();
}
public override void LoadSettings()
diff --git a/mRemoteV1/UI/Forms/frmMain.Designer.cs b/mRemoteV1/UI/Forms/frmMain.Designer.cs
index a8072f64..77d2adda 100644
--- a/mRemoteV1/UI/Forms/frmMain.Designer.cs
+++ b/mRemoteV1/UI/Forms/frmMain.Designer.cs
@@ -26,209 +26,212 @@ namespace mRemoteNG.UI.Forms
[System.Diagnostics.DebuggerStepThrough()]
private void InitializeComponent()
{
- this.components = new System.ComponentModel.Container();
- mRemoteNG.Connection.ConnectionInitiator connectionInitiator1 = new mRemoteNG.Connection.ConnectionInitiator();
- this.pnlDock = new WeifenLuo.WinFormsUI.Docking.DockPanel();
- this.msMain = new System.Windows.Forms.MenuStrip();
- this.mainFileMenu1 = new mRemoteNG.UI.Menu.MainFileMenu();
- this.viewMenu1 = new mRemoteNG.UI.Menu.ViewMenu();
- this.toolsMenu1 = new mRemoteNG.UI.Menu.ToolsMenu();
- this.helpMenu1 = new mRemoteNG.UI.Menu.HelpMenu();
- this.mMenFile = new System.Windows.Forms.ToolStripMenuItem();
- this.mMenView = new System.Windows.Forms.ToolStripMenuItem();
- this.mMenTools = new System.Windows.Forms.ToolStripMenuItem();
- this.mMenInfo = new System.Windows.Forms.ToolStripMenuItem();
- this.mMenSep3 = new System.Windows.Forms.ToolStripSeparator();
- this.tsContainer = new System.Windows.Forms.ToolStripContainer();
- this._externalToolsToolStrip = new mRemoteNG.UI.Controls.ExternalToolsToolStrip();
- this._quickConnectToolStrip = new mRemoteNG.UI.Controls.QuickConnectToolStrip();
- this._multiSshToolStrip = new mRemoteNG.UI.Controls.MultiSshToolStrip();
- this.tmrAutoSave = new System.Windows.Forms.Timer(this.components);
- this.vsToolStripExtender = new WeifenLuo.WinFormsUI.Docking.VisualStudioToolStripExtender(this.components);
- this.msMain.SuspendLayout();
- this.tsContainer.ContentPanel.SuspendLayout();
- this.tsContainer.TopToolStripPanel.SuspendLayout();
- this.tsContainer.SuspendLayout();
- this.SuspendLayout();
- //
- // pnlDock
- //
- this.pnlDock.Dock = System.Windows.Forms.DockStyle.Fill;
- this.pnlDock.DockBackColor = System.Drawing.SystemColors.Control;
- this.pnlDock.DockLeftPortion = 230D;
- this.pnlDock.DockRightPortion = 230D;
- this.pnlDock.DocumentStyle = WeifenLuo.WinFormsUI.Docking.DocumentStyle.DockingSdi;
- this.pnlDock.Location = new System.Drawing.Point(0, 0);
- this.pnlDock.Name = "pnlDock";
- this.pnlDock.Size = new System.Drawing.Size(966, 473);
- this.pnlDock.TabIndex = 13;
- this.pnlDock.ActiveDocumentChanged += new System.EventHandler(this.pnlDock_ActiveDocumentChanged);
- //
- // msMain
- //
- this.msMain.Dock = System.Windows.Forms.DockStyle.None;
- this.msMain.GripMargin = new System.Windows.Forms.Padding(0);
- this.msMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.components = new System.ComponentModel.Container();
+ mRemoteNG.Connection.ConnectionInitiator connectionInitiator1 = new mRemoteNG.Connection.ConnectionInitiator();
+ this.pnlDock = new WeifenLuo.WinFormsUI.Docking.DockPanel();
+ this.msMain = new System.Windows.Forms.MenuStrip();
+ this.mMenFile = new System.Windows.Forms.ToolStripMenuItem();
+ this.mMenView = new System.Windows.Forms.ToolStripMenuItem();
+ this.mMenTools = new System.Windows.Forms.ToolStripMenuItem();
+ this.mMenInfo = new System.Windows.Forms.ToolStripMenuItem();
+ this.mMenSep3 = new System.Windows.Forms.ToolStripSeparator();
+ this.tsContainer = new System.Windows.Forms.ToolStripContainer();
+ this.tmrAutoSave = new System.Windows.Forms.Timer(this.components);
+ this.vsToolStripExtender = new WeifenLuo.WinFormsUI.Docking.VisualStudioToolStripExtender(this.components);
+ this._multiSshToolStrip = new mRemoteNG.UI.Controls.MultiSshToolStrip();
+ this._externalToolsToolStrip = new mRemoteNG.UI.Controls.ExternalToolsToolStrip();
+ this._quickConnectToolStrip = new mRemoteNG.UI.Controls.QuickConnectToolStrip();
+ this.mainFileMenu1 = new mRemoteNG.UI.Menu.MainFileMenu();
+ this.viewMenu1 = new mRemoteNG.UI.Menu.ViewMenu();
+ this.toolsMenu1 = new mRemoteNG.UI.Menu.ToolsMenu();
+ this.helpMenu1 = new mRemoteNG.UI.Menu.HelpMenu();
+ this.msMain.SuspendLayout();
+ this.tsContainer.ContentPanel.SuspendLayout();
+ this.tsContainer.TopToolStripPanel.SuspendLayout();
+ this.tsContainer.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // pnlDock
+ //
+ this.pnlDock.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.pnlDock.DockBackColor = System.Drawing.SystemColors.Control;
+ this.pnlDock.DockLeftPortion = 230D;
+ this.pnlDock.DockRightPortion = 230D;
+ this.pnlDock.DocumentStyle = WeifenLuo.WinFormsUI.Docking.DocumentStyle.DockingSdi;
+ this.pnlDock.Location = new System.Drawing.Point(0, 0);
+ this.pnlDock.Name = "pnlDock";
+ this.pnlDock.Size = new System.Drawing.Size(966, 473);
+ this.pnlDock.TabIndex = 13;
+ this.pnlDock.ActiveDocumentChanged += new System.EventHandler(this.pnlDock_ActiveDocumentChanged);
+ //
+ // msMain
+ //
+ this.msMain.Anchor = System.Windows.Forms.AnchorStyles.Left;
+ this.msMain.Dock = System.Windows.Forms.DockStyle.None;
+ this.msMain.GripMargin = new System.Windows.Forms.Padding(0);
+ this.msMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.mainFileMenu1,
this.viewMenu1,
this.toolsMenu1,
this.helpMenu1});
- this.msMain.Location = new System.Drawing.Point(367, 25);
- this.msMain.Name = "msMain";
- this.msMain.Padding = new System.Windows.Forms.Padding(2, 2, 0, 2);
- this.msMain.Size = new System.Drawing.Size(268, 24);
- this.msMain.Stretch = false;
- this.msMain.TabIndex = 16;
- this.msMain.Text = "Main Toolbar";
- //
- // mainFileMenu1
- //
- this.mainFileMenu1.ConnectionInitiator = null;
- this.mainFileMenu1.Name = "mMenFile";
- this.mainFileMenu1.Size = new System.Drawing.Size(37, 20);
- this.mainFileMenu1.Text = "&File";
- this.mainFileMenu1.TreeWindow = null;
- this.mainFileMenu1.DropDownOpening += new System.EventHandler(this.mainFileMenu1_DropDownOpening);
- //
- // viewMenu1
- //
- this.viewMenu1.FullscreenHandler = null;
- this.viewMenu1.MainForm = null;
- this.viewMenu1.Name = "mMenView";
- this.viewMenu1.Size = new System.Drawing.Size(44, 20);
- this.viewMenu1.Text = "&View";
- this.viewMenu1.TsExternalTools = null;
- this.viewMenu1.TsQuickConnect = null;
- this.viewMenu1.DropDownOpening += new System.EventHandler(this.ViewMenu_Opening);
- //
- // toolsMenu1
- //
- this.toolsMenu1.CredentialProviderCatalog = null;
- this.toolsMenu1.MainForm = null;
- this.toolsMenu1.Name = "mMenTools";
- this.toolsMenu1.Size = new System.Drawing.Size(47, 20);
- this.toolsMenu1.Text = "&Tools";
- //
- // helpMenu1
- //
- this.helpMenu1.Name = "mMenInfo";
- this.helpMenu1.Size = new System.Drawing.Size(44, 20);
- this.helpMenu1.Text = "&Help";
- this.helpMenu1.TextDirection = System.Windows.Forms.ToolStripTextDirection.Horizontal;
- //
- // mMenFile
- //
- this.mMenFile.Name = "mMenFile";
- this.mMenFile.Size = new System.Drawing.Size(32, 19);
- //
- // mMenView
- //
- this.mMenView.Name = "mMenView";
- this.mMenView.Size = new System.Drawing.Size(32, 19);
- //
- // mMenTools
- //
- this.mMenTools.Name = "mMenTools";
- this.mMenTools.Size = new System.Drawing.Size(32, 19);
- //
- // mMenInfo
- //
- this.mMenInfo.Name = "mMenInfo";
- this.mMenInfo.Size = new System.Drawing.Size(32, 19);
- //
- // mMenSep3
- //
- this.mMenSep3.Name = "mMenSep3";
- this.mMenSep3.Size = new System.Drawing.Size(211, 6);
- //
- // tsContainer
- //
- //
- // tsContainer.ContentPanel
- //
- this.tsContainer.ContentPanel.Controls.Add(this.pnlDock);
- this.tsContainer.ContentPanel.Size = new System.Drawing.Size(966, 473);
- this.tsContainer.Dock = System.Windows.Forms.DockStyle.Fill;
- this.tsContainer.Location = new System.Drawing.Point(0, 0);
- this.tsContainer.Name = "tsContainer";
- this.tsContainer.Size = new System.Drawing.Size(966, 523);
- this.tsContainer.TabIndex = 17;
- this.tsContainer.Text = "ToolStripContainer1";
- //
- // tsContainer.TopToolStripPanel
- //
- this.tsContainer.TopToolStripPanel.Controls.Add(this.msMain);
- this.tsContainer.TopToolStripPanel.Controls.Add(this._externalToolsToolStrip);
- this.tsContainer.TopToolStripPanel.Controls.Add(this._quickConnectToolStrip);
- this.tsContainer.TopToolStripPanel.Controls.Add(this._multiSshToolStrip);
- //
- // _externalToolsToolStrip
- //
- this._externalToolsToolStrip.BackColor = System.Drawing.SystemColors.Control;
- this._externalToolsToolStrip.Dock = System.Windows.Forms.DockStyle.None;
- this._externalToolsToolStrip.ForeColor = System.Drawing.SystemColors.ControlText;
- this._externalToolsToolStrip.Location = new System.Drawing.Point(39, 0);
- this._externalToolsToolStrip.MaximumSize = new System.Drawing.Size(0, 25);
- this._externalToolsToolStrip.Name = "_externalToolsToolStrip";
- this._externalToolsToolStrip.Size = new System.Drawing.Size(111, 25);
- this._externalToolsToolStrip.TabIndex = 17;
- //
- // _quickConnectToolStrip
- //
- this._quickConnectToolStrip.BackColor = System.Drawing.SystemColors.Control;
- this._quickConnectToolStrip.ConnectionInitiator = connectionInitiator1;
- this._quickConnectToolStrip.Dock = System.Windows.Forms.DockStyle.None;
- this._quickConnectToolStrip.ForeColor = System.Drawing.SystemColors.ControlText;
- this._quickConnectToolStrip.Location = new System.Drawing.Point(3, 25);
- this._quickConnectToolStrip.MaximumSize = new System.Drawing.Size(0, 25);
- this._quickConnectToolStrip.Name = "_quickConnectToolStrip";
- this._quickConnectToolStrip.Size = new System.Drawing.Size(364, 25);
- this._quickConnectToolStrip.TabIndex = 18;
- //
- // tsMultiSSH
- //
- this._multiSshToolStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
- this._multiSshToolStrip.Location = new System.Drawing.Point(_quickConnectToolStrip.Location.X + _quickConnectToolStrip.Width + 1, 0);
- this._multiSshToolStrip.MinimumSize = new System.Drawing.Size(300, 0);
- this._multiSshToolStrip.Name = "_multiSshToolStrip";
- this._multiSshToolStrip.Size = new System.Drawing.Size(430, 25);
- this._multiSshToolStrip.TabIndex = 0;
- this._multiSshToolStrip.Dock = System.Windows.Forms.DockStyle.Right;
- //
- // tmrAutoSave
- //
- this.tmrAutoSave.Interval = 10000;
- this.tmrAutoSave.Tick += new System.EventHandler(this.tmrAutoSave_Tick);
- //
- // vsToolStripExtender
- //
- this.vsToolStripExtender.DefaultRenderer = null;
- //
- // FrmMain
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(966, 523);
- this.Controls.Add(this.tsContainer);
- this.Icon = global::mRemoteNG.Resources.mRemote_Icon;
- this.MainMenuStrip = this.msMain;
- this.Name = "FrmMain";
- this.Opacity = 0D;
- this.Text = "mRemoteNG";
- this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmMain_FormClosing);
- this.Load += new System.EventHandler(this.frmMain_Load);
- this.Shown += new System.EventHandler(this.frmMain_Shown);
- this.ResizeBegin += new System.EventHandler(this.frmMain_ResizeBegin);
- this.ResizeEnd += new System.EventHandler(this.frmMain_ResizeEnd);
- this.Resize += new System.EventHandler(this.frmMain_Resize);
- this.msMain.ResumeLayout(false);
- this.msMain.PerformLayout();
- this.tsContainer.ContentPanel.ResumeLayout(false);
- this.tsContainer.TopToolStripPanel.ResumeLayout(false);
- this.tsContainer.TopToolStripPanel.PerformLayout();
- this.tsContainer.ResumeLayout(false);
- this.tsContainer.PerformLayout();
- this.ResumeLayout(false);
+ this.msMain.Location = new System.Drawing.Point(3, 0);
+ this.msMain.Name = "msMain";
+ this.msMain.Padding = new System.Windows.Forms.Padding(2, 2, 0, 2);
+ this.msMain.Size = new System.Drawing.Size(176, 24);
+ this.msMain.Stretch = false;
+ this.msMain.TabIndex = 0;
+ this.msMain.Text = "Main Toolbar";
+ //
+ // mMenFile
+ //
+ this.mMenFile.Name = "mMenFile";
+ this.mMenFile.Size = new System.Drawing.Size(32, 19);
+ //
+ // mMenView
+ //
+ this.mMenView.Name = "mMenView";
+ this.mMenView.Size = new System.Drawing.Size(32, 19);
+ //
+ // mMenTools
+ //
+ this.mMenTools.Name = "mMenTools";
+ this.mMenTools.Size = new System.Drawing.Size(32, 19);
+ //
+ // mMenInfo
+ //
+ this.mMenInfo.Name = "mMenInfo";
+ this.mMenInfo.Size = new System.Drawing.Size(32, 19);
+ //
+ // mMenSep3
+ //
+ this.mMenSep3.Name = "mMenSep3";
+ this.mMenSep3.Size = new System.Drawing.Size(211, 6);
+ //
+ // tsContainer
+ //
+ //
+ // tsContainer.ContentPanel
+ //
+ this.tsContainer.ContentPanel.Controls.Add(this.pnlDock);
+ this.tsContainer.ContentPanel.Size = new System.Drawing.Size(966, 473);
+ this.tsContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tsContainer.Location = new System.Drawing.Point(0, 0);
+ this.tsContainer.Name = "tsContainer";
+ this.tsContainer.Size = new System.Drawing.Size(966, 523);
+ this.tsContainer.TabIndex = 17;
+ this.tsContainer.Text = "ToolStripContainer1";
+ //
+ // tsContainer.TopToolStripPanel
+ //
+ this.tsContainer.TopToolStripPanel.Controls.Add(this.msMain);
+ this.tsContainer.TopToolStripPanel.Controls.Add(this._externalToolsToolStrip);
+ this.tsContainer.TopToolStripPanel.Controls.Add(this._quickConnectToolStrip);
+ this.tsContainer.TopToolStripPanel.Controls.Add(this._multiSshToolStrip);
+ //
+ // tmrAutoSave
+ //
+ this.tmrAutoSave.Interval = 10000;
+ this.tmrAutoSave.Tick += new System.EventHandler(this.tmrAutoSave_Tick);
+ //
+ // vsToolStripExtender
+ //
+ this.vsToolStripExtender.DefaultRenderer = null;
+ //
+ // _multiSshToolStrip
+ //
+ this._multiSshToolStrip.Dock = System.Windows.Forms.DockStyle.None;
+ this._multiSshToolStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
+ this._multiSshToolStrip.Location = new System.Drawing.Point(3, 25);
+ this._multiSshToolStrip.MinimumSize = new System.Drawing.Size(300, 0);
+ this._multiSshToolStrip.Name = "_multiSshToolStrip";
+ this._multiSshToolStrip.Size = new System.Drawing.Size(376, 25);
+ this._multiSshToolStrip.TabIndex = 1;
+ //
+ // _externalToolsToolStrip
+ //
+ this._externalToolsToolStrip.BackColor = System.Drawing.SystemColors.Control;
+ this._externalToolsToolStrip.Dock = System.Windows.Forms.DockStyle.None;
+ this._externalToolsToolStrip.ForeColor = System.Drawing.SystemColors.ControlText;
+ this._externalToolsToolStrip.Location = new System.Drawing.Point(380, 25);
+ this._externalToolsToolStrip.MaximumSize = new System.Drawing.Size(0, 25);
+ this._externalToolsToolStrip.Name = "_externalToolsToolStrip";
+ this._externalToolsToolStrip.Size = new System.Drawing.Size(111, 25);
+ this._externalToolsToolStrip.TabIndex = 17;
+ //
+ // _quickConnectToolStrip
+ //
+ this._quickConnectToolStrip.BackColor = System.Drawing.SystemColors.Control;
+ this._quickConnectToolStrip.ConnectionInitiator = connectionInitiator1;
+ this._quickConnectToolStrip.Dock = System.Windows.Forms.DockStyle.None;
+ this._quickConnectToolStrip.ForeColor = System.Drawing.SystemColors.ControlText;
+ this._quickConnectToolStrip.Location = new System.Drawing.Point(179, 0);
+ this._quickConnectToolStrip.MaximumSize = new System.Drawing.Size(0, 25);
+ this._quickConnectToolStrip.Name = "_quickConnectToolStrip";
+ this._quickConnectToolStrip.Size = new System.Drawing.Size(364, 25);
+ this._quickConnectToolStrip.TabIndex = 18;
+ //
+ // mainFileMenu1
+ //
+ this.mainFileMenu1.ConnectionInitiator = null;
+ this.mainFileMenu1.Name = "mMenFile";
+ this.mainFileMenu1.Size = new System.Drawing.Size(37, 20);
+ this.mainFileMenu1.Text = "&File";
+ this.mainFileMenu1.TreeWindow = null;
+ this.mainFileMenu1.DropDownOpening += new System.EventHandler(this.mainFileMenu1_DropDownOpening);
+ //
+ // viewMenu1
+ //
+ this.viewMenu1.FullscreenHandler = null;
+ this.viewMenu1.MainForm = null;
+ this.viewMenu1.Name = "mMenView";
+ this.viewMenu1.Size = new System.Drawing.Size(44, 20);
+ this.viewMenu1.Text = "&View";
+ this.viewMenu1.TsExternalTools = null;
+ this.viewMenu1.TsMultiSsh = null;
+ this.viewMenu1.TsQuickConnect = null;
+ this.viewMenu1.DropDownOpening += new System.EventHandler(this.ViewMenu_Opening);
+ //
+ // toolsMenu1
+ //
+ this.toolsMenu1.CredentialProviderCatalog = null;
+ this.toolsMenu1.MainForm = null;
+ this.toolsMenu1.Name = "mMenTools";
+ this.toolsMenu1.Size = new System.Drawing.Size(47, 20);
+ this.toolsMenu1.Text = "&Tools";
+ //
+ // helpMenu1
+ //
+ this.helpMenu1.Name = "mMenInfo";
+ this.helpMenu1.Size = new System.Drawing.Size(44, 20);
+ this.helpMenu1.Text = "&Help";
+ this.helpMenu1.TextDirection = System.Windows.Forms.ToolStripTextDirection.Horizontal;
+ //
+ // FrmMain
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(966, 523);
+ this.Controls.Add(this.tsContainer);
+ this.Icon = global::mRemoteNG.Resources.mRemote_Icon;
+ this.MainMenuStrip = this.msMain;
+ this.Name = "FrmMain";
+ this.Opacity = 0D;
+ this.Text = "mRemoteNG";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmMain_FormClosing);
+ this.Load += new System.EventHandler(this.frmMain_Load);
+ this.Shown += new System.EventHandler(this.frmMain_Shown);
+ this.ResizeBegin += new System.EventHandler(this.frmMain_ResizeBegin);
+ this.ResizeEnd += new System.EventHandler(this.frmMain_ResizeEnd);
+ this.Resize += new System.EventHandler(this.frmMain_Resize);
+ this.msMain.ResumeLayout(false);
+ this.msMain.PerformLayout();
+ this.tsContainer.ContentPanel.ResumeLayout(false);
+ this.tsContainer.TopToolStripPanel.ResumeLayout(false);
+ this.tsContainer.TopToolStripPanel.PerformLayout();
+ this.tsContainer.ResumeLayout(false);
+ this.tsContainer.PerformLayout();
+ this.ResumeLayout(false);
+
}
internal WeifenLuo.WinFormsUI.Docking.DockPanel pnlDock;
internal System.Windows.Forms.MenuStrip msMain;
diff --git a/mRemoteV1/UI/Forms/frmMain.cs b/mRemoteV1/UI/Forms/frmMain.cs
index e40d85b1..d89cff27 100644
--- a/mRemoteV1/UI/Forms/frmMain.cs
+++ b/mRemoteV1/UI/Forms/frmMain.cs
@@ -22,6 +22,7 @@ using mRemoteNG.Messages.MessageWriters;
using mRemoteNG.Themes;
using mRemoteNG.Tools;
using mRemoteNG.UI.Menu;
+using mRemoteNG.UI.Panels;
using mRemoteNG.UI.TaskDialog;
using mRemoteNG.UI.Window;
using WeifenLuo.WinFormsUI.Docking;
@@ -177,6 +178,8 @@ namespace mRemoteNG.UI.Forms
SystemEvents.DisplaySettingsChanged += _screenSystemMenu.OnDisplayChanged;
Opacity = 1;
+ //Fix missing general panel at the first run
+ new PanelAdder().AddPanel();
}
private void OnApplicationSettingChanged(object sender, PropertyChangedEventArgs propertyChangedEventArgs)
@@ -198,7 +201,7 @@ namespace mRemoteNG.UI.Forms
}
}
- private void ConnectionsServiceOnConnectionsLoaded(object sender, ConnectionsLoadedEventArgs connectionsLoadedEventArgs)
+ private void ConnectionsServiceOnConnectionsLoaded(object sender, ConnectionsLoadedEventArgs connectionsLoadedEventArgs)
{
UpdateWindowTitle();
}
@@ -568,10 +571,8 @@ namespace mRemoteNG.UI.Forms
Windows.TreeForm.Show(pnlDock, DockState.DockLeft);
Windows.ConfigForm.Show(pnlDock);
Windows.ConfigForm.DockTo(Windows.TreeForm.Pane, DockStyle.Bottom, -1);
- Windows.ErrorsForm.Show(pnlDock, DockState.Document);
-
- Windows.ErrorsForm.Hide();
- Windows.ScreenshotForm.Hide();
+ Windows.ErrorsForm.Show( pnlDock, DockState.DockBottomAutoHide );
+ Windows.ScreenshotForm.Hide();
pnlDock.Visible = true;
}
diff --git a/mRemoteV1/UI/Forms/frmMain.resx b/mRemoteV1/UI/Forms/frmMain.resx
index 023400c5..a1ccf7f9 100644
--- a/mRemoteV1/UI/Forms/frmMain.resx
+++ b/mRemoteV1/UI/Forms/frmMain.resx
@@ -118,21 +118,21 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- 535, 17
+ 688, 17
- 357, 17
+ 510, 17
- 177, 17
+ 17, 17
- 17, 17
+ 197, 17
- 630, 17
+ 783, 17
- 17, 17
+ 350, 17
\ No newline at end of file
diff --git a/mRemoteV1/UI/TaskDialog/CommandButton.cs b/mRemoteV1/UI/TaskDialog/CommandButton.cs
index 4063b13a..6c9fc574 100644
--- a/mRemoteV1/UI/TaskDialog/CommandButton.cs
+++ b/mRemoteV1/UI/TaskDialog/CommandButton.cs
@@ -130,7 +130,7 @@ namespace mRemoteNG.UI.TaskDialog
//--------------------------------------------------------------------------------
protected override void OnPaint(PaintEventArgs e)
{
- if (Tools.DesignModeTest.IsInDesignMode(this) || !_themeManager.ThemingActive)
+ if ( !_themeManager.ThemingActive)
{
base.OnPaint(e);
return;
diff --git a/mRemoteV1/UI/Window/BaseWindow.cs b/mRemoteV1/UI/Window/BaseWindow.cs
index 7eabc1f9..fdf19d9d 100644
--- a/mRemoteV1/UI/Window/BaseWindow.cs
+++ b/mRemoteV1/UI/Window/BaseWindow.cs
@@ -30,8 +30,7 @@ namespace mRemoteNG.UI.Window
#endregion
internal new void ApplyTheme()
- {
- if (Tools.DesignModeTest.IsInDesignMode(this)) return;
+ {
_themeManager = ThemeManager.getInstance();
if (!_themeManager.ThemingActive) return;
BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
diff --git a/mRemoteV1/app.config b/mRemoteV1/app.config
index b6671045..eec613dc 100644
--- a/mRemoteV1/app.config
+++ b/mRemoteV1/app.config
@@ -695,122 +695,6 @@
-
-
- /TreeView/Background/Background/@Source
-
-
- /TreeView/Background/Foreground/@Source
-
-
- /TreeView/SelectedItemActive/Background/@Source
-
-
- /TreeView/SelectedItemActive/Foreground/@Source
-
-
- /TreeView/SelectedItemInactive/Background/@Source
-
-
- /TreeView/SelectedItemInactive/Foreground/@Source
-
-
- /Cider/ListBackground/Background/@Source
-
-
- /Cider/ListItem/Foreground/@Source
-
-
- /Cider/ListItem/Background/@Source
-
-
- /Cider/ListItemBorder/Background/@Source
-
-
- /Cider/ListHeader/Background/@Source
-
-
- /Cider/ListHeader/Foreground/@Source
-
-
- /Cider/ListItemSelectedBorder/Background/@Source
-
-
- /Cider/ListItemSelected/Foreground/@Source
-
-
- /Cider/ListItemSelected/Background/@Source
-
-
- /Cider/ListItemDisabled/Foreground/@Source
-
-
- /Cider/ListItemDisabled/Background/@Source
-
-
- /Cider/ListItemDisabledBorder/Background/@Source
-
-
- /CommonControls/Button/Background/@Source
-
-
- /CommonControls/Button/Foreground/@Source
-
-
- /CommonControls/ButtonBorder/Background/@Source
-
-
- /CommonControls/ButtonPressed/Background/@Source
-
-
- /CommonControls/ButtonPressed/Foreground/@Source
-
-
- /CommonControls/ButtonHover/Background/@Source
-
-
- /CommonControls/ButtonHover/Foreground/@Source
-
-
- /TextEditorTextMarkerItems/compilerwarning/Background/@Source
-
-
- /TextEditorTextMarkerItems/compilerwarning/Foreground/@Source
-
-
- /TextEditorTextMarkerItems/compilererror/Background/@Source
-
-
- /TextEditorTextMarkerItems/compilererror/Foreground/@Source
-
-
- /CommonControls/TextBoxBackground/Background/@Source
-
-
- /CommonControls/TextBoxText/Background/@Source
-
-
- /CommonControls/TextBoxBorder/Background/@Source
-
-
- /CommonControls/TextBoxBorderDisabled/Background/@Source
-
-
- /CommonControls/TextBoxBorderFocused/Background/@Source
-
-
- /CommonControls/TextBoxBackgroundDisabled/Background/@Source
-
-
- /CommonControls/TextBoxTextDisabled/Background/@Source
-
-
- /CommonControls/TextBoxBackgroundFocused/Background/@Source
-
-
- /CommonControls/TextBoxTextFocused/Background/@Source
-
-
https://mremoteng.org/