mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 14:07:46 +08:00
Merge pull request #840 from jotatsu/develop
Fix themes on installer version, initial menu position fix
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Extension method to return if the control is in design mode
|
||||
/// </summary>
|
||||
/// <param name="control">Control to examine</param>
|
||||
/// <returns>True if in design mode, otherwise false</returns>
|
||||
public static bool IsInDesignMode(this System.Windows.Forms.Control control)
|
||||
{
|
||||
return ResolveDesignMode(control);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method to test if the control or it's parent is in design mode
|
||||
/// </summary>
|
||||
/// <param name="control">Control to examine</param>
|
||||
/// <returns>True if in design mode, otherwise false</returns>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,9 @@ namespace mRemoteNG.UI.Controls.Base
|
||||
{
|
||||
private ThemeManager _themeManager ;
|
||||
|
||||
/// <summary>
|
||||
/// Store the mouse state, required for coloring the component according to the mouse state
|
||||
/// </summary>
|
||||
public enum MouseState
|
||||
{
|
||||
HOVER,
|
||||
@@ -27,10 +30,12 @@ namespace mRemoteNG.UI.Controls.Base
|
||||
|
||||
public MouseState _mice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Rewrite the function to allow for coloring the component depending on the mouse state
|
||||
/// </summary>
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Repaint the componente, the elements considered are the clipping rectangle, text and an icon
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
if (Tools.DesignModeTest.IsInDesignMode(this) || !_themeManager.ThemingActive)
|
||||
if (!_themeManager.ThemingActive)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
return;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
401
mRemoteV1/UI/Forms/frmMain.Designer.cs
generated
401
mRemoteV1/UI/Forms/frmMain.Designer.cs
generated
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -118,21 +118,21 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="msMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>535, 17</value>
|
||||
<value>688, 17</value>
|
||||
</metadata>
|
||||
<metadata name="_externalToolsToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>357, 17</value>
|
||||
<value>510, 17</value>
|
||||
</metadata>
|
||||
<metadata name="_quickConnectToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>177, 17</value>
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="_multiSshToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
<value>197, 17</value>
|
||||
</metadata>
|
||||
<metadata name="tmrAutoSave.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>630, 17</value>
|
||||
<value>783, 17</value>
|
||||
</metadata>
|
||||
<metadata name="vsToolStripExtender.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
<value>350, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -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;
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -695,122 +695,6 @@
|
||||
</mRemoteNG.Settings>
|
||||
</userSettings>
|
||||
<applicationSettings>
|
||||
<mRemoteNG.Resources.Themes.ColorMap>
|
||||
<setting name="TreeView_Background" serializeAs="String">
|
||||
<value>/TreeView/Background/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="TreeView_Foreground" serializeAs="String">
|
||||
<value>/TreeView/Background/Foreground/@Source</value>
|
||||
</setting>
|
||||
<setting name="Treeview_SelectedItem_Active_Background" serializeAs="String">
|
||||
<value>/TreeView/SelectedItemActive/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="Treeview_SelectedItem_Active_Foreground" serializeAs="String">
|
||||
<value>/TreeView/SelectedItemActive/Foreground/@Source</value>
|
||||
</setting>
|
||||
<setting name="Treeview_SelectedItem_Inactive_Background" serializeAs="String">
|
||||
<value>/TreeView/SelectedItemInactive/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="Treeview_SelectedItem_Inactive_Foreground" serializeAs="String">
|
||||
<value>/TreeView/SelectedItemInactive/Foreground/@Source</value>
|
||||
</setting>
|
||||
<setting name="List_Background" serializeAs="String">
|
||||
<value>/Cider/ListBackground/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="List_Item_Foreground" serializeAs="String">
|
||||
<value>/Cider/ListItem/Foreground/@Source</value>
|
||||
</setting>
|
||||
<setting name="List_Item_Background" serializeAs="String">
|
||||
<value>/Cider/ListItem/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="List_Item_Border" serializeAs="String">
|
||||
<value>/Cider/ListItemBorder/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="List_Header_Background" serializeAs="String">
|
||||
<value>/Cider/ListHeader/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="List_Header_Foreground" serializeAs="String">
|
||||
<value>/Cider/ListHeader/Foreground/@Source</value>
|
||||
</setting>
|
||||
<setting name="List_Item_Selected_Border" serializeAs="String">
|
||||
<value>/Cider/ListItemSelectedBorder/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="List_Item_Selected_Foreground" serializeAs="String">
|
||||
<value>/Cider/ListItemSelected/Foreground/@Source</value>
|
||||
</setting>
|
||||
<setting name="List_Item_Selected_Background" serializeAs="String">
|
||||
<value>/Cider/ListItemSelected/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="List_Item_Disabled_Foreground" serializeAs="String">
|
||||
<value>/Cider/ListItemDisabled/Foreground/@Source</value>
|
||||
</setting>
|
||||
<setting name="List_Item_Disabled_Background" serializeAs="String">
|
||||
<value>/Cider/ListItemDisabled/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="List_Item_Disabled_Border" serializeAs="String">
|
||||
<value>/Cider/ListItemDisabledBorder/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="Button_Background" serializeAs="String">
|
||||
<value>/CommonControls/Button/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="Button_Foreground" serializeAs="String">
|
||||
<value>/CommonControls/Button/Foreground/@Source</value>
|
||||
</setting>
|
||||
<setting name="Button_Button_Border" serializeAs="String">
|
||||
<value>/CommonControls/ButtonBorder/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="Button_Pressed_Background" serializeAs="String">
|
||||
<value>/CommonControls/ButtonPressed/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="Button_Pressed_Foreground" serializeAs="String">
|
||||
<value>/CommonControls/ButtonPressed/Foreground/@Source</value>
|
||||
</setting>
|
||||
<setting name="Button_Hover_Background" serializeAs="String">
|
||||
<value>/CommonControls/ButtonHover/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="Button_Hover_Foreground" serializeAs="String">
|
||||
<value>/CommonControls/ButtonHover/Foreground/@Source</value>
|
||||
</setting>
|
||||
<setting name="WarningText_Background" serializeAs="String">
|
||||
<value>/TextEditorTextMarkerItems/compilerwarning/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="WarningText_Foreground" serializeAs="String">
|
||||
<value>/TextEditorTextMarkerItems/compilerwarning/Foreground/@Source</value>
|
||||
</setting>
|
||||
<setting name="ErrorText_Background" serializeAs="String">
|
||||
<value>/TextEditorTextMarkerItems/compilererror/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="ErrorText_Foreground" serializeAs="String">
|
||||
<value>/TextEditorTextMarkerItems/compilererror/Foreground/@Source</value>
|
||||
</setting>
|
||||
<setting name="TextBox_Background" serializeAs="String">
|
||||
<value>/CommonControls/TextBoxBackground/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="TextBox_Foreground" serializeAs="String">
|
||||
<value>/CommonControls/TextBoxText/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="TextBox_Border" serializeAs="String">
|
||||
<value>/CommonControls/TextBoxBorder/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="TextBox_Border_Disabled" serializeAs="String">
|
||||
<value>/CommonControls/TextBoxBorderDisabled/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="TextBox_Border_Focused" serializeAs="String">
|
||||
<value>/CommonControls/TextBoxBorderFocused/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="TextBox_Disabled_Background" serializeAs="String">
|
||||
<value>/CommonControls/TextBoxBackgroundDisabled/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="TextBox_Disabled_Foreground" serializeAs="String">
|
||||
<value>/CommonControls/TextBoxTextDisabled/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="TextBox_Focused_Background" serializeAs="String">
|
||||
<value>/CommonControls/TextBoxBackgroundFocused/Background/@Source</value>
|
||||
</setting>
|
||||
<setting name="TextBox_Focused_Foreground" serializeAs="String">
|
||||
<value>/CommonControls/TextBoxTextFocused/Background/@Source</value>
|
||||
</setting>
|
||||
</mRemoteNG.Resources.Themes.ColorMap>
|
||||
<mRemoteNG.Settings>
|
||||
<setting name="UpdateAddress" serializeAs="String">
|
||||
<value>https://mremoteng.org/</value>
|
||||
|
||||
Reference in New Issue
Block a user