Compare commits

...

41 Commits

Author SHA1 Message Date
David Sparer
1a06783dab update changelog and credits 2018-02-01 21:13:42 -06:00
David Sparer
ec38ee9abc remove dead code 2018-02-01 20:54:24 -06:00
David Sparer
2e82551b7c fix toolbar location loading bug 2018-02-01 20:34:22 -06:00
David Sparer
49121fb945 remove deleted file from solution 2018-02-01 20:34:07 -06:00
David Sparer
6e436f55c3 Merge pull request #840 from jotatsu/develop
Fix themes on installer version, initial menu position fix
2018-02-01 20:32:59 -06:00
David Sparer
afb0131a28 save and load multi ssh toolbar position. resolves #846 2018-01-28 21:15:12 -06:00
David Sparer
92588282a6 always set file menu position to the top left 2018-01-28 21:14:42 -06:00
David Sparer
765e997976 Merge pull request #858 from Fyers/develop
fixed putty session name encoding - fixes #800
2018-01-26 20:39:39 -06:00
Sean Kaim
42e4f168d1 appveyor build status badge for master 2018-01-25 12:22:15 -05:00
Sean Kaim
e68b529a34 Merge branch 'develop' of https://github.com/mRemoteNG/mRemoteNG into develop 2018-01-25 12:13:29 -05:00
Sean Kaim
1ed4987277 Update appveyor.yml 2018-01-25 12:13:26 -05:00
Sean Kaim
a5d1f0995c appveyor badge for develop branch 2018-01-25 12:11:28 -05:00
Sean Kaim
b6951df72e fix link for translations 2018-01-25 11:09:15 -05:00
David Sparer
b1c31048a9 trim rdp file parts for safety 2018-01-24 10:47:07 -06:00
Fyers
e13faa1b66 fixed putty session name encoding #800 2018-01-06 19:54:14 +01:00
Sean Kaim
9349aca76e remove credit
hotkey selection control is no lnger used
2018-01-03 12:13:58 -05:00
Sean Kaim
4946726d1e appveyor config 2018-01-02 17:06:23 -05:00
Sean Kaim
72c7800c02 update nunit 2018-01-02 16:11:33 -05:00
Sean Kaim
e4c35b2ba2 CitrixReceiver.exe - for appveyor 2018-01-02 15:47:19 -05:00
Sean Kaim
bccb885508 ignore cred repo tests 2018-01-02 15:43:53 -05:00
David Sparer
7b7e0e0522 Merge branch 'develop' into develop 2018-01-02 08:22:00 -06:00
Camilo Alvarez
991d1d82b8 Misc fixes
- Clear redundant settings form app.config
- Deleted DesignModeTest as ThemeManager can now be used in design time without adjustements, removed usage from all custo elements
- Instance _themeManager in NGNumericUpDown at object creation to avoid null reference errors
- Errorsform instancing is now defaulted to DockBottomAutoHide  in frmMain
-Fix missing panel at startup by adding a blank panel, temporary solution as magic library is beign phased out
2017-12-26 12:15:11 -05:00
David Sparer
5832205624 update credits and changelog for #829 2017-12-18 14:20:39 -06:00
David Sparer
8aeea4d212 added option for enabling utf8 encoding of the rdp "load balance info" property 2017-12-18 14:13:21 -06:00
David Sparer
e1934cd1b0 Merge pull request #829 from sirLoaf/AzureLoadBalanceInfoFix
Fix for connecting to azure instances (cloud services). LoadBalanceIn…
2017-12-18 13:27:32 -06:00
Camilo Alvarez
056cce2f97 Removed windings fonts
Now using unicode for better compatibility in special characters for drawing controls
2017-12-13 09:34:27 -03:00
David Sparer
61f6463e59 rearranged a few items on the sql server page 2017-12-12 09:47:27 -06:00
David Sparer
a929552c3d fixed a bad merge that I made 2017-12-12 09:44:08 -06:00
David Sparer
10cd02d2e7 Merge pull request #836 from dekelMP/develop
SQL Read Only Option
2017-12-12 09:42:23 -06:00
David Sparer
afac50c18f Merge branch 'develop' into develop 2017-12-12 09:32:49 -06:00
David Sparer
24ade35df8 Merge branch 'develop' into develop 2017-12-12 09:30:42 -06:00
David Sparer
d50341ff8e updated changelog 2017-12-12 09:25:14 -06:00
David Sparer
54bd6d5336 added option to lock the toolbar controls
resolves #838
2017-12-12 09:22:33 -06:00
Camilo Alvarez
7bc26787db Reorganize menus, fix empty values in design mode 2017-12-12 08:47:35 -03:00
Camilo Alvarez
e923f816a4 fix installer version missing themes
fixed the installed veresion missing themes, added more controls for theme failure to load
2017-12-11 08:29:18 -03:00
Dekel Asaf
c6e4439ab9 Added check for SQL read only in SqlDataProvider 2017-12-10 22:22:38 +02:00
Dekel Asaf
94f66da84e Added SQL Read Only option
Avoid saving when SQL Read Only check box is checked
2017-12-10 21:59:57 +02:00
Dekel Asaf
384399c1c8 Merge develop from upstream 2017-12-10 21:13:50 +02:00
Dekel Asaf
7bac63310f Merge remote-tracking branch 'upstream/develop' into develop 2017-12-10 21:07:03 +02:00
Fabio Laib
173b516270 Fix for connecting to azure instances (cloud services). LoadBalanceInfo requires a UTF8 encoded string 2017-12-06 12:52:51 +01:00
Dekel Asaf
a436d9c070 fixed #529 2017-09-22 20:54:47 +03:00
57 changed files with 1032 additions and 755 deletions

View File

@@ -11,7 +11,7 @@ There are many ways that you can help improve mRemoteNG, even if you don't know
For example, you might:
- add documentation or "how-to" articles on the [Wiki](https://github.com/mRemoteNG/mRemoteNG/wiki)
- answer support questions on the [forum](http://forum.mremoteng.org)
- [add or improve a translation](https://github.com/mRemoteNG/mRemoteNG/wiki/How to Help Translating mRemoteNG)
- [add or improve a translation](https://github.com/mRemoteNG/mRemoteNG/wiki/How-to-Help-Translating-mRemoteNG)
- submit a [pull request](https://github.com/mRemoteNG/mRemoteNG/pulls) for a [bug or feature ticket](https://github.com/mRemoteNG/mRemoteNG/issues)

View File

@@ -1,3 +1,18 @@
1.76.0 Alpha 2 (2018-02-01):
Features/Enhancements:
----------------------
#838: Added an option to lock toolbars
#836: Added a Read Only option for SQL connections
#829: Add option that fixes connecting to Azure instances with LoadBalanceInfo
Fixes:
------
#840: Fix theme loading issue in installer version
#800: Fixed issue with PuTTY sessions not showing some extended characters
Fixed a few toolbar layout issues
1.76.0 Alpha 1 (2017-12-08):
Features/Enhancements:

View File

@@ -21,6 +21,8 @@ Bruce (github.com/brucetp)
Camilo Alvarez (github.com/jotatsu)
github.com/DamianBis
github.com/pfjason
github.com/sirLoaf
github.com/Fyers
Past Contributors
@@ -71,10 +73,6 @@ FilteredPropertyGrid
Copyright <20> 2006 Azuria
http://www.codeproject.com/KB/cs/FilteredPropertyGrid.aspx
Hotkey Selection Control for .NET
Copyright <20> 2006 Thomas Backman
http://www.codeproject.com/Articles/15085/A-simple-hotkey-selection-control-for-NET
InputBox
Copyright <20> 2016 Jan Slama
http://www.csharp-examples.net/inputbox/

View File

@@ -10,9 +10,9 @@
| Update Channel | Build Status | Downloads |
| ---------------|--------------|-----------|
| Stable | [![Build Status](https://jenkins.mremoteng.org/buildStatus/icon?job=mRemoteNG/mRemoteNG/master)](https://jenkins.mremoteng.org/job/mRemoteNG/job/mRemoteNG/job/master/) | [![Github Releases (by Release)](https://img.shields.io/github/downloads/mRemoteNG/mRemoteNG/v1.75.7011/total.svg)](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.75.7011) |
| Stable | [![Build status](https://ci.appveyor.com/api/projects/status/k0sdbxmq90fgdmj6/branch/master?svg=true)](https://ci.appveyor.com/project/mremoteng/mremoteng/branch/master) | [![Github Releases (by Release)](https://img.shields.io/github/downloads/mRemoteNG/mRemoteNG/v1.75.7011/total.svg)](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.75.7011) |
| Beta | | [![Github Releases (by Release)](https://img.shields.io/github/downloads/mRemoteNG/mRemoteNG/v1.75.7011/total.svg)](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.75.7011) |
| Development | [![Build Status](https://jenkins.mremoteng.org/buildStatus/icon?job=mRemoteNG/mRemoteNG/develop)](https://jenkins.mremoteng.org/job/mRemoteNG/job/mRemoteNG/job/develop/) | - |
| Development | [![Build status](https://ci.appveyor.com/api/projects/status/k0sdbxmq90fgdmj6/branch/develop?svg=true)](https://ci.appveyor.com/project/mremoteng/mremoteng/branch/develop) | - |
mRemoteNG is the next generation of mRemote, a full-featured, multi-tab remote connections manager.

20
appveyor.yml Normal file
View File

@@ -0,0 +1,20 @@
version: 1.0.{build}
pull_requests:
do_not_increment_build_number: true
image: Visual Studio 2017
configuration:
- Release
- Release Portable
platform: x86
clone_depth: 1
install:
- ps: C:\projects\mremoteng\mRemoteV1\Resources\CitrixReceiver.exe DONOTSTARTCC=1 ENABLE_SSON="No" /silent | out-null
before_build:
- cmd: nuget restore
build:
project: mRemoteV1.sln
verbosity: normal
test:
assemblies:
only:
- mRemoteNGTests\bin\$(configuration)\mRemoteNGTests.dll

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" />
@@ -9,6 +9,10 @@
<assemblyIdentity name="WeifenLuo.WinFormsUI.Docking" publicKeyToken="5cded1a1a0a7b481" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.16.0.0" newVersion="2.16.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup>

View File

@@ -9,6 +9,9 @@
// </auto-generated>
// ------------------------------------------------------------------------------
#region Designer generated code
using NUnit.Framework;
#pragma warning disable
namespace mRemoteNG.Specs.Features
{
@@ -67,6 +70,7 @@ namespace mRemoteNG.Specs.Features
[NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("Load credential repository")]
[NUnit.Framework.CategoryAttribute("credentials")]
[Ignore("Cred Repo not implmented currently.")]
public virtual void LoadCredentialRepository()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Load credential repository", new string[] {
@@ -87,6 +91,7 @@ this.ScenarioSetup(scenarioInfo);
[NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("Add credential record")]
[Ignore("Cred Repo not implmented currently.")]
public virtual void AddCredentialRecord()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add credential record", ((string[])(null)));
@@ -108,6 +113,7 @@ this.ScenarioSetup(scenarioInfo);
[NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("Unload credential repository")]
[Ignore("Cred Repo not implmented currently.")]
public virtual void UnloadCredentialRepository()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Unload credential repository", ((string[])(null)));

View File

@@ -9,6 +9,9 @@
// </auto-generated>
// ------------------------------------------------------------------------------
#region Designer generated code
using NUnit.Framework;
#pragma warning disable
namespace mRemoteNG.Specs.Features
{
@@ -19,6 +22,7 @@ namespace mRemoteNG.Specs.Features
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[NUnit.Framework.TestFixtureAttribute()]
[NUnit.Framework.DescriptionAttribute("CredentialRepositoryList")]
[Ignore("Cred Repo not implmented currently.")]
public partial class CredentialRepositoryListFeature
{
@@ -67,6 +71,7 @@ namespace mRemoteNG.Specs.Features
[NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("Add a new credential repository")]
[NUnit.Framework.CategoryAttribute("credentials")]
[Ignore("Cred Repo not implmented currently.")]
public virtual void AddANewCredentialRepository()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add a new credential repository", new string[] {
@@ -87,6 +92,7 @@ this.ScenarioSetup(scenarioInfo);
[NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("Remove a credential repository")]
[Ignore("Cred Repo not implmented currently.")]
public virtual void RemoveACredentialRepository()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Remove a credential repository", ((string[])(null)));

View File

@@ -34,8 +34,8 @@
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.8.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.8.1\lib\net45\nunit.framework.dll</HintPath>
<Reference Include="nunit.framework, Version=3.9.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.9.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />

View File

@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net46" />
<package id="NUnit" version="3.8.1" targetFramework="net46" />
<package id="NUnit" version="3.9.0" targetFramework="net46" />
<package id="NUnit.Console" version="3.7.0" targetFramework="net46" />
<package id="NUnit.ConsoleRunner" version="3.7.0" targetFramework="net46" />
<package id="NUnit.Extension.NUnitProjectLoader" version="3.6.0" targetFramework="net46" />
<package id="NUnit.Extension.NUnitV2Driver" version="3.7.0" targetFramework="net46" />
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.6.0" targetFramework="net46" />
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.2" targetFramework="net46" />
<package id="NUnit.Extension.VSProjectLoader" version="3.6.0" targetFramework="net46" />
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.3" targetFramework="net46" />
<package id="NUnit.Extension.VSProjectLoader" version="3.7.0" targetFramework="net46" />
<package id="NUnit.Runners" version="3.7.0" targetFramework="net46" />
<package id="SpecFlow" version="2.2.1" targetFramework="net46" />
<package id="SpecFlow.NUnit" version="2.2.1" targetFramework="net46" />

View File

@@ -68,8 +68,8 @@
<Reference Include="NSubstitute, Version=3.1.0.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
<HintPath>..\packages\NSubstitute.3.1.0\lib\net46\NSubstitute.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.8.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.8.1\lib\net45\nunit.framework.dll</HintPath>
<Reference Include="nunit.framework, Version=3.9.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.9.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="NUnitForms">
<HintPath>nUnitForms\bin\NUnitForms.dll</HintPath>

View File

@@ -5,14 +5,14 @@
<package id="DockPanelSuite" version="2.16.1" targetFramework="net46" />
<package id="log4net" version="2.0.8" targetFramework="net46" />
<package id="NSubstitute" version="3.1.0" targetFramework="net46" />
<package id="NUnit" version="3.8.1" targetFramework="net46" />
<package id="NUnit" version="3.9.0" targetFramework="net46" />
<package id="NUnit.Console" version="3.7.0" targetFramework="net46" />
<package id="NUnit.ConsoleRunner" version="3.7.0" targetFramework="net46" />
<package id="NUnit.Extension.NUnitProjectLoader" version="3.6.0" targetFramework="net46" />
<package id="NUnit.Extension.NUnitV2Driver" version="3.7.0" targetFramework="net46" />
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.6.0" targetFramework="net46" />
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.2" targetFramework="net46" />
<package id="NUnit.Extension.VSProjectLoader" version="3.6.0" targetFramework="net46" />
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.3" targetFramework="net46" />
<package id="NUnit.Extension.VSProjectLoader" version="3.7.0" targetFramework="net46" />
<package id="ObjectListView.Official" version="2.9.1" targetFramework="net46" />
<package id="OpenCover" version="4.6.519" targetFramework="net46" />
<package id="ReportGenerator" version="3.0.2" targetFramework="net46" />

View File

@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27004.2008
VisualStudioVersion = 15.0.27130.2010
MinimumVisualStudioVersion = 14.0.25420.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mRemoteV1", "mRemoteV1\mRemoteV1.csproj", "{4934A491-40BC-4E5B-9166-EA1169A220F6}"
EndProject
@@ -101,7 +101,6 @@ Global
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|x86.ActiveCfg = Debug|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|x86.Build.0 = Debug|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|Any CPU.ActiveCfg = Release|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|Any CPU.Build.0 = Release|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|x86.ActiveCfg = Release|Any CPU

View File

@@ -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;
}
}

View File

@@ -25,14 +25,14 @@ namespace mRemoteNG.App
ProgramRoot.CloseSingletonInstanceMutex();
}
public static void Cleanup(Control quickConnectToolStrip, ExternalToolsToolStrip externalToolsToolStrip, FrmMain frmMain)
public static void Cleanup(Control quickConnectToolStrip, ExternalToolsToolStrip externalToolsToolStrip, MultiSshToolStrip multiSshToolStrip, FrmMain frmMain)
{
try
{
StopPuttySessionWatcher();
DisposeNotificationAreaIcon();
SaveConnections();
SaveSettings(quickConnectToolStrip, externalToolsToolStrip, frmMain);
SaveSettings(quickConnectToolStrip, externalToolsToolStrip, multiSshToolStrip, frmMain);
UnregisterBrowsers();
}
catch (Exception ex)
@@ -58,9 +58,9 @@ namespace mRemoteNG.App
Runtime.ConnectionsService.SaveConnections();
}
private static void SaveSettings(Control quickConnectToolStrip, ExternalToolsToolStrip externalToolsToolStrip, FrmMain frmMain)
private static void SaveSettings(Control quickConnectToolStrip, ExternalToolsToolStrip externalToolsToolStrip, MultiSshToolStrip multiSshToolStrip, FrmMain frmMain)
{
Config.Settings.SettingsSaver.SaveSettings(quickConnectToolStrip, externalToolsToolStrip, frmMain);
Config.Settings.SettingsSaver.SaveSettings(quickConnectToolStrip, externalToolsToolStrip, multiSshToolStrip, frmMain);
}
private static void UnregisterBrowsers()

View File

@@ -33,6 +33,13 @@ namespace mRemoteNG.Config.Connections
public void Save(ConnectionTreeModel connectionTreeModel)
{
if (SqlUserIsReadOnly())
{
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Trying to save connection tree but the SQL read only checkbox is checked, aborting!");
return;
}
using (var sqlConnector = DatabaseConnectorFactory.SqlDatabaseConnectorFromSettings())
{
sqlConnector.Connect();
@@ -109,5 +116,11 @@ namespace mRemoteNG.Config.Connections
sqlQuery = new SqlCommand("INSERT INTO tblUpdate (LastUpdate) VALUES(\'" + MiscTools.DBDate(DateTime.Now) + "\')", sqlDatabaseConnector.SqlConnection);
sqlQuery.ExecuteNonQuery();
}
private bool SqlUserIsReadOnly()
{
return mRemoteNG.Settings.Default.SQLReadOnly;
}
}
}

View File

@@ -1,7 +1,8 @@
using System.Data;
using System.Data.SqlClient;
using mRemoteNG.Config.DatabaseConnectors;
using mRemoteNG.Messages;
using mRemoteNG.App;
namespace mRemoteNG.Config.DataProviders
{
@@ -31,6 +32,12 @@ namespace mRemoteNG.Config.DataProviders
public void Save(DataTable dataTable)
{
if (SqlUserIsReadOnly())
{
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Trying to save connections but the SQL read only checkbox is checked, aborting!");
return;
}
if (!SqlDatabaseConnector.IsConnected)
OpenConnection();
using (var sqlBulkCopy = new SqlBulkCopy(SqlDatabaseConnector.SqlConnection))
@@ -51,5 +58,11 @@ namespace mRemoteNG.Config.DataProviders
{
SqlDatabaseConnector.Disconnect();
}
private bool SqlUserIsReadOnly()
{
return mRemoteNG.Settings.Default.SQLReadOnly;
}
}
}

View File

@@ -4,6 +4,7 @@ using System.Linq;
using System.Web;
using mRemoteNG.Connection;
using mRemoteNG.Tree.Root;
using System.Text;
// ReSharper disable ArrangeAccessorOwnerBody
namespace mRemoteNG.Config.Putty
@@ -46,7 +47,7 @@ namespace mRemoteNG.Config.Putty
private IEnumerable<PuttySessionInfo> GetSessionToRemove(IEnumerable<string> sessionNamesFromProvider)
{
var currentlyKnownSessionNames = Sessions.Select(session => session.Name);
var normalizedSessionNames = sessionNamesFromProvider.Select(HttpUtility.UrlDecode);
var normalizedSessionNames = sessionNamesFromProvider.Select(name => HttpUtility.UrlDecode(name, Encoding.GetEncoding("iso-8859-1")));
var sessionNamesToRemove = currentlyKnownSessionNames.Except(normalizedSessionNames);
return Sessions.Where(session => sessionNamesToRemove.Contains(session.Name));
}

View File

@@ -7,6 +7,7 @@ using System;
using System.Collections.Generic;
using System.Management;
using System.Security.Principal;
using System.Text;
using System.Web;
@@ -26,7 +27,7 @@ namespace mRemoteNG.Config.Putty
var sessionNames = new List<string>();
foreach (var sessionName in sessionsKey.GetSubKeyNames())
{
sessionNames.Add(raw ? sessionName : HttpUtility.UrlDecode(sessionName.Replace("+", "%2B")));
sessionNames.Add(raw ? sessionName : HttpUtility.UrlDecode(sessionName.Replace("+", "%2B"), Encoding.GetEncoding("iso-8859-1")));
}
if (raw && !sessionNames.Contains("Default%20Settings"))
@@ -36,15 +37,15 @@ namespace mRemoteNG.Config.Putty
return sessionNames.ToArray();
}
public override PuttySessionInfo GetSession(string sessionName)
public override PuttySessionInfo GetSession(string sessionName)
{
var sessionsKey = Registry.CurrentUser.OpenSubKey(PuttySessionsKey);
var sessionKey = sessionsKey?.OpenSubKey(sessionName);
if (sessionKey == null) return null;
sessionName = HttpUtility.UrlDecode(sessionName.Replace("+", "%2B"));
sessionName = HttpUtility.UrlDecode(sessionName.Replace("+", "%2B"), Encoding.GetEncoding("iso-8859-1"));
var sessionInfo = new PuttySessionInfo
{
PuttySession = sessionName,
@@ -117,5 +118,5 @@ namespace mRemoteNG.Config.Putty
{
RaiseSessionChangedEvent(new PuttySessionChangedEventArgs());
}
}
}
}

View File

@@ -24,8 +24,8 @@ namespace mRemoteNG.Config.Serializers
continue;
}
var key = parts[0];
var value = parts[2];
var key = parts[0].Trim();
var value = parts[2].Trim();
SetConnectionInfoParameter(connectionInfo, key, value);
}

View File

@@ -21,11 +21,17 @@ namespace mRemoteNG.Config.Settings
private readonly MessageCollector _messageCollector;
private readonly QuickConnectToolStrip _quickConnectToolStrip;
private readonly ExternalToolsToolStrip _externalToolsToolStrip;
private readonly MultiSshToolStrip _multiSshToolStrip;
private FrmMain MainForm { get; }
public SettingsLoader(FrmMain mainForm, MessageCollector messageCollector, QuickConnectToolStrip quickConnectToolStrip, ExternalToolsToolStrip externalToolsToolStrip)
public SettingsLoader(
FrmMain mainForm,
MessageCollector messageCollector,
QuickConnectToolStrip quickConnectToolStrip,
ExternalToolsToolStrip externalToolsToolStrip,
MultiSshToolStrip multiSshToolStrip)
{
if (mainForm == null)
throw new ArgumentNullException(nameof(mainForm));
@@ -35,11 +41,14 @@ namespace mRemoteNG.Config.Settings
throw new ArgumentNullException(nameof(quickConnectToolStrip));
if (externalToolsToolStrip == null)
throw new ArgumentNullException(nameof(externalToolsToolStrip));
if (multiSshToolStrip == null)
throw new ArgumentNullException(nameof(multiSshToolStrip));
MainForm = mainForm;
_messageCollector = messageCollector;
_quickConnectToolStrip = quickConnectToolStrip;
_externalToolsToolStrip = externalToolsToolStrip;
_multiSshToolStrip = multiSshToolStrip;
_externalAppsLoader = new ExternalAppsLoader(MainForm, messageCollector, _externalToolsToolStrip);
}
@@ -187,18 +196,25 @@ namespace mRemoteNG.Config.Settings
private void LoadToolbarsFromSettings()
{
if (mRemoteNG.Settings.Default.QuickyTBLocation.X > mRemoteNG.Settings.Default.ExtAppsTBLocation.X)
{
AddExternalAppsPanel();
AddQuickConnectPanel();
}
else
{
AddQuickConnectPanel();
AddExternalAppsPanel();
}
}
ResetAllToolbarLocations();
AddExternalAppsPanel();
AddQuickConnectPanel();
AddMultiSshPanel();
}
/// <summary>
/// This prevents odd positioning issues due to toolbar load order.
/// Since all toolbars start in this temp panel, no toolbar load
/// can be blocked by pre-existing toolbars.
/// </summary>
private void ResetAllToolbarLocations()
{
var tempToolStrip = new ToolStripPanel();
tempToolStrip.Join(_quickConnectToolStrip);
tempToolStrip.Join(_externalToolsToolStrip);
tempToolStrip.Join(_multiSshToolStrip);
}
private void AddQuickConnectPanel()
{
var toolStripPanel = ToolStripPanelFromString(mRemoteNG.Settings.Default.QuickyTBParentDock);
@@ -212,6 +228,13 @@ namespace mRemoteNG.Config.Settings
toolStripPanel.Join(_externalToolsToolStrip, mRemoteNG.Settings.Default.ExtAppsTBLocation);
_externalToolsToolStrip.Visible = mRemoteNG.Settings.Default.ExtAppsTBVisible;
}
private void AddMultiSshPanel()
{
var toolStripPanel = ToolStripPanelFromString(mRemoteNG.Settings.Default.ExtAppsTBParentDock);
toolStripPanel.Join(_multiSshToolStrip, mRemoteNG.Settings.Default.MultiSshToolbarLocation);
_multiSshToolStrip.Visible = mRemoteNG.Settings.Default.MultiSshToolbarVisible;
}
private ToolStripPanel ToolStripPanelFromString(string panel)
{

View File

@@ -11,7 +11,11 @@ namespace mRemoteNG.Config.Settings
{
public static class SettingsSaver
{
public static void SaveSettings(Control quickConnectToolStrip, ExternalToolsToolStrip externalToolsToolStrip, FrmMain frmMain)
public static void SaveSettings(
Control quickConnectToolStrip,
ExternalToolsToolStrip externalToolsToolStrip,
MultiSshToolStrip multiSshToolStrip,
FrmMain frmMain)
{
try
{
@@ -43,20 +47,10 @@ namespace mRemoteNG.Config.Settings
mRemoteNG.Settings.Default.ResetToolbars = false;
mRemoteNG.Settings.Default.NoReconnect = false;
mRemoteNG.Settings.Default.ExtAppsTBLocation = externalToolsToolStrip.Location;
if (externalToolsToolStrip.Parent != null)
{
mRemoteNG.Settings.Default.ExtAppsTBParentDock = externalToolsToolStrip.Parent.Dock.ToString();
}
mRemoteNG.Settings.Default.ExtAppsTBVisible = externalToolsToolStrip.Visible;
mRemoteNG.Settings.Default.ExtAppsTBShowText = externalToolsToolStrip.CMenToolbarShowText.Checked;
mRemoteNG.Settings.Default.QuickyTBLocation = quickConnectToolStrip.Location;
if (quickConnectToolStrip.Parent != null)
{
mRemoteNG.Settings.Default.QuickyTBParentDock = quickConnectToolStrip.Parent.Dock.ToString();
}
mRemoteNG.Settings.Default.QuickyTBVisible = quickConnectToolStrip.Visible;
SaveExternalAppsToolbarLocation(externalToolsToolStrip);
SaveQuickConnectToolbarLocation(quickConnectToolStrip);
SaveMultiSshToolbarLocation(multiSshToolStrip);
mRemoteNG.Settings.Default.Save();
SaveDockPanelLayout();
@@ -68,6 +62,40 @@ namespace mRemoteNG.Config.Settings
}
}
private static void SaveExternalAppsToolbarLocation(ExternalToolsToolStrip externalToolsToolStrip)
{
mRemoteNG.Settings.Default.ExtAppsTBLocation = externalToolsToolStrip.Location;
mRemoteNG.Settings.Default.ExtAppsTBVisible = externalToolsToolStrip.Visible;
mRemoteNG.Settings.Default.ExtAppsTBShowText = externalToolsToolStrip.CMenToolbarShowText.Checked;
if (externalToolsToolStrip.Parent != null)
{
mRemoteNG.Settings.Default.ExtAppsTBParentDock = externalToolsToolStrip.Parent.Dock.ToString();
}
}
private static void SaveQuickConnectToolbarLocation(Control quickConnectToolStrip)
{
mRemoteNG.Settings.Default.QuickyTBLocation = quickConnectToolStrip.Location;
mRemoteNG.Settings.Default.QuickyTBVisible = quickConnectToolStrip.Visible;
if (quickConnectToolStrip.Parent != null)
{
mRemoteNG.Settings.Default.QuickyTBParentDock = quickConnectToolStrip.Parent.Dock.ToString();
}
}
private static void SaveMultiSshToolbarLocation(MultiSshToolStrip multiSshToolStrip)
{
mRemoteNG.Settings.Default.MultiSshToolbarLocation = multiSshToolStrip.Location;
mRemoteNG.Settings.Default.MultiSshToolbarVisible = multiSshToolStrip.Visible;
if (multiSshToolStrip.Parent != null)
{
mRemoteNG.Settings.Default.MultiSshToolbarParentDock = multiSshToolStrip.Parent.Dock.ToString();
}
}
private static void SaveDockPanelLayout()
{
var panelLayoutXmlFilePath = SettingsFileInfo.SettingsPath + "\\" + SettingsFileInfo.LayoutFileName;

View File

@@ -19,7 +19,10 @@ namespace mRemoteNG.Connection.Protocol
switch (connectionInfo.Protocol)
{
case ProtocolType.RDP:
newProtocol = new RdpProtocol();
newProtocol = new RdpProtocol
{
LoadBalanceInfoUseUtf8 = Settings.Default.RdpLoadBalanceInfoUseUtf8
};
((RdpProtocol) newProtocol).tmrReconnect.Elapsed += ((RdpProtocol) newProtocol).tmrReconnect_Elapsed;
break;
case ProtocolType.VNC:

View File

@@ -0,0 +1,40 @@
using System.Text;
namespace mRemoteNG.Connection.Protocol.RDP
{
public class AzureLoadBalanceInfoEncoder
{
public string Encode(string loadBalanceInfo)
{
// The ActiveX component requires a UTF-8 encoded string, but .NET uses
// UTF-16 encoded strings by default. The following code converts
// the UTF-16 encoded string so that the byte-representation of the
// LoadBalanceInfo string object will "appear" as UTF-8 to the Active component.
// Furthermore, since the final string still has to be shoehorned into
// a UTF-16 encoded string, I pad an extra space in case the number of
// bytes would be odd, in order to prevent the byte conversion from
// mangling the string at the end. The space is ignored by the RDP
// protocol as long as it is inserted at the end.
// Finally, it is required that the LoadBalanceInfo setting is postfixed
// with \r\n in order to work properly. Note also that \r\n MUST be
// the last two characters, so the space padding has to be inserted first.
// The following code has been tested with Windows Azure connections
// only - I am aware there are other types of RDP connections that
// require the LoadBalanceInfo parameter which I have not tested
// (e.g., Multi-Server Terminal Services Gateway), that may or may not
// work properly.
//
// Sources:
// 1. http://stackoverflow.com/questions/13536267/how-to-connect-to-azure-vm-with-remote-desktop-activex
// 2. http://social.technet.microsoft.com/Forums/windowsserver/en-US/e68d4e9a-1c8a-4e55-83b3-e3b726ff5346/issue-with-using-advancedsettings2loadbalanceinfo
// 3. Manual comparison of raw packets between Windows RDP client and Terminals using WireShark.
// Copied from https://github.com/OliverKohlDSc/Terminals/blob/master/Terminals/Connections/RDPConnection.cs
if (loadBalanceInfo.Length % 2 == 1)
loadBalanceInfo += " ";
loadBalanceInfo += "\r\n";
var bytes = Encoding.UTF8.GetBytes(loadBalanceInfo);
return Encoding.Unicode.GetString(bytes);
}
}
}

View File

@@ -87,6 +87,8 @@ namespace mRemoteNG.Connection.Protocol.RDP
}
}
}
public bool LoadBalanceInfoUseUtf8 { get; set; }
#endregion
#region Constructors
@@ -601,7 +603,9 @@ namespace mRemoteNG.Connection.Protocol.RDP
}
try
{
_rdpClient.AdvancedSettings2.LoadBalanceInfo = _connectionInfo.LoadBalanceInfo;
_rdpClient.AdvancedSettings2.LoadBalanceInfo = LoadBalanceInfoUseUtf8
? new AzureLoadBalanceInfoEncoder().Encode(_connectionInfo.LoadBalanceInfo)
: _connectionInfo.LoadBalanceInfo;
}
catch (Exception ex)
{

View File

@@ -2626,5 +2626,77 @@ namespace mRemoteNG {
this["UseFilterSearch"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool SQLReadOnly {
get {
return ((bool)(this["SQLReadOnly"]));
}
set {
this["SQLReadOnly"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool LockToolbars {
get {
return ((bool)(this["LockToolbars"]));
}
set {
this["LockToolbars"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool RdpLoadBalanceInfoUseUtf8 {
get {
return ((bool)(this["RdpLoadBalanceInfoUseUtf8"]));
}
set {
this["RdpLoadBalanceInfoUseUtf8"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0, 0")]
public global::System.Drawing.Point MultiSshToolbarLocation {
get {
return ((global::System.Drawing.Point)(this["MultiSshToolbarLocation"]));
}
set {
this["MultiSshToolbarLocation"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string MultiSshToolbarParentDock {
get {
return ((string)(this["MultiSshToolbarParentDock"]));
}
set {
this["MultiSshToolbarParentDock"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool MultiSshToolbarVisible {
get {
return ((bool)(this["MultiSshToolbarVisible"]));
}
set {
this["MultiSshToolbarVisible"] = value;
}
}
}
}

View File

@@ -653,5 +653,23 @@
<Setting Name="UseFilterSearch" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="SQLReadOnly" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="LockToolbars" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="RdpLoadBalanceInfoUseUtf8" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="MultiSshToolbarLocation" Type="System.Drawing.Point" Scope="User">
<Value Profile="(Default)">0, 0</Value>
</Setting>
<Setting Name="MultiSshToolbarParentDock" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="MultiSshToolbarVisible" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

Binary file not shown.

View File

@@ -159,6 +159,15 @@ namespace mRemoteNG {
}
}
/// <summary>
/// Looks up a localized string similar to Use UTF8 encoding for RDP &quot;Load Balance Info&quot; property.
/// </summary>
internal static string LoadBalanceInfoUseUtf8 {
get {
return ResourceManager.GetString("LoadBalanceInfoUseUtf8", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Login failed for user &apos;{0}&apos;..
/// </summary>
@@ -2894,6 +2903,15 @@ namespace mRemoteNG {
}
}
/// <summary>
/// Looks up a localized string similar to Read Only:.
/// </summary>
internal static string strLabelReadOnly {
get {
return ResourceManager.GetString("strLabelReadOnly", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Released under the GNU General Public License (GPL).
/// </summary>

View File

@@ -2625,4 +2625,10 @@ This page will walk you through the process of upgrading your connections file o
<data name="TestConnection" xml:space="preserve">
<value>Test Connection</value>
</data>
<data name="strLabelReadOnly" xml:space="preserve">
<value>Read Only:</value>
</data>
<data name="LoadBalanceInfoUseUtf8" xml:space="preserve">
<value>Use UTF8 encoding for RDP "Load Balance Info" property</value>
</data>
</root>

View File

@@ -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);
}
}
}

View File

@@ -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;
}
}
}

View File

@@ -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;

View File

@@ -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);

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;

View File

@@ -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

View File

@@ -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)

View File

@@ -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;

View File

@@ -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;

View File

@@ -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)

View File

@@ -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");
}

View File

@@ -43,6 +43,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
this.lblUVNCSCPort = new mRemoteNG.UI.Controls.Base.NGLabel();
this.lblSeconds = new mRemoteNG.UI.Controls.Base.NGLabel();
this.btnBrowseCustomPuttyPath = new mRemoteNG.UI.Controls.Base.NGButton();
this.chkLoadBalanceInfoUseUtf8 = new mRemoteNG.UI.Controls.Base.NGCheckBox();
((System.ComponentModel.ISupportInitialize)(this.numPuttyWaitTime)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numUVNCSCPort)).BeginInit();
this.SuspendLayout();
@@ -60,7 +61,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
//
// lblMaximumPuttyWaitTime
//
this.lblMaximumPuttyWaitTime.Location = new System.Drawing.Point(3, 152);
this.lblMaximumPuttyWaitTime.Location = new System.Drawing.Point(3, 175);
this.lblMaximumPuttyWaitTime.Name = "lblMaximumPuttyWaitTime";
this.lblMaximumPuttyWaitTime.Size = new System.Drawing.Size(364, 13);
this.lblMaximumPuttyWaitTime.TabIndex = 7;
@@ -81,7 +82,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
// numPuttyWaitTime
//
this.numPuttyWaitTime.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.numPuttyWaitTime.Location = new System.Drawing.Point(373, 150);
this.numPuttyWaitTime.Location = new System.Drawing.Point(373, 173);
this.numPuttyWaitTime.Maximum = new decimal(new int[] {
999,
0,
@@ -89,7 +90,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
0});
this.numPuttyWaitTime.Name = "numPuttyWaitTime";
this.numPuttyWaitTime.Size = new System.Drawing.Size(49, 20);
this.numPuttyWaitTime.TabIndex = 8;
this.numPuttyWaitTime.TabIndex = 7;
this.numPuttyWaitTime.Value = new decimal(new int[] {
5,
0,
@@ -100,17 +101,17 @@ namespace mRemoteNG.UI.Forms.OptionsPages
//
this.chkUseCustomPuttyPath._mice = mRemoteNG.UI.Controls.Base.NGCheckBox.MouseState.HOVER;
this.chkUseCustomPuttyPath.AutoSize = true;
this.chkUseCustomPuttyPath.Location = new System.Drawing.Point(3, 49);
this.chkUseCustomPuttyPath.Location = new System.Drawing.Point(3, 72);
this.chkUseCustomPuttyPath.Name = "chkUseCustomPuttyPath";
this.chkUseCustomPuttyPath.Size = new System.Drawing.Size(146, 17);
this.chkUseCustomPuttyPath.TabIndex = 2;
this.chkUseCustomPuttyPath.TabIndex = 3;
this.chkUseCustomPuttyPath.Text = "Use custom PuTTY path:";
this.chkUseCustomPuttyPath.UseVisualStyleBackColor = true;
this.chkUseCustomPuttyPath.CheckedChanged += new System.EventHandler(this.chkUseCustomPuttyPath_CheckedChanged);
//
// lblConfigurePuttySessions
//
this.lblConfigurePuttySessions.Location = new System.Drawing.Point(3, 121);
this.lblConfigurePuttySessions.Location = new System.Drawing.Point(3, 144);
this.lblConfigurePuttySessions.Name = "lblConfigurePuttySessions";
this.lblConfigurePuttySessions.Size = new System.Drawing.Size(364, 13);
this.lblConfigurePuttySessions.TabIndex = 5;
@@ -120,7 +121,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
// numUVNCSCPort
//
this.numUVNCSCPort.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.numUVNCSCPort.Location = new System.Drawing.Point(373, 193);
this.numUVNCSCPort.Location = new System.Drawing.Point(373, 218);
this.numUVNCSCPort.Maximum = new decimal(new int[] {
65535,
0,
@@ -128,7 +129,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
0});
this.numUVNCSCPort.Name = "numUVNCSCPort";
this.numUVNCSCPort.Size = new System.Drawing.Size(72, 20);
this.numUVNCSCPort.TabIndex = 11;
this.numUVNCSCPort.TabIndex = 8;
this.numUVNCSCPort.Value = new decimal(new int[] {
5500,
0,
@@ -140,10 +141,10 @@ namespace mRemoteNG.UI.Forms.OptionsPages
//
this.txtCustomPuttyPath.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtCustomPuttyPath.Enabled = false;
this.txtCustomPuttyPath.Location = new System.Drawing.Point(21, 72);
this.txtCustomPuttyPath.Location = new System.Drawing.Point(21, 95);
this.txtCustomPuttyPath.Name = "txtCustomPuttyPath";
this.txtCustomPuttyPath.Size = new System.Drawing.Size(346, 20);
this.txtCustomPuttyPath.TabIndex = 3;
this.txtCustomPuttyPath.TabIndex = 4;
this.txtCustomPuttyPath.TextChanged += new System.EventHandler(this.txtCustomPuttyPath_TextChanged);
//
// btnLaunchPutty
@@ -151,7 +152,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
this.btnLaunchPutty._mice = mRemoteNG.UI.Controls.Base.NGButton.MouseState.HOVER;
this.btnLaunchPutty.Image = global::mRemoteNG.Resources.PuttyConfig;
this.btnLaunchPutty.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnLaunchPutty.Location = new System.Drawing.Point(373, 115);
this.btnLaunchPutty.Location = new System.Drawing.Point(373, 138);
this.btnLaunchPutty.Name = "btnLaunchPutty";
this.btnLaunchPutty.Size = new System.Drawing.Size(110, 25);
this.btnLaunchPutty.TabIndex = 6;
@@ -162,7 +163,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
//
// lblUVNCSCPort
//
this.lblUVNCSCPort.Location = new System.Drawing.Point(3, 195);
this.lblUVNCSCPort.Location = new System.Drawing.Point(3, 220);
this.lblUVNCSCPort.Name = "lblUVNCSCPort";
this.lblUVNCSCPort.Size = new System.Drawing.Size(364, 13);
this.lblUVNCSCPort.TabIndex = 10;
@@ -173,7 +174,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
// lblSeconds
//
this.lblSeconds.AutoSize = true;
this.lblSeconds.Location = new System.Drawing.Point(428, 152);
this.lblSeconds.Location = new System.Drawing.Point(428, 175);
this.lblSeconds.Name = "lblSeconds";
this.lblSeconds.Size = new System.Drawing.Size(47, 13);
this.lblSeconds.TabIndex = 9;
@@ -183,18 +184,30 @@ namespace mRemoteNG.UI.Forms.OptionsPages
//
this.btnBrowseCustomPuttyPath._mice = mRemoteNG.UI.Controls.Base.NGButton.MouseState.HOVER;
this.btnBrowseCustomPuttyPath.Enabled = false;
this.btnBrowseCustomPuttyPath.Location = new System.Drawing.Point(373, 70);
this.btnBrowseCustomPuttyPath.Location = new System.Drawing.Point(373, 93);
this.btnBrowseCustomPuttyPath.Name = "btnBrowseCustomPuttyPath";
this.btnBrowseCustomPuttyPath.Size = new System.Drawing.Size(75, 23);
this.btnBrowseCustomPuttyPath.TabIndex = 4;
this.btnBrowseCustomPuttyPath.TabIndex = 5;
this.btnBrowseCustomPuttyPath.Text = "Browse...";
this.btnBrowseCustomPuttyPath.UseVisualStyleBackColor = true;
this.btnBrowseCustomPuttyPath.Click += new System.EventHandler(this.btnBrowseCustomPuttyPath_Click);
//
// chkLoadBalanceInfoUseUtf8
//
this.chkLoadBalanceInfoUseUtf8._mice = mRemoteNG.UI.Controls.Base.NGCheckBox.MouseState.HOVER;
this.chkLoadBalanceInfoUseUtf8.AutoSize = true;
this.chkLoadBalanceInfoUseUtf8.Location = new System.Drawing.Point(3, 49);
this.chkLoadBalanceInfoUseUtf8.Name = "chkLoadBalanceInfoUseUtf8";
this.chkLoadBalanceInfoUseUtf8.Size = new System.Drawing.Size(304, 17);
this.chkLoadBalanceInfoUseUtf8.TabIndex = 2;
this.chkLoadBalanceInfoUseUtf8.Text = "Use UTF8 encoding for RDP \"Load Balance Info\" property";
this.chkLoadBalanceInfoUseUtf8.UseVisualStyleBackColor = true;
//
// AdvancedPage
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.chkLoadBalanceInfoUseUtf8);
this.Controls.Add(this.chkAutomaticallyGetSessionInfo);
this.Controls.Add(this.lblMaximumPuttyWaitTime);
this.Controls.Add(this.chkAutomaticReconnect);
@@ -228,6 +241,6 @@ namespace mRemoteNG.UI.Forms.OptionsPages
internal Controls.Base.NGLabel lblUVNCSCPort;
internal Controls.Base.NGLabel lblSeconds;
internal Controls.Base.NGButton btnBrowseCustomPuttyPath;
}
private Controls.Base.NGCheckBox chkLoadBalanceInfoUseUtf8;
}
}

View File

@@ -32,6 +32,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
lblSeconds.Text = Language.strLabelSeconds;
lblMaximumPuttyWaitTime.Text = Language.strLabelPuttyTimeout;
chkAutomaticReconnect.Text = Language.strCheckboxAutomaticReconnect;
chkLoadBalanceInfoUseUtf8.Text = Language.LoadBalanceInfoUseUtf8;
lblConfigurePuttySessions.Text = Language.strLabelPuttySessionsConfig;
btnLaunchPutty.Text = Language.strButtonLaunchPutty;
btnBrowseCustomPuttyPath.Text = Language.strButtonBrowse;
@@ -46,6 +47,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
chkAutomaticallyGetSessionInfo.Checked = Settings.Default.AutomaticallyGetSessionInfo;
chkAutomaticReconnect.Checked = Settings.Default.ReconnectOnDisconnect;
chkLoadBalanceInfoUseUtf8.Checked = Settings.Default.RdpLoadBalanceInfoUseUtf8;
numPuttyWaitTime.Value = Settings.Default.MaxPuttyWaitTime;
chkUseCustomPuttyPath.Checked = Settings.Default.UseCustomPuttyPath;
@@ -59,6 +61,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
{
Settings.Default.AutomaticallyGetSessionInfo = chkAutomaticallyGetSessionInfo.Checked;
Settings.Default.ReconnectOnDisconnect = chkAutomaticReconnect.Checked;
Settings.Default.RdpLoadBalanceInfoUseUtf8 = chkLoadBalanceInfoUseUtf8.Checked;
var puttyPathChanged = false;
if (Settings.Default.CustomPuttyPath != txtCustomPuttyPath.Text)

View File

@@ -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;
}

View File

@@ -27,195 +27,220 @@ namespace mRemoteNG.UI.Forms.OptionsPages
//Do not modify it using the code editor.
[System.Diagnostics.DebuggerStepThrough()]private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SqlServerPage));
this.lblSQLDatabaseName = new mRemoteNG.UI.Controls.Base.NGLabel();
this.txtSQLDatabaseName = new mRemoteNG.UI.Controls.Base.NGTextBox();
this.lblExperimental = new mRemoteNG.UI.Controls.Base.NGLabel();
this.chkUseSQLServer = new mRemoteNG.UI.Controls.Base.NGCheckBox();
this.lblSQLUsername = new mRemoteNG.UI.Controls.Base.NGLabel();
this.txtSQLPassword = new mRemoteNG.UI.Controls.Base.NGTextBox();
this.lblSQLInfo = new mRemoteNG.UI.Controls.Base.NGLabel();
this.lblSQLServer = new mRemoteNG.UI.Controls.Base.NGLabel();
this.txtSQLUsername = new mRemoteNG.UI.Controls.Base.NGTextBox();
this.txtSQLServer = new mRemoteNG.UI.Controls.Base.NGTextBox();
this.lblSQLPassword = new mRemoteNG.UI.Controls.Base.NGLabel();
this.btnTestConnection = new mRemoteNG.UI.Controls.Base.NGButton();
this.imgConnectionStatus = new System.Windows.Forms.PictureBox();
this.lblTestConnectionResults = new mRemoteNG.UI.Controls.Base.NGLabel();
((System.ComponentModel.ISupportInitialize)(this.imgConnectionStatus)).BeginInit();
this.SuspendLayout();
//
// lblSQLDatabaseName
//
this.lblSQLDatabaseName.Enabled = false;
this.lblSQLDatabaseName.Location = new System.Drawing.Point(23, 132);
this.lblSQLDatabaseName.Name = "lblSQLDatabaseName";
this.lblSQLDatabaseName.Size = new System.Drawing.Size(111, 13);
this.lblSQLDatabaseName.TabIndex = 5;
this.lblSQLDatabaseName.Text = "Database:";
this.lblSQLDatabaseName.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// txtSQLDatabaseName
//
this.txtSQLDatabaseName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtSQLDatabaseName.Enabled = false;
this.txtSQLDatabaseName.Location = new System.Drawing.Point(140, 130);
this.txtSQLDatabaseName.Name = "txtSQLDatabaseName";
this.txtSQLDatabaseName.Size = new System.Drawing.Size(153, 20);
this.txtSQLDatabaseName.TabIndex = 6;
//
// lblExperimental
//
this.lblExperimental.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SqlServerPage));
this.lblSQLDatabaseName = new mRemoteNG.UI.Controls.Base.NGLabel();
this.txtSQLDatabaseName = new mRemoteNG.UI.Controls.Base.NGTextBox();
this.lblExperimental = new mRemoteNG.UI.Controls.Base.NGLabel();
this.chkUseSQLServer = new mRemoteNG.UI.Controls.Base.NGCheckBox();
this.lblSQLUsername = new mRemoteNG.UI.Controls.Base.NGLabel();
this.txtSQLPassword = new mRemoteNG.UI.Controls.Base.NGTextBox();
this.lblSQLInfo = new mRemoteNG.UI.Controls.Base.NGLabel();
this.lblSQLServer = new mRemoteNG.UI.Controls.Base.NGLabel();
this.txtSQLUsername = new mRemoteNG.UI.Controls.Base.NGTextBox();
this.txtSQLServer = new mRemoteNG.UI.Controls.Base.NGTextBox();
this.lblSQLPassword = new mRemoteNG.UI.Controls.Base.NGLabel();
this.btnTestConnection = new mRemoteNG.UI.Controls.Base.NGButton();
this.imgConnectionStatus = new System.Windows.Forms.PictureBox();
this.lblTestConnectionResults = new mRemoteNG.UI.Controls.Base.NGLabel();
this.chkSQLReadOnly = new mRemoteNG.UI.Controls.Base.NGCheckBox();
this.lblSQLReadOnly = new mRemoteNG.UI.Controls.Base.NGLabel();
((System.ComponentModel.ISupportInitialize)(this.imgConnectionStatus)).BeginInit();
this.SuspendLayout();
//
// lblSQLDatabaseName
//
this.lblSQLDatabaseName.Enabled = false;
this.lblSQLDatabaseName.Location = new System.Drawing.Point(23, 132);
this.lblSQLDatabaseName.Name = "lblSQLDatabaseName";
this.lblSQLDatabaseName.Size = new System.Drawing.Size(111, 13);
this.lblSQLDatabaseName.TabIndex = 5;
this.lblSQLDatabaseName.Text = "Database:";
this.lblSQLDatabaseName.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// txtSQLDatabaseName
//
this.txtSQLDatabaseName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtSQLDatabaseName.Enabled = false;
this.txtSQLDatabaseName.Location = new System.Drawing.Point(140, 130);
this.txtSQLDatabaseName.Name = "txtSQLDatabaseName";
this.txtSQLDatabaseName.Size = new System.Drawing.Size(153, 20);
this.txtSQLDatabaseName.TabIndex = 6;
//
// lblExperimental
//
this.lblExperimental.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblExperimental.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.World);
this.lblExperimental.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.lblExperimental.Location = new System.Drawing.Point(3, 0);
this.lblExperimental.Name = "lblExperimental";
this.lblExperimental.Size = new System.Drawing.Size(596, 25);
this.lblExperimental.TabIndex = 0;
this.lblExperimental.Text = "EXPERIMENTAL";
this.lblExperimental.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// chkUseSQLServer
//
this.chkUseSQLServer._mice = mRemoteNG.UI.Controls.Base.NGCheckBox.MouseState.HOVER;
this.chkUseSQLServer.AutoSize = true;
this.chkUseSQLServer.Location = new System.Drawing.Point(3, 76);
this.chkUseSQLServer.Name = "chkUseSQLServer";
this.chkUseSQLServer.Size = new System.Drawing.Size(234, 17);
this.chkUseSQLServer.TabIndex = 2;
this.chkUseSQLServer.Text = "Use SQL Server to load && save connections";
this.chkUseSQLServer.UseVisualStyleBackColor = true;
this.chkUseSQLServer.CheckedChanged += new System.EventHandler(this.chkUseSQLServer_CheckedChanged);
//
// lblSQLUsername
//
this.lblSQLUsername.Enabled = false;
this.lblSQLUsername.Location = new System.Drawing.Point(23, 158);
this.lblSQLUsername.Name = "lblSQLUsername";
this.lblSQLUsername.Size = new System.Drawing.Size(111, 13);
this.lblSQLUsername.TabIndex = 7;
this.lblSQLUsername.Text = "Username:";
this.lblSQLUsername.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// txtSQLPassword
//
this.txtSQLPassword.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtSQLPassword.Enabled = false;
this.txtSQLPassword.Location = new System.Drawing.Point(140, 182);
this.txtSQLPassword.Name = "txtSQLPassword";
this.txtSQLPassword.Size = new System.Drawing.Size(153, 20);
this.txtSQLPassword.TabIndex = 10;
this.txtSQLPassword.UseSystemPasswordChar = true;
//
// lblSQLInfo
//
this.lblSQLInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.lblExperimental.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.World);
this.lblExperimental.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.lblExperimental.Location = new System.Drawing.Point(3, 0);
this.lblExperimental.Name = "lblExperimental";
this.lblExperimental.Size = new System.Drawing.Size(596, 25);
this.lblExperimental.TabIndex = 0;
this.lblExperimental.Text = "EXPERIMENTAL";
this.lblExperimental.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// chkUseSQLServer
//
this.chkUseSQLServer._mice = mRemoteNG.UI.Controls.Base.NGCheckBox.MouseState.HOVER;
this.chkUseSQLServer.AutoSize = true;
this.chkUseSQLServer.Location = new System.Drawing.Point(3, 76);
this.chkUseSQLServer.Name = "chkUseSQLServer";
this.chkUseSQLServer.Size = new System.Drawing.Size(234, 17);
this.chkUseSQLServer.TabIndex = 2;
this.chkUseSQLServer.Text = "Use SQL Server to load && save connections";
this.chkUseSQLServer.UseVisualStyleBackColor = true;
this.chkUseSQLServer.CheckedChanged += new System.EventHandler(this.chkUseSQLServer_CheckedChanged);
//
// lblSQLUsername
//
this.lblSQLUsername.Enabled = false;
this.lblSQLUsername.Location = new System.Drawing.Point(23, 158);
this.lblSQLUsername.Name = "lblSQLUsername";
this.lblSQLUsername.Size = new System.Drawing.Size(111, 13);
this.lblSQLUsername.TabIndex = 7;
this.lblSQLUsername.Text = "Username:";
this.lblSQLUsername.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// txtSQLPassword
//
this.txtSQLPassword.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtSQLPassword.Enabled = false;
this.txtSQLPassword.Location = new System.Drawing.Point(140, 182);
this.txtSQLPassword.Name = "txtSQLPassword";
this.txtSQLPassword.Size = new System.Drawing.Size(153, 20);
this.txtSQLPassword.TabIndex = 10;
this.txtSQLPassword.UseSystemPasswordChar = true;
//
// lblSQLInfo
//
this.lblSQLInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblSQLInfo.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.World);
this.lblSQLInfo.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.lblSQLInfo.Location = new System.Drawing.Point(3, 25);
this.lblSQLInfo.Name = "lblSQLInfo";
this.lblSQLInfo.Size = new System.Drawing.Size(596, 25);
this.lblSQLInfo.TabIndex = 1;
this.lblSQLInfo.Text = "Please see Help - Getting started - SQL Configuration for more Info!";
this.lblSQLInfo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblSQLServer
//
this.lblSQLServer.Enabled = false;
this.lblSQLServer.Location = new System.Drawing.Point(23, 106);
this.lblSQLServer.Name = "lblSQLServer";
this.lblSQLServer.Size = new System.Drawing.Size(111, 13);
this.lblSQLServer.TabIndex = 3;
this.lblSQLServer.Text = "SQL Server:";
this.lblSQLServer.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// txtSQLUsername
//
this.txtSQLUsername.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtSQLUsername.Enabled = false;
this.txtSQLUsername.Location = new System.Drawing.Point(140, 156);
this.txtSQLUsername.Name = "txtSQLUsername";
this.txtSQLUsername.Size = new System.Drawing.Size(153, 20);
this.txtSQLUsername.TabIndex = 8;
//
// txtSQLServer
//
this.txtSQLServer.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtSQLServer.Enabled = false;
this.txtSQLServer.Location = new System.Drawing.Point(140, 103);
this.txtSQLServer.Name = "txtSQLServer";
this.txtSQLServer.Size = new System.Drawing.Size(153, 20);
this.txtSQLServer.TabIndex = 4;
//
// lblSQLPassword
//
this.lblSQLPassword.Enabled = false;
this.lblSQLPassword.Location = new System.Drawing.Point(23, 184);
this.lblSQLPassword.Name = "lblSQLPassword";
this.lblSQLPassword.Size = new System.Drawing.Size(111, 13);
this.lblSQLPassword.TabIndex = 9;
this.lblSQLPassword.Text = "Password:";
this.lblSQLPassword.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// btnTestConnection
//
this.btnTestConnection._mice = mRemoteNG.UI.Controls.Base.NGButton.MouseState.HOVER;
this.btnTestConnection.Enabled = false;
this.btnTestConnection.Location = new System.Drawing.Point(140, 208);
this.btnTestConnection.Name = "btnTestConnection";
this.btnTestConnection.Size = new System.Drawing.Size(153, 23);
this.btnTestConnection.TabIndex = 11;
this.btnTestConnection.Text = "Test Connection";
this.btnTestConnection.UseVisualStyleBackColor = true;
this.btnTestConnection.Click += new System.EventHandler(this.btnTestConnection_Click);
//
// imgConnectionStatus
//
this.imgConnectionStatus.Image = global::mRemoteNG.Resources.Help;
this.imgConnectionStatus.Location = new System.Drawing.Point(299, 212);
this.imgConnectionStatus.Name = "imgConnectionStatus";
this.imgConnectionStatus.Size = new System.Drawing.Size(16, 16);
this.imgConnectionStatus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.imgConnectionStatus.TabIndex = 12;
this.imgConnectionStatus.TabStop = false;
//
// lblTestConnectionResults
//
this.lblTestConnectionResults.AutoSize = true;
this.lblTestConnectionResults.Location = new System.Drawing.Point(140, 238);
this.lblTestConnectionResults.Name = "lblTestConnectionResults";
this.lblTestConnectionResults.Size = new System.Drawing.Size(0, 13);
this.lblTestConnectionResults.TabIndex = 13;
//
// SqlServerPage
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.lblTestConnectionResults);
this.Controls.Add(this.imgConnectionStatus);
this.Controls.Add(this.btnTestConnection);
this.Controls.Add(this.lblSQLDatabaseName);
this.Controls.Add(this.txtSQLDatabaseName);
this.Controls.Add(this.lblExperimental);
this.Controls.Add(this.chkUseSQLServer);
this.Controls.Add(this.lblSQLUsername);
this.Controls.Add(this.txtSQLPassword);
this.Controls.Add(this.lblSQLInfo);
this.Controls.Add(this.lblSQLServer);
this.Controls.Add(this.txtSQLUsername);
this.Controls.Add(this.txtSQLServer);
this.Controls.Add(this.lblSQLPassword);
this.Name = "SqlServerPage";
this.PageIcon = ((System.Drawing.Icon)(resources.GetObject("$this.PageIcon")));
this.Size = new System.Drawing.Size(610, 489);
((System.ComponentModel.ISupportInitialize)(this.imgConnectionStatus)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
this.lblSQLInfo.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.World);
this.lblSQLInfo.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.lblSQLInfo.Location = new System.Drawing.Point(3, 25);
this.lblSQLInfo.Name = "lblSQLInfo";
this.lblSQLInfo.Size = new System.Drawing.Size(596, 25);
this.lblSQLInfo.TabIndex = 1;
this.lblSQLInfo.Text = "Please see Help - Getting started - SQL Configuration for more Info!";
this.lblSQLInfo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblSQLServer
//
this.lblSQLServer.Enabled = false;
this.lblSQLServer.Location = new System.Drawing.Point(23, 106);
this.lblSQLServer.Name = "lblSQLServer";
this.lblSQLServer.Size = new System.Drawing.Size(111, 13);
this.lblSQLServer.TabIndex = 3;
this.lblSQLServer.Text = "SQL Server:";
this.lblSQLServer.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// txtSQLUsername
//
this.txtSQLUsername.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtSQLUsername.Enabled = false;
this.txtSQLUsername.Location = new System.Drawing.Point(140, 156);
this.txtSQLUsername.Name = "txtSQLUsername";
this.txtSQLUsername.Size = new System.Drawing.Size(153, 20);
this.txtSQLUsername.TabIndex = 8;
//
// txtSQLServer
//
this.txtSQLServer.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtSQLServer.Enabled = false;
this.txtSQLServer.Location = new System.Drawing.Point(140, 103);
this.txtSQLServer.Name = "txtSQLServer";
this.txtSQLServer.Size = new System.Drawing.Size(153, 20);
this.txtSQLServer.TabIndex = 4;
//
// lblSQLPassword
//
this.lblSQLPassword.Enabled = false;
this.lblSQLPassword.Location = new System.Drawing.Point(23, 184);
this.lblSQLPassword.Name = "lblSQLPassword";
this.lblSQLPassword.Size = new System.Drawing.Size(111, 13);
this.lblSQLPassword.TabIndex = 9;
this.lblSQLPassword.Text = "Password:";
this.lblSQLPassword.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// btnTestConnection
//
this.btnTestConnection._mice = mRemoteNG.UI.Controls.Base.NGButton.MouseState.HOVER;
this.btnTestConnection.Enabled = false;
this.btnTestConnection.Location = new System.Drawing.Point(140, 228);
this.btnTestConnection.Name = "btnTestConnection";
this.btnTestConnection.Size = new System.Drawing.Size(153, 23);
this.btnTestConnection.TabIndex = 11;
this.btnTestConnection.Text = "Test Connection";
this.btnTestConnection.UseVisualStyleBackColor = true;
this.btnTestConnection.Click += new System.EventHandler(this.btnTestConnection_Click);
//
// imgConnectionStatus
//
this.imgConnectionStatus.Image = global::mRemoteNG.Resources.Help;
this.imgConnectionStatus.Location = new System.Drawing.Point(297, 231);
this.imgConnectionStatus.Name = "imgConnectionStatus";
this.imgConnectionStatus.Size = new System.Drawing.Size(16, 16);
this.imgConnectionStatus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.imgConnectionStatus.TabIndex = 12;
this.imgConnectionStatus.TabStop = false;
//
// lblTestConnectionResults
//
this.lblTestConnectionResults.AutoSize = true;
this.lblTestConnectionResults.Location = new System.Drawing.Point(137, 254);
this.lblTestConnectionResults.Name = "lblTestConnectionResults";
this.lblTestConnectionResults.Size = new System.Drawing.Size(117, 13);
this.lblTestConnectionResults.TabIndex = 13;
this.lblTestConnectionResults.Text = "Test connection details";
//
// chkSQLReadOnly
//
this.chkSQLReadOnly._mice = mRemoteNG.UI.Controls.Base.NGCheckBox.MouseState.HOVER;
this.chkSQLReadOnly.AutoSize = true;
this.chkSQLReadOnly.Location = new System.Drawing.Point(140, 208);
this.chkSQLReadOnly.Name = "chkSQLReadOnly";
this.chkSQLReadOnly.Size = new System.Drawing.Size(15, 14);
this.chkSQLReadOnly.TabIndex = 14;
this.chkSQLReadOnly.UseVisualStyleBackColor = true;
//
// lblSQLReadOnly
//
this.lblSQLReadOnly.Enabled = false;
this.lblSQLReadOnly.Location = new System.Drawing.Point(23, 208);
this.lblSQLReadOnly.Name = "lblSQLReadOnly";
this.lblSQLReadOnly.Size = new System.Drawing.Size(111, 13);
this.lblSQLReadOnly.TabIndex = 15;
this.lblSQLReadOnly.Text = "Read Only:";
this.lblSQLReadOnly.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// SqlServerPage
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.lblSQLReadOnly);
this.Controls.Add(this.chkSQLReadOnly);
this.Controls.Add(this.lblTestConnectionResults);
this.Controls.Add(this.imgConnectionStatus);
this.Controls.Add(this.btnTestConnection);
this.Controls.Add(this.lblSQLDatabaseName);
this.Controls.Add(this.txtSQLDatabaseName);
this.Controls.Add(this.lblExperimental);
this.Controls.Add(this.chkUseSQLServer);
this.Controls.Add(this.lblSQLUsername);
this.Controls.Add(this.txtSQLPassword);
this.Controls.Add(this.lblSQLInfo);
this.Controls.Add(this.lblSQLServer);
this.Controls.Add(this.txtSQLUsername);
this.Controls.Add(this.txtSQLServer);
this.Controls.Add(this.lblSQLPassword);
this.Name = "SqlServerPage";
this.PageIcon = ((System.Drawing.Icon)(resources.GetObject("$this.PageIcon")));
this.Size = new System.Drawing.Size(610, 489);
((System.ComponentModel.ISupportInitialize)(this.imgConnectionStatus)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
internal Controls.Base.NGLabel lblSQLDatabaseName;
@@ -233,5 +258,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
private System.Windows.Forms.PictureBox imgConnectionStatus;
private System.ComponentModel.IContainer components;
private Controls.Base.NGLabel lblTestConnectionResults;
private Controls.Base.NGCheckBox chkSQLReadOnly;
internal Controls.Base.NGLabel lblSQLReadOnly;
}
}

View File

@@ -7,9 +7,9 @@ using mRemoteNG.Security.SymmetricEncryption;
namespace mRemoteNG.UI.Forms.OptionsPages
{
public partial class SqlServerPage
public partial class SqlServerPage
{
private SqlDatabaseConnectionTester _databaseConnectionTester;
private readonly SqlDatabaseConnectionTester _databaseConnectionTester;
public SqlServerPage()
{
@@ -36,6 +36,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
lblSQLDatabaseName.Text = Language.strLabelSQLServerDatabaseName;
lblSQLUsername.Text = Language.strLabelUsername;
lblSQLPassword.Text = Language.strLabelPassword;
lblSQLReadOnly.Text = Language.strLabelReadOnly;
btnTestConnection.Text = Language.TestConnection;
}
@@ -49,6 +50,8 @@ namespace mRemoteNG.UI.Forms.OptionsPages
txtSQLUsername.Text = Settings.Default.SQLUser;
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
txtSQLPassword.Text = cryptographyProvider.Decrypt(Settings.Default.SQLPass, Runtime.EncryptionKey);
chkSQLReadOnly.Checked = Settings.Default.SQLReadOnly;
lblTestConnectionResults.Text = "";
}
public override void SaveSettings()
@@ -62,6 +65,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
Settings.Default.SQLUser = txtSQLUsername.Text;
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
Settings.Default.SQLPass = cryptographyProvider.Encrypt(txtSQLPassword.Text, Runtime.EncryptionKey);
Settings.Default.SQLReadOnly = chkSQLReadOnly.Checked;
if (Settings.Default.UseSQLServer)
ReinitializeSqlUpdater();
@@ -87,15 +91,22 @@ namespace mRemoteNG.UI.Forms.OptionsPages
private void chkUseSQLServer_CheckedChanged(object sender, EventArgs e)
{
lblSQLServer.Enabled = chkUseSQLServer.Checked;
lblSQLDatabaseName.Enabled = chkUseSQLServer.Checked;
lblSQLUsername.Enabled = chkUseSQLServer.Checked;
lblSQLPassword.Enabled = chkUseSQLServer.Checked;
txtSQLServer.Enabled = chkUseSQLServer.Checked;
txtSQLDatabaseName.Enabled = chkUseSQLServer.Checked;
txtSQLUsername.Enabled = chkUseSQLServer.Checked;
txtSQLPassword.Enabled = chkUseSQLServer.Checked;
btnTestConnection.Enabled = chkUseSQLServer.Checked;
toggleSQLPageControls(chkUseSQLServer.Checked);
}
private void toggleSQLPageControls(bool useSQLServer)
{
lblSQLServer.Enabled = useSQLServer;
lblSQLDatabaseName.Enabled = useSQLServer;
lblSQLUsername.Enabled = useSQLServer;
lblSQLPassword.Enabled = useSQLServer;
lblSQLReadOnly.Enabled = useSQLServer;
txtSQLServer.Enabled = useSQLServer;
txtSQLDatabaseName.Enabled = useSQLServer;
txtSQLUsername.Enabled = useSQLServer;
txtSQLPassword.Enabled = useSQLServer;
chkSQLReadOnly.Enabled = useSQLServer;
btnTestConnection.Enabled = useSQLServer;
}
private async void btnTestConnection_Click(object sender, EventArgs e)

View File

@@ -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()

View File

@@ -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;

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
@@ -21,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;
@@ -141,12 +143,16 @@ namespace mRemoteNG.UI.Forms
SetMenuDependencies();
var settingsLoader = new SettingsLoader(this, messageCollector, _quickConnectToolStrip, _externalToolsToolStrip);
msMain.Location = Point.Empty;
var settingsLoader = new SettingsLoader(this, messageCollector, _quickConnectToolStrip, _externalToolsToolStrip, _multiSshToolStrip);
settingsLoader.LoadSettings();
var uiLoader = new DockPanelLayoutLoader(this, messageCollector);
uiLoader.LoadPanelsFromXml();
LockToolbarPositions(Settings.Default.LockToolbars);
Settings.Default.PropertyChanged += OnApplicationSettingChanged;
_themeManager.ThemeChanged += ApplyTheme;
_fpChainedWindowHandle = NativeMethods.SetClipboardViewer(Handle);
@@ -172,8 +178,29 @@ 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)
{
if (propertyChangedEventArgs.PropertyName != nameof(Settings.LockToolbars))
return;
LockToolbarPositions(Settings.Default.LockToolbars);
}
private void LockToolbarPositions(bool shouldBeLocked)
{
var toolbars = new ToolStrip[] { _quickConnectToolStrip, _multiSshToolStrip, _externalToolsToolStrip };
foreach (var toolbar in toolbars)
{
toolbar.GripStyle = shouldBeLocked
? ToolStripGripStyle.Hidden
: ToolStripGripStyle.Visible;
}
}
private void ConnectionsServiceOnConnectionsLoaded(object sender, ConnectionsLoadedEventArgs connectionsLoadedEventArgs)
{
UpdateWindowTitle();
@@ -292,7 +319,7 @@ namespace mRemoteNG.UI.Forms
}
}
Shutdown.Cleanup(_quickConnectToolStrip, _externalToolsToolStrip, this);
Shutdown.Cleanup(_quickConnectToolStrip, _externalToolsToolStrip, _multiSshToolStrip, this);
IsClosing = true;
@@ -544,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;
}

View File

@@ -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>

View File

@@ -26,6 +26,7 @@ namespace mRemoteNG.UI.Menu
private ToolStripMenuItem _mMenViewJumpToConnectionsConfig;
private ToolStripMenuItem _mMenViewJumpToErrorsInfos;
private ToolStripMenuItem _mMenViewResetLayout;
private ToolStripMenuItem _mMenViewLockToolbars;
private ToolStripSeparator _toolStripSeparator1;
private readonly PanelAdder _panelAdder;
@@ -57,6 +58,7 @@ namespace mRemoteNG.UI.Menu
_mMenViewJumpToConnectionsConfig = new ToolStripMenuItem();
_mMenViewJumpToErrorsInfos = new ToolStripMenuItem();
_mMenViewResetLayout = new ToolStripMenuItem();
_mMenViewLockToolbars = new ToolStripMenuItem();
_mMenViewSep2 = new ToolStripSeparator();
_mMenViewQuickConnectToolbar = new ToolStripMenuItem();
_mMenViewExtAppsToolbar = new ToolStripMenuItem();
@@ -79,6 +81,7 @@ namespace mRemoteNG.UI.Menu
_toolStripSeparator1,
_mMenViewJumpTo,
_mMenViewResetLayout,
_mMenViewLockToolbars,
_mMenViewSep2,
_mMenViewQuickConnectToolbar,
_mMenViewExtAppsToolbar,
@@ -190,10 +193,18 @@ namespace mRemoteNG.UI.Menu
_mMenViewResetLayout.Size = new System.Drawing.Size(228, 22);
_mMenViewResetLayout.Text = "Reset Layout";
_mMenViewResetLayout.Click += mMenViewResetLayout_Click;
//
// mMenViewSep2
//
_mMenViewSep2.Name = "mMenViewSep2";
//
// mMenViewLockToolbars
//
_mMenViewLockToolbars.Image = Resources.application_side_tree;
_mMenViewLockToolbars.Name = "mMenViewLockToolbars";
_mMenViewLockToolbars.Size = new System.Drawing.Size(228, 22);
_mMenViewLockToolbars.Text = "Lock Toolbar Positions";
_mMenViewLockToolbars.Click += mMenViewLockToolbars_Click;
//
// mMenViewSep2
//
_mMenViewSep2.Name = "mMenViewSep2";
_mMenViewSep2.Size = new System.Drawing.Size(225, 6);
//
// mMenViewQuickConnectToolbar
@@ -236,7 +247,9 @@ namespace mRemoteNG.UI.Menu
_mMenViewFullscreen.Click += mMenViewFullscreen_Click;
}
private void ApplyLanguage()
private void ApplyLanguage()
{
_mMenViewAddConnectionPanel.Text = Language.strMenuAddConnectionPanel;
_mMenViewConnectionPanels.Text = Language.strMenuConnectionPanels;
@@ -260,6 +273,7 @@ namespace mRemoteNG.UI.Menu
_mMenViewConfig.Checked = !Windows.ConfigForm.IsHidden;
_mMenViewErrorsAndInfos.Checked = !Windows.ErrorsForm.IsHidden;
_mMenViewScreenshotManager.Checked = !Windows.ScreenshotForm.IsHidden;
_mMenViewLockToolbars.Checked = Settings.Default.LockToolbars;
_mMenViewExtAppsToolbar.Checked = TsExternalTools.Visible;
_mMenViewQuickConnectToolbar.Checked = TsQuickConnect.Visible;
@@ -367,7 +381,21 @@ namespace mRemoteNG.UI.Menu
}
}
private void mMenViewAddConnectionPanel_Click(object sender, EventArgs e)
private void mMenViewLockToolbars_Click(object sender, EventArgs eventArgs)
{
if (Settings.Default.LockToolbars)
{
Settings.Default.LockToolbars = false;
_mMenViewLockToolbars.Checked = false;
}
else
{
Settings.Default.LockToolbars = true;
_mMenViewLockToolbars.Checked = true;
}
}
private void mMenViewAddConnectionPanel_Click(object sender, EventArgs e)
{
_panelAdder.AddPanel();
}

View File

@@ -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;

View File

@@ -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");

View File

@@ -674,125 +674,27 @@
<setting name="UseFilterSearch" serializeAs="String">
<value>False</value>
</setting>
<setting name="SQLReadOnly" serializeAs="String">
<value>False</value>
</setting>
<setting name="LockToolbars" serializeAs="String">
<value>False</value>
</setting>
<setting name="RdpLoadBalanceInfoUseUtf8" serializeAs="String">
<value>False</value>
</setting>
<setting name="MultiSshToolbarLocation" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="MultiSshToolbarParentDock" serializeAs="String">
<value />
</setting>
<setting name="MultiSshToolbarVisible" serializeAs="String">
<value>False</value>
</setting>
</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>

View File

@@ -234,6 +234,7 @@
<Compile Include="Connection\IHasParent.cs" />
<Compile Include="Connection\Protocol\Http\Connection.Protocol.HTTPS.CertEvent.cs" />
<Compile Include="Connection\Protocol\ProtocolFactory.cs" />
<Compile Include="Connection\Protocol\RDP\AzureLoadBalanceInfoEncoder.cs" />
<Compile Include="Connection\Protocol\VNC\VNCEnum.cs" />
<Compile Include="Connection\WebHelper.cs" />
<Compile Include="Credential\PlaceholderCredentialRecord.cs" />
@@ -310,7 +311,6 @@
<Compile Include="Security\Factories\CryptoProviderFactoryFromXml.cs" />
<Compile Include="Tools\Cmdline\StartupArgumentsInterpreter.cs" />
<Compile Include="Tools\CustomCollections\CollectionUpdatedEventArgs.cs" />
<Compile Include="Tools\DesignModeTest.cs" />
<Compile Include="Settings.cs" />
<Compile Include="Tools\Extensions.cs" />
<Compile Include="Tools\ExternalToolArgumentParser.cs" />