Merge branch 'develop' into remove_statics

# Conflicts:
#	mRemoteV1/UI/Controls/MultiSshToolStrip.cs
#	mRemoteV1/UI/Forms/frmMain.cs
#	mRemoteV1/UI/Panels/PanelAdder.cs
#	mRemoteV1/UI/Window/ConnectionTreeWindow.cs
This commit is contained in:
David Sparer
2018-10-25 10:02:32 -05:00
48 changed files with 2061 additions and 1089 deletions

View File

@@ -1,9 +1,47 @@
1.76.8 (2018-xx-xx):
1.77.0 (2018-xx-xx):
Features/Enhancements:
----------------------
#1072: Russian translation improvements
#1016: Chinese (simplified) translation improvements
#928: Add context menu items to 'Close all but this' and 'Close all tabs to the right'
1.76.11 (2018-10-18):
Fixes:
------
#1139: Feature "Reconnect to previously opened sessions" not working
#1136: Putty window not maximized
1.76.10 (2018-10-07):
Fixes:
------
#1124: Enabling themes causes an exception
1.76.9 (2018-10-07):
Fixes:
------
#1117: Duplicate panel created when "Reconnect on Startup" and "Create Empty Panel" settings enabled
#1115: Exception when changing from xml data storage to SQL
#1110: Pressing Delete button during connection rename attempts to delete the connection instead of the text
#1106: Inheritance does not work when parent has C# default type set
#1092: Invalid Cast Exceptions loading default connectioninfo
#1091: Minor themeing issues
#853: Added some additional safety checks and logging to help address RDP crashes
1.76.8 (2018-08-25):
Fixes:
------
#1088: Delete and Launch buttons are not disabled when last external tool deleted
#1087: 'Save connections after every edit' setting not honored
#1082: Connections not given GUID if Id is empty in connection xml
1.76.7 (2018-08-22):

View File

@@ -24,6 +24,8 @@ github.com/pfjason
github.com/sirLoaf
github.com/Fyers
Vladimir Semenov (github.com/sli-pro)
Stephan (github.com/st-schuler)
Aleksey Reytsman (github.com/areytsman)
Past Contributors
@@ -62,6 +64,7 @@ Stefan (github.com/polluks)
github.com/emazv72
Vladimir Semenov (github.com/sli-pro)
Marco Sousa (github.com/marcomsousa)
github.com/wwj402
Included Source Code

View File

@@ -62,11 +62,10 @@ node('windows') {
stage ('Publish to GitHub') {
withCredentials([string(credentialsId: '5443a369-dbe8-42d3-b4e8-04d0b4e9039a', variable: 'GH_AUTH_TOKEN')]) {
def zipPath = "${jobDir}\\Release\\*.zip"
def msiPath = "${jobDir}\\Release\\*.msi"
def releaseFolder = "${jobDir}\\Release"
// because batch files suck at handling newline characters, we have to convert to base64 in groovy and back to text in powershell
def base64Description = env.ReleaseDescription.bytes.encodeBase64().toString()
bat "powershell -ExecutionPolicy Bypass -File \"${jobDir}\\Tools\\publish_to_github.ps1\" -Owner \"mRemoteNG\" -Repository \"mRemoteNG\" -ReleaseTitle \"${env.ReleaseTitle}\" -TagName \"${env.TagName}\" -TargetCommitish \"${env.TargetBranch}\" -Description \"${base64Description}\" -IsDraft ${env.IsDraft} -IsPrerelease ${env.IsPreRelease} -ZipFilePath \"${zipPath}\" -MsiFilePath \"${msiPath}\" -AuthToken \"${env.GH_AUTH_TOKEN}\" -DescriptionIsBase64Encoded"
bat "powershell -ExecutionPolicy Bypass -File \"${jobDir}\\Tools\\publish_to_github.ps1\" -Owner \"mRemoteNG\" -Repository \"mRemoteNG\" -ReleaseTitle \"${env.ReleaseTitle}\" -TagName \"${env.TagName}\" -TargetCommitish \"${env.TargetBranch}\" -Description \"${base64Description}\" -IsDraft ${env.IsDraft} -IsPrerelease ${env.IsPreRelease} -ReleaseFolderPath \"${releaseFolder}\" -AuthToken \"${env.GH_AUTH_TOKEN}\" -DescriptionIsBase64Encoded"
}
}
}

View File

@@ -171,17 +171,26 @@ function Upload-GitHubReleaseAsset {
[string]
[Parameter(Mandatory=$true)]
# The OAuth2 token to use for authentication.
$AuthToken
$AuthToken,
[string]
# A short description label for the asset
$Label = ""
)
$UploadUri = $UploadUri -replace "(\{[\w,\?]*\})$"
$files = Get-Item -Path $FilePath
$labelParam = ""
if ($Label -ne "") {
$labelParam = "&label=$Label"
}
# Get-Item could produce an array of files if a wildcard is provided. (C:\*.txt)
# Upload each matching item individually
foreach ($file in $files) {
Write-Output "Uploading asset to GitHub release: '$($file.FullName)'"
$req_uploadZipAsset = Invoke-WebRequest -Uri "$($UploadUri)?name=$($file.Name)" -Method Post -Headers @{"Authorization"="token $AuthToken"} -ContentType $ContentType -InFile $file.FullName -ErrorAction Stop
$req_uploadZipAsset = Invoke-WebRequest -Uri "$($UploadUri)?name=$($file.Name)$labelParam" -Method Post -Headers @{"Authorization"="token $AuthToken"} -ContentType $ContentType -InFile $file.FullName -ErrorAction Stop
}
}

View File

@@ -43,13 +43,8 @@ param (
[string]
[Parameter(Mandatory=$true)]
# Path to the zip file to upload with the release
$ZipFilePath,
[string]
[Parameter(Mandatory=$true)]
#Path to the msi file to upload with the release
$MsiFilePath,
# Path to the folder which contains release assets to upload
$ReleaseFolderPath,
[string]
[Parameter(Mandatory=$true)]
@@ -70,7 +65,17 @@ if ($DescriptionIsBase64Encoded) {
. "$PSScriptRoot\github_functions.ps1"
$releaseFolderItems = Get-ChildItem -Path $ReleaseFolderPath
$mrngPortablePath = ($releaseFolderItems | ?{$_.Name -match "portable-[\d\.]+\.zip"}).FullName
$mrngNormalPath = ($releaseFolderItems | ?{$_.Name -match "installer-[\d\.]+\.msi"}).FullName
$mrngPortableSymbolsPath = ($releaseFolderItems | ?{$_.Name -match "mremoteng-portable-symbols-[\d\.]+\.zip"}).FullName
$mrngNormalSymbolsPath = ($releaseFolderItems | ?{$_.Name -match "mremoteng-symbols-[\d\.]+\.zip"}).FullName
$release = Publish-GitHubRelease -Owner $Owner -Repository $Repository -ReleaseTitle $ReleaseTitle -TagName $TagName -TargetCommitish $TargetCommitish -Description $Description -IsDraft ([bool]::Parse($IsDraft)) -IsPrerelease ([bool]::Parse($IsPrerelease)) -AuthToken $AuthToken
$zipUpload = Upload-GitHubReleaseAsset -UploadUri $release.upload_url -FilePath $ZipFilePath -ContentType "application/zip" -AuthToken $AuthToken
$msiUpload = Upload-GitHubReleaseAsset -UploadUri $release.upload_url -FilePath $MsiFilePath -ContentType "application/octet-stream" -AuthToken $AuthToken
$zipUpload = Upload-GitHubReleaseAsset -UploadUri $release.upload_url -FilePath $mrngPortablePath -ContentType "application/zip" -AuthToken $AuthToken -Label "Portable Edition (zip)"
$msiUpload = Upload-GitHubReleaseAsset -UploadUri $release.upload_url -FilePath $mrngNormalPath -ContentType "application/octet-stream" -AuthToken $AuthToken -Label "Normal Edition (msi)"
$portableEditionSymbols = Upload-GitHubReleaseAsset -UploadUri $release.upload_url -FilePath $mrngPortableSymbolsPath -ContentType "application/zip" -AuthToken $AuthToken -Label "Portable Edition Debug Symbols"
$normalEditionSymbols = Upload-GitHubReleaseAsset -UploadUri $release.upload_url -FilePath $mrngNormalSymbolsPath -ContentType "application/zip" -AuthToken $AuthToken -Label "Normal Edition Debug Symbols"
Write-Output (Get-GitHubRelease -Owner $Owner -Repository $Repository -ReleaseId $release.id -AuthToken $AuthToken)

View File

@@ -1,8 +1,9 @@
using mRemoteNG.Connection;
using mRemoteNG.Container;
using NUnit.Framework;
using System.Reflection;
using System.Collections;
using System.Linq;
using System.Reflection;
namespace mRemoteNGTests.Connection
{
@@ -74,6 +75,22 @@ namespace mRemoteNGTests.Connection
Assert.That(hasEverythingInheritedProperty, Is.False);
}
[Test]
public void AlwaysReturnInheritedValueIfRequested()
{
var expectedSetting = false;
var container = new ContainerInfo { AutomaticResize = expectedSetting };
var con1 = new ConnectionInfo
{
AutomaticResize = true,
Inheritance = {AutomaticResize = true}
};
container.AddChild(con1);
Assert.That(con1.AutomaticResize, Is.EqualTo(expectedSetting));
}
private bool AllInheritancePropertiesAreTrue()
{
var allPropertiesTrue = true;

View File

@@ -40,7 +40,8 @@
public TType RedirectKeys { get; set; }
public TType RedirectDiskDrives { get; set; }
public TType RedirectPrinters { get; set; }
public TType RedirectPorts { get; set; }
public TType RedirectClipboard { get; set; }
public TType RedirectPorts { get; set; }
public TType RedirectSmartCards { get; set; }
public TType RedirectSound { get; set; }
public TType SoundQuality { get; set; }

View File

@@ -151,6 +151,7 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
nameof(ConnectionInfo.RedirectKeys),
nameof(ConnectionInfo.RedirectDiskDrives),
nameof(ConnectionInfo.RedirectPrinters),
nameof(ConnectionInfo.RedirectClipboard),
nameof(ConnectionInfo.RedirectPorts),
nameof(ConnectionInfo.RedirectSmartCards),
nameof(ConnectionInfo.RedirectSound),

View File

@@ -92,7 +92,7 @@ namespace mRemoteNG.App
case SaveFormat.mRXML:
var cryptographyProvider = new CryptoProviderFactoryFromSettings().Build();
var rootNode = exportTarget.GetRootParent() as RootNodeInfo;
var connectionNodeSerializer = new XmlConnectionNodeSerializer26(
var connectionNodeSerializer = new XmlConnectionNodeSerializer27(
cryptographyProvider,
rootNode?.PasswordString.ConvertToSecureString() ?? new RootNodeInfo(RootNodeType.Connection).PasswordString.ConvertToSecureString(),
saveFilter);

View File

@@ -2,6 +2,7 @@
using System.Collections.Specialized;
using System.ComponentModel;
using mRemoteNG.Connection;
using mRemoteNG.UI.Forms;
namespace mRemoteNG.Config.Connections
{
@@ -44,6 +45,8 @@ namespace mRemoteNG.Config.Connections
{
if (!mRemoteNG.Settings.Default.SaveConnectionsAfterEveryEdit)
return;
if (FrmMain.Default.IsClosing)
return;
_connectionsService.SaveConnectionsAsync();
}

View File

@@ -32,7 +32,7 @@ namespace mRemoteNG.Config.Connections
try
{
var cryptographyProvider = new CryptoProviderFactoryFromSettings().Build();
var connectionNodeSerializer = new XmlConnectionNodeSerializer26(
var connectionNodeSerializer = new XmlConnectionNodeSerializer27(
cryptographyProvider,
connectionTreeModel.RootNodes.OfType<RootNodeInfo>().First().PasswordString.ConvertToSecureString(),
_saveFilter);

View File

@@ -234,6 +234,12 @@ namespace mRemoteNG.Config.Serializers.Csv
if (bool.TryParse(connectionCsv[headers.IndexOf("RedirectPrinters")], out value))
connectionRecord.RedirectPrinters = value;
}
if (headers.Contains("RedirectClipboard"))
{
bool value;
if (bool.TryParse(connectionCsv[headers.IndexOf("RedirectClipboard")], out value))
connectionRecord.RedirectClipboard = value;
}
if (headers.Contains("RedirectSmartCards"))
{
@@ -453,6 +459,13 @@ namespace mRemoteNG.Config.Serializers.Csv
connectionRecord.Inheritance.RedirectPrinters = value;
}
if (headers.Contains("InheritRedirectClipboard"))
{
bool value;
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRedirectClipboard")], out value))
connectionRecord.Inheritance.RedirectClipboard = value;
}
if (headers.Contains("InheritRedirectSmartCards"))
{
bool value;

View File

@@ -52,9 +52,9 @@ namespace mRemoteNG.Config.Serializers.Csv
sb.Append("Password;");
if (_saveFilter.SaveDomain)
sb.Append("Domain;");
sb.Append("Hostname;Protocol;PuttySession;Port;ConnectToConsole;UseCredSsp;RenderingEngine;ICAEncryptionStrength;RDPAuthenticationLevel;LoadBalanceInfo;Colors;Resolution;AutomaticResize;DisplayWallpaper;DisplayThemes;EnableFontSmoothing;EnableDesktopComposition;CacheBitmaps;RedirectDiskDrives;RedirectPorts;RedirectPrinters;RedirectSmartCards;RedirectSound;RedirectKeys;PreExtApp;PostExtApp;MacAddress;UserField;ExtApp;VNCCompression;VNCEncoding;VNCAuthMode;VNCProxyType;VNCProxyIP;VNCProxyPort;VNCProxyUsername;VNCProxyPassword;VNCColors;VNCSmartSizeMode;VNCViewOnly;RDGatewayUsageMethod;RDGatewayHostname;RDGatewayUseConnectionCredentials;RDGatewayUsername;RDGatewayPassword;RDGatewayDomain;");
sb.Append("Hostname;Protocol;PuttySession;Port;ConnectToConsole;UseCredSsp;RenderingEngine;ICAEncryptionStrength;RDPAuthenticationLevel;LoadBalanceInfo;Colors;Resolution;AutomaticResize;DisplayWallpaper;DisplayThemes;EnableFontSmoothing;EnableDesktopComposition;CacheBitmaps;RedirectDiskDrives;RedirectPorts;RedirectPrinters;RedirectClipboard;RedirectSmartCards;RedirectSound;RedirectKeys;PreExtApp;PostExtApp;MacAddress;UserField;ExtApp;VNCCompression;VNCEncoding;VNCAuthMode;VNCProxyType;VNCProxyIP;VNCProxyPort;VNCProxyUsername;VNCProxyPassword;VNCColors;VNCSmartSizeMode;VNCViewOnly;RDGatewayUsageMethod;RDGatewayHostname;RDGatewayUseConnectionCredentials;RDGatewayUsername;RDGatewayPassword;RDGatewayDomain;");
if (_saveFilter.SaveInheritance)
sb.Append("InheritCacheBitmaps;InheritColors;InheritDescription;InheritDisplayThemes;InheritDisplayWallpaper;InheritEnableFontSmoothing;InheritEnableDesktopComposition;InheritDomain;InheritIcon;InheritPanel;InheritPassword;InheritPort;InheritProtocol;InheritPuttySession;InheritRedirectDiskDrives;InheritRedirectKeys;InheritRedirectPorts;InheritRedirectPrinters;InheritRedirectSmartCards;InheritRedirectSound;InheritResolution;InheritAutomaticResize;InheritUseConsoleSession;InheritUseCredSsp;InheritRenderingEngine;InheritUsername;InheritICAEncryptionStrength;InheritRDPAuthenticationLevel;InheritLoadBalanceInfo;InheritPreExtApp;InheritPostExtApp;InheritMacAddress;InheritUserField;InheritExtApp;InheritVNCCompression;InheritVNCEncoding;InheritVNCAuthMode;InheritVNCProxyType;InheritVNCProxyIP;InheritVNCProxyPort;InheritVNCProxyUsername;InheritVNCProxyPassword;InheritVNCColors;InheritVNCSmartSizeMode;InheritVNCViewOnly;InheritRDGatewayUsageMethod;InheritRDGatewayHostname;InheritRDGatewayUseConnectionCredentials;InheritRDGatewayUsername;InheritRDGatewayPassword;InheritRDGatewayDomain;InheritRDPAlertIdleTimeout;InheritRDPMinutesToIdleTimeout;InheritSoundQuality");
sb.Append("InheritCacheBitmaps;InheritColors;InheritDescription;InheritDisplayThemes;InheritDisplayWallpaper;InheritEnableFontSmoothing;InheritEnableDesktopComposition;InheritDomain;InheritIcon;InheritPanel;InheritPassword;InheritPort;InheritProtocol;InheritPuttySession;InheritRedirectDiskDrives;InheritRedirectKeys;InheritRedirectPorts;InheritRedirectPrinters;InheritRedirectClipboard;InheritRedirectSmartCards;InheritRedirectSound;InheritResolution;InheritAutomaticResize;InheritUseConsoleSession;InheritUseCredSsp;InheritRenderingEngine;InheritUsername;InheritICAEncryptionStrength;InheritRDPAuthenticationLevel;InheritLoadBalanceInfo;InheritPreExtApp;InheritPostExtApp;InheritMacAddress;InheritUserField;InheritExtApp;InheritVNCCompression;InheritVNCEncoding;InheritVNCAuthMode;InheritVNCProxyType;InheritVNCProxyIP;InheritVNCProxyPort;InheritVNCProxyUsername;InheritVNCProxyPassword;InheritVNCColors;InheritVNCSmartSizeMode;InheritVNCViewOnly;InheritRDGatewayUsageMethod;InheritRDGatewayHostname;InheritRDGatewayUseConnectionCredentials;InheritRDGatewayUsername;InheritRDGatewayPassword;InheritRDGatewayDomain;InheritRDPAlertIdleTimeout;InheritRDPMinutesToIdleTimeout;InheritSoundQuality");
}
private void SerializeNodesRecursive(ConnectionInfo node, StringBuilder sb)
@@ -116,6 +116,7 @@ namespace mRemoteNG.Config.Serializers.Csv
.Append(FormatForCsv(con.RedirectDiskDrives))
.Append(FormatForCsv(con.RedirectPorts))
.Append(FormatForCsv(con.RedirectPrinters))
.Append(FormatForCsv(con.RedirectClipboard))
.Append(FormatForCsv(con.RedirectSmartCards))
.Append(FormatForCsv(con.RedirectSound))
.Append(FormatForCsv(con.RedirectKeys))
@@ -164,6 +165,7 @@ namespace mRemoteNG.Config.Serializers.Csv
.Append(FormatForCsv(con.Inheritance.RedirectKeys))
.Append(FormatForCsv(con.Inheritance.RedirectPorts))
.Append(FormatForCsv(con.Inheritance.RedirectPrinters))
.Append(FormatForCsv(con.Inheritance.RedirectClipboard))
.Append(FormatForCsv(con.Inheritance.RedirectSmartCards))
.Append(FormatForCsv(con.Inheritance.RedirectSound))
.Append(FormatForCsv(con.Inheritance.Resolution))

View File

@@ -210,7 +210,7 @@ namespace mRemoteNG.Config.Serializers.Xml
element.Add(new XAttribute("InheritRedirectDiskDrives", falseString));
element.Add(new XAttribute("InheritRedirectKeys", falseString));
element.Add(new XAttribute("InheritRedirectPorts", falseString));
element.Add(new XAttribute("InheritRedirectPrinters", falseString));
element.Add(new XAttribute("InheritRedirectPrinters", falseString));
element.Add(new XAttribute("InheritRedirectSmartCards", falseString));
element.Add(new XAttribute("InheritRedirectSound", falseString));
element.Add(new XAttribute("InheritSoundQuality", falseString));

View File

@@ -0,0 +1,256 @@
using System;
using System.Security;
using System.Xml.Linq;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Security;
namespace mRemoteNG.Config.Serializers.Xml
{
// ReSharper disable once InconsistentNaming
public class XmlConnectionNodeSerializer27 : ISerializer<ConnectionInfo,XElement>
{
private readonly ICryptographyProvider _cryptographyProvider;
private readonly SecureString _encryptionKey;
private readonly SaveFilter _saveFilter;
public XmlConnectionNodeSerializer27(ICryptographyProvider cryptographyProvider, SecureString encryptionKey, SaveFilter saveFilter)
{
if (cryptographyProvider == null)
throw new ArgumentNullException(nameof(cryptographyProvider));
if (encryptionKey == null)
throw new ArgumentNullException(nameof(encryptionKey));
if (saveFilter == null)
throw new ArgumentNullException(nameof(saveFilter));
_cryptographyProvider = cryptographyProvider;
_encryptionKey = encryptionKey;
_saveFilter = saveFilter;
}
public XElement Serialize(ConnectionInfo connectionInfo)
{
var element = new XElement(XName.Get("Node", ""));
SetElementAttributes(element, connectionInfo);
SetInheritanceAttributes(element, connectionInfo);
return element;
}
private void SetElementAttributes(XContainer element, ConnectionInfo connectionInfo)
{
var nodeAsContainer = connectionInfo as ContainerInfo;
element.Add(new XAttribute("Name", connectionInfo.Name));
element.Add(new XAttribute("Type", connectionInfo.GetTreeNodeType().ToString()));
if (nodeAsContainer != null)
element.Add(new XAttribute("Expanded", nodeAsContainer.IsExpanded.ToString().ToLowerInvariant()));
element.Add(new XAttribute("Descr", connectionInfo.Description));
element.Add(new XAttribute("Icon", connectionInfo.Icon));
element.Add(new XAttribute("Panel", connectionInfo.Panel));
element.Add(new XAttribute("Id", connectionInfo.ConstantID));
element.Add(_saveFilter.SaveUsername
? new XAttribute("Username", connectionInfo.Username)
: new XAttribute("Username", ""));
element.Add(_saveFilter.SaveDomain
? new XAttribute("Domain", connectionInfo.Domain)
: new XAttribute("Domain", ""));
if (_saveFilter.SavePassword && !connectionInfo.Inheritance.Password)
element.Add(new XAttribute("Password", _cryptographyProvider.Encrypt(connectionInfo.Password, _encryptionKey)));
else
element.Add(new XAttribute("Password", ""));
element.Add(new XAttribute("Hostname", connectionInfo.Hostname));
element.Add(new XAttribute("Protocol", connectionInfo.Protocol));
element.Add(new XAttribute("PuttySession", connectionInfo.PuttySession));
element.Add(new XAttribute("Port", connectionInfo.Port));
element.Add(new XAttribute("ConnectToConsole", connectionInfo.UseConsoleSession.ToString().ToLowerInvariant()));
element.Add(new XAttribute("UseCredSsp", connectionInfo.UseCredSsp.ToString().ToLowerInvariant()));
element.Add(new XAttribute("RenderingEngine", connectionInfo.RenderingEngine));
element.Add(new XAttribute("ICAEncryptionStrength", connectionInfo.ICAEncryptionStrength));
element.Add(new XAttribute("RDPAuthenticationLevel", connectionInfo.RDPAuthenticationLevel));
element.Add(new XAttribute("RDPMinutesToIdleTimeout", connectionInfo.RDPMinutesToIdleTimeout));
element.Add(new XAttribute("RDPAlertIdleTimeout", connectionInfo.RDPAlertIdleTimeout.ToString().ToLowerInvariant()));
element.Add(new XAttribute("LoadBalanceInfo", connectionInfo.LoadBalanceInfo));
element.Add(new XAttribute("Colors", connectionInfo.Colors));
element.Add(new XAttribute("Resolution", connectionInfo.Resolution));
element.Add(new XAttribute("AutomaticResize", connectionInfo.AutomaticResize.ToString().ToLowerInvariant()));
element.Add(new XAttribute("DisplayWallpaper", connectionInfo.DisplayWallpaper.ToString().ToLowerInvariant()));
element.Add(new XAttribute("DisplayThemes", connectionInfo.DisplayThemes.ToString().ToLowerInvariant()));
element.Add(new XAttribute("EnableFontSmoothing", connectionInfo.EnableFontSmoothing.ToString().ToLowerInvariant()));
element.Add(new XAttribute("EnableDesktopComposition", connectionInfo.EnableDesktopComposition.ToString().ToLowerInvariant()));
element.Add(new XAttribute("CacheBitmaps", connectionInfo.CacheBitmaps.ToString().ToLowerInvariant()));
element.Add(new XAttribute("RedirectDiskDrives", connectionInfo.RedirectDiskDrives.ToString().ToLowerInvariant()));
element.Add(new XAttribute("RedirectPorts", connectionInfo.RedirectPorts.ToString().ToLowerInvariant()));
element.Add(new XAttribute("RedirectPrinters", connectionInfo.RedirectPrinters.ToString().ToLowerInvariant()));
element.Add(new XAttribute("RedirectClipboard", connectionInfo.RedirectClipboard.ToString().ToLowerInvariant()));
element.Add(new XAttribute("RedirectSmartCards", connectionInfo.RedirectSmartCards.ToString().ToLowerInvariant()));
element.Add(new XAttribute("RedirectSound", connectionInfo.RedirectSound.ToString()));
element.Add(new XAttribute("SoundQuality", connectionInfo.SoundQuality.ToString()));
element.Add(new XAttribute("RedirectKeys", connectionInfo.RedirectKeys.ToString().ToLowerInvariant()));
element.Add(new XAttribute("Connected", (connectionInfo.OpenConnections.Count > 0).ToString().ToLowerInvariant()));
element.Add(new XAttribute("PreExtApp", connectionInfo.PreExtApp));
element.Add(new XAttribute("PostExtApp", connectionInfo.PostExtApp));
element.Add(new XAttribute("MacAddress", connectionInfo.MacAddress));
element.Add(new XAttribute("UserField", connectionInfo.UserField));
element.Add(new XAttribute("ExtApp", connectionInfo.ExtApp));
element.Add(new XAttribute("VNCCompression", connectionInfo.VNCCompression));
element.Add(new XAttribute("VNCEncoding", connectionInfo.VNCEncoding));
element.Add(new XAttribute("VNCAuthMode", connectionInfo.VNCAuthMode));
element.Add(new XAttribute("VNCProxyType", connectionInfo.VNCProxyType));
element.Add(new XAttribute("VNCProxyIP", connectionInfo.VNCProxyIP));
element.Add(new XAttribute("VNCProxyPort", connectionInfo.VNCProxyPort));
element.Add(_saveFilter.SaveUsername
? new XAttribute("VNCProxyUsername", connectionInfo.VNCProxyUsername)
: new XAttribute("VNCProxyUsername", ""));
element.Add(_saveFilter.SavePassword
? new XAttribute("VNCProxyPassword",
_cryptographyProvider.Encrypt(connectionInfo.VNCProxyPassword, _encryptionKey))
: new XAttribute("VNCProxyPassword", ""));
element.Add(new XAttribute("VNCColors", connectionInfo.VNCColors));
element.Add(new XAttribute("VNCSmartSizeMode", connectionInfo.VNCSmartSizeMode));
element.Add(new XAttribute("VNCViewOnly", connectionInfo.VNCViewOnly.ToString().ToLowerInvariant()));
element.Add(new XAttribute("RDGatewayUsageMethod", connectionInfo.RDGatewayUsageMethod));
element.Add(new XAttribute("RDGatewayHostname", connectionInfo.RDGatewayHostname));
element.Add(new XAttribute("RDGatewayUseConnectionCredentials", connectionInfo.RDGatewayUseConnectionCredentials));
element.Add(_saveFilter.SaveUsername
? new XAttribute("RDGatewayUsername", connectionInfo.RDGatewayUsername)
: new XAttribute("RDGatewayUsername", ""));
element.Add(_saveFilter.SavePassword
? new XAttribute("RDGatewayPassword",
_cryptographyProvider.Encrypt(connectionInfo.RDGatewayPassword, _encryptionKey))
: new XAttribute("RDGatewayPassword", ""));
element.Add(_saveFilter.SaveDomain
? new XAttribute("RDGatewayDomain", connectionInfo.RDGatewayDomain)
: new XAttribute("RDGatewayDomain", ""));
}
private void SetInheritanceAttributes(XContainer element, IInheritable connectionInfo)
{
if (_saveFilter.SaveInheritance)
{
element.Add(new XAttribute("InheritCacheBitmaps", connectionInfo.Inheritance.CacheBitmaps.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritColors", connectionInfo.Inheritance.Colors.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritDescription", connectionInfo.Inheritance.Description.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritDisplayThemes", connectionInfo.Inheritance.DisplayThemes.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritDisplayWallpaper", connectionInfo.Inheritance.DisplayWallpaper.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritEnableFontSmoothing", connectionInfo.Inheritance.EnableFontSmoothing.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritEnableDesktopComposition", connectionInfo.Inheritance.EnableDesktopComposition.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritDomain", connectionInfo.Inheritance.Domain.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritIcon", connectionInfo.Inheritance.Icon.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritPanel", connectionInfo.Inheritance.Panel.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritPassword", connectionInfo.Inheritance.Password.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritPort", connectionInfo.Inheritance.Port.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritProtocol", connectionInfo.Inheritance.Protocol.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritPuttySession", connectionInfo.Inheritance.PuttySession.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRedirectDiskDrives", connectionInfo.Inheritance.RedirectDiskDrives.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRedirectKeys", connectionInfo.Inheritance.RedirectKeys.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRedirectPorts", connectionInfo.Inheritance.RedirectPorts.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRedirectPrinters", connectionInfo.Inheritance.RedirectPrinters.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRedirectClipboard", connectionInfo.Inheritance.RedirectClipboard.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRedirectSmartCards", connectionInfo.Inheritance.RedirectSmartCards.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRedirectSound", connectionInfo.Inheritance.RedirectSound.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritSoundQuality", connectionInfo.Inheritance.SoundQuality.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritResolution", connectionInfo.Inheritance.Resolution.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritAutomaticResize", connectionInfo.Inheritance.AutomaticResize.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritUseConsoleSession", connectionInfo.Inheritance.UseConsoleSession.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritUseCredSsp", connectionInfo.Inheritance.UseCredSsp.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRenderingEngine", connectionInfo.Inheritance.RenderingEngine.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritUsername", connectionInfo.Inheritance.Username.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritICAEncryptionStrength", connectionInfo.Inheritance.ICAEncryptionStrength.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRDPAuthenticationLevel", connectionInfo.Inheritance.RDPAuthenticationLevel.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRDPMinutesToIdleTimeout", connectionInfo.Inheritance.RDPMinutesToIdleTimeout.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRDPAlertIdleTimeout", connectionInfo.Inheritance.RDPAlertIdleTimeout.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritLoadBalanceInfo", connectionInfo.Inheritance.LoadBalanceInfo.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritPreExtApp", connectionInfo.Inheritance.PreExtApp.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritPostExtApp", connectionInfo.Inheritance.PostExtApp.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritMacAddress", connectionInfo.Inheritance.MacAddress.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritUserField", connectionInfo.Inheritance.UserField.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritExtApp", connectionInfo.Inheritance.ExtApp.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritVNCCompression", connectionInfo.Inheritance.VNCCompression.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritVNCEncoding", connectionInfo.Inheritance.VNCEncoding.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritVNCAuthMode", connectionInfo.Inheritance.VNCAuthMode.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritVNCProxyType", connectionInfo.Inheritance.VNCProxyType.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritVNCProxyIP", connectionInfo.Inheritance.VNCProxyIP.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritVNCProxyPort", connectionInfo.Inheritance.VNCProxyPort.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritVNCProxyUsername", connectionInfo.Inheritance.VNCProxyUsername.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritVNCProxyPassword", connectionInfo.Inheritance.VNCProxyPassword.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritVNCColors", connectionInfo.Inheritance.VNCColors.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritVNCSmartSizeMode", connectionInfo.Inheritance.VNCSmartSizeMode.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritVNCViewOnly", connectionInfo.Inheritance.VNCViewOnly.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRDGatewayUsageMethod", connectionInfo.Inheritance.RDGatewayUsageMethod.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRDGatewayHostname", connectionInfo.Inheritance.RDGatewayHostname.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRDGatewayUseConnectionCredentials", connectionInfo.Inheritance.RDGatewayUseConnectionCredentials.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRDGatewayUsername", connectionInfo.Inheritance.RDGatewayUsername.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRDGatewayPassword", connectionInfo.Inheritance.RDGatewayPassword.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRDGatewayDomain", connectionInfo.Inheritance.RDGatewayDomain.ToString().ToLowerInvariant()));
}
else
{
var falseString = false.ToString().ToLowerInvariant();
element.Add(new XAttribute("InheritCacheBitmaps", falseString));
element.Add(new XAttribute("InheritColors", falseString));
element.Add(new XAttribute("InheritDescription", falseString));
element.Add(new XAttribute("InheritDisplayThemes", falseString));
element.Add(new XAttribute("InheritDisplayWallpaper", falseString));
element.Add(new XAttribute("InheritEnableFontSmoothing", falseString));
element.Add(new XAttribute("InheritEnableDesktopComposition", falseString));
element.Add(new XAttribute("InheritDomain", falseString));
element.Add(new XAttribute("InheritIcon", falseString));
element.Add(new XAttribute("InheritPanel", falseString));
element.Add(new XAttribute("InheritPassword", falseString));
element.Add(new XAttribute("InheritPort", falseString));
element.Add(new XAttribute("InheritProtocol", falseString));
element.Add(new XAttribute("InheritPuttySession", falseString));
element.Add(new XAttribute("InheritRedirectDiskDrives", falseString));
element.Add(new XAttribute("InheritRedirectKeys", falseString));
element.Add(new XAttribute("InheritRedirectPorts", falseString));
element.Add(new XAttribute("InheritRedirectPrinters", falseString));
element.Add(new XAttribute("InheritRedirectClipboard", falseString));
element.Add(new XAttribute("InheritRedirectSmartCards", falseString));
element.Add(new XAttribute("InheritRedirectSound", falseString));
element.Add(new XAttribute("InheritSoundQuality", falseString));
element.Add(new XAttribute("InheritResolution", falseString));
element.Add(new XAttribute("InheritAutomaticResize", falseString));
element.Add(new XAttribute("InheritUseConsoleSession", falseString));
element.Add(new XAttribute("InheritUseCredSsp", falseString));
element.Add(new XAttribute("InheritRenderingEngine", falseString));
element.Add(new XAttribute("InheritUsername", falseString));
element.Add(new XAttribute("InheritICAEncryptionStrength", falseString));
element.Add(new XAttribute("InheritRDPAuthenticationLevel", falseString));
element.Add(new XAttribute("InheritRDPMinutesToIdleTimeout", falseString));
element.Add(new XAttribute("InheritRDPAlertIdleTimeout", falseString));
element.Add(new XAttribute("InheritLoadBalanceInfo", falseString));
element.Add(new XAttribute("InheritPreExtApp", falseString));
element.Add(new XAttribute("InheritPostExtApp", falseString));
element.Add(new XAttribute("InheritMacAddress", falseString));
element.Add(new XAttribute("InheritUserField", falseString));
element.Add(new XAttribute("InheritExtApp", falseString));
element.Add(new XAttribute("InheritVNCCompression", falseString));
element.Add(new XAttribute("InheritVNCEncoding", falseString));
element.Add(new XAttribute("InheritVNCAuthMode", falseString));
element.Add(new XAttribute("InheritVNCProxyType", falseString));
element.Add(new XAttribute("InheritVNCProxyIP", falseString));
element.Add(new XAttribute("InheritVNCProxyPort", falseString));
element.Add(new XAttribute("InheritVNCProxyUsername", falseString));
element.Add(new XAttribute("InheritVNCProxyPassword", falseString));
element.Add(new XAttribute("InheritVNCColors", falseString));
element.Add(new XAttribute("InheritVNCSmartSizeMode", falseString));
element.Add(new XAttribute("InheritVNCViewOnly", falseString));
element.Add(new XAttribute("InheritRDGatewayUsageMethod", falseString));
element.Add(new XAttribute("InheritRDGatewayHostname", falseString));
element.Add(new XAttribute("InheritRDGatewayUseConnectionCredentials", falseString));
element.Add(new XAttribute("InheritRDGatewayUsername", falseString));
element.Add(new XAttribute("InheritRDGatewayPassword", falseString));
element.Add(new XAttribute("InheritRDGatewayDomain", falseString));
}
}
}
}

View File

@@ -289,14 +289,14 @@ namespace mRemoteNG.Config.Serializers.Xml
if (_confVersion >= 0.5)
{
connectionInfo.RedirectDiskDrives = bool.Parse(xmlnode.Attributes["RedirectDiskDrives"].Value);
connectionInfo.RedirectPrinters = bool.Parse(xmlnode.Attributes["RedirectPrinters"].Value);
connectionInfo.RedirectPrinters = bool.Parse(xmlnode.Attributes["RedirectPrinters"].Value);
connectionInfo.RedirectPorts = bool.Parse(xmlnode.Attributes["RedirectPorts"].Value);
connectionInfo.RedirectSmartCards = bool.Parse(xmlnode.Attributes["RedirectSmartCards"].Value);
}
else
{
connectionInfo.RedirectDiskDrives = false;
connectionInfo.RedirectPrinters = false;
connectionInfo.RedirectPrinters = false;
connectionInfo.RedirectPorts = false;
connectionInfo.RedirectSmartCards = false;
}
@@ -512,6 +512,11 @@ namespace mRemoteNG.Config.Serializers.Xml
connectionInfo.RDPAlertIdleTimeout = bool.Parse(xmlnode.Attributes["RDPAlertIdleTimeout"]?.Value ?? "False");
connectionInfo.Inheritance.RDPAlertIdleTimeout = bool.Parse(xmlnode.Attributes["InheritRDPAlertIdleTimeout"]?.Value ?? "False");
}
if(_confVersion >= 2.7)
{
connectionInfo.RedirectClipboard = bool.Parse(xmlnode.Attributes["RedirectClipboard"].Value);
connectionInfo.Inheritance.RedirectClipboard = bool.Parse(xmlnode.Attributes["InheritRedirectClipboard"].Value);
}
}
catch (Exception ex)
{

View File

@@ -109,6 +109,7 @@ namespace mRemoteNG.Config.Serializers
connectionInfo.RedirectDiskDrives = (bool)dataRow["RedirectDiskDrives"];
connectionInfo.RedirectPorts = (bool)dataRow["RedirectPorts"];
connectionInfo.RedirectPrinters = (bool)dataRow["RedirectPrinters"];
connectionInfo.RedirectClipboard = (bool)dataRow["RedirectClipboard"];
connectionInfo.RedirectSmartCards = (bool)dataRow["RedirectSmartCards"];
connectionInfo.RedirectSound = (RdpProtocol.RDPSounds)Enum.Parse(typeof(RdpProtocol.RDPSounds), (string)dataRow["RedirectSound"]);
connectionInfo.SoundQuality = (RdpProtocol.RDPSoundQuality)Enum.Parse(typeof(RdpProtocol.RDPSoundQuality), (string)dataRow["SoundQuality"]);
@@ -155,6 +156,7 @@ namespace mRemoteNG.Config.Serializers
connectionInfo.Inheritance.RedirectKeys = (bool)dataRow["InheritRedirectKeys"];
connectionInfo.Inheritance.RedirectPorts = (bool)dataRow["InheritRedirectPorts"];
connectionInfo.Inheritance.RedirectPrinters = (bool)dataRow["InheritRedirectPrinters"];
connectionInfo.Inheritance.RedirectClipboard = (bool)dataRow["InheritRedirectClipboard"];
connectionInfo.Inheritance.RedirectSmartCards = (bool)dataRow["InheritRedirectSmartCards"];
connectionInfo.Inheritance.RedirectSound = (bool)dataRow["InheritRedirectSound"];
connectionInfo.Inheritance.SoundQuality = (bool)dataRow["InheritSoundQuality"];

View File

@@ -91,6 +91,7 @@ namespace mRemoteNG.Config.Serializers
dataTable.Columns.Add("RedirectDiskDrives", typeof(bool));
dataTable.Columns.Add("RedirectPorts", typeof(bool));
dataTable.Columns.Add("RedirectPrinters", typeof(bool));
dataTable.Columns.Add("RedirectClipboard", typeof(bool));
dataTable.Columns.Add("RedirectSmartCards", typeof(bool));
dataTable.Columns.Add("RedirectSound", typeof(string));
dataTable.Columns.Add("RedirectKeys", typeof(bool));
@@ -135,6 +136,7 @@ namespace mRemoteNG.Config.Serializers
dataTable.Columns.Add("InheritRedirectKeys", typeof(bool));
dataTable.Columns.Add("InheritRedirectPorts", typeof(bool));
dataTable.Columns.Add("InheritRedirectPrinters", typeof(bool));
dataTable.Columns.Add("InheritRedirectClipboard", typeof(bool));
dataTable.Columns.Add("InheritRedirectSmartCards", typeof(bool));
dataTable.Columns.Add("InheritRedirectSound", typeof(bool));
dataTable.Columns.Add("InheritResolution", typeof(bool));
@@ -235,6 +237,7 @@ namespace mRemoteNG.Config.Serializers
dataRow["RedirectDiskDrives"] = connectionInfo.RedirectDiskDrives;
dataRow["RedirectPorts"] = connectionInfo.RedirectPorts;
dataRow["RedirectPrinters"] = connectionInfo.RedirectPrinters;
dataRow["RedirectClipboard"] = connectionInfo.RedirectClipboard;
dataRow["RedirectSmartCards"] = connectionInfo.RedirectSmartCards;
dataRow["RedirectSound"] = connectionInfo.RedirectSound;
dataRow["SoundQuality"] = connectionInfo.SoundQuality;
@@ -282,6 +285,7 @@ namespace mRemoteNG.Config.Serializers
dataRow["InheritRedirectKeys"] = connectionInfo.Inheritance.RedirectKeys;
dataRow["InheritRedirectPorts"] = connectionInfo.Inheritance.RedirectPorts;
dataRow["InheritRedirectPrinters"] = connectionInfo.Inheritance.RedirectPrinters;
dataRow["InheritRedirectClipboard"] = connectionInfo.Inheritance.RedirectClipboard;
dataRow["InheritRedirectSmartCards"] = connectionInfo.Inheritance.RedirectSmartCards;
dataRow["InheritRedirectSound"] = connectionInfo.Inheritance.RedirectSound;
dataRow["InheritSoundQuality"] = connectionInfo.Inheritance.SoundQuality;
@@ -339,6 +343,7 @@ namespace mRemoteNG.Config.Serializers
dataRow["InheritRedirectKeys"] = false;
dataRow["InheritRedirectPorts"] = false;
dataRow["InheritRedirectPrinters"] = false;
dataRow["InheritRedirectClipboard"] = false;
dataRow["InheritRedirectSmartCards"] = false;
dataRow["InheritRedirectSound"] = false;
dataRow["InheritSoundQuality"] = false;

View File

@@ -108,6 +108,9 @@ namespace mRemoteNG.Config.Serializers
case "redirectprinters":
connectionInfo.RedirectPrinters = value == "1";
break;
case "redirectclipboard":
connectionInfo.RedirectClipboard = value == "1";
break;
case "audiomode":
switch (value)
{

View File

@@ -278,6 +278,7 @@ namespace mRemoteNG.Config.Serializers
connectionInfo.RedirectPorts = bool.Parse(localResourcesNode?.SelectSingleNode("./redirectPorts")?.InnerText ?? "false");
connectionInfo.RedirectPrinters = bool.Parse(localResourcesNode?.SelectSingleNode("./redirectPrinters")?.InnerText ?? "false");
connectionInfo.RedirectSmartCards = bool.Parse(localResourcesNode?.SelectSingleNode("./redirectSmartCards")?.InnerText ?? "false");
connectionInfo.RedirectClipboard = bool.Parse(localResourcesNode?.SelectSingleNode("./redirectClipboard")?.InnerText ?? "false");
}
else
{
@@ -287,6 +288,7 @@ namespace mRemoteNG.Config.Serializers
connectionInfo.Inheritance.RedirectPorts = true;
connectionInfo.Inheritance.RedirectPrinters = true;
connectionInfo.Inheritance.RedirectSmartCards = true;
connectionInfo.Inheritance.RedirectClipboard = true;
}
var securitySettingsNode = xmlNode.SelectSingleNode("./securitySettings");

View File

@@ -57,6 +57,7 @@ namespace mRemoteNG.Connection
private bool _redirectKeys;
private bool _redirectDiskDrives;
private bool _redirectPrinters;
private bool _redirectClipboard;
private bool _redirectPorts;
private bool _redirectSmartCards;
private RdpProtocol.RDPSounds _redirectSound;
@@ -455,6 +456,16 @@ namespace mRemoteNG.Connection
set => SetField(ref _redirectPrinters, value, "RedirectPrinters");
}
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRedirectClipboard"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRedirectClipboard"),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RedirectClipboard
{
get { return GetPropertyValue("RedirectClipboard", _redirectClipboard); }
set { SetField(ref _redirectClipboard, value, "RedirectClipboard"); }
}
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRedirectPorts"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRedirectPorts"),

View File

@@ -1,8 +1,3 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using mRemoteNG.App;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Connection.Protocol.Http;
@@ -15,11 +10,16 @@ using mRemoteNG.Connection.Protocol.Telnet;
using mRemoteNG.Connection.Protocol.VNC;
using mRemoteNG.Container;
using mRemoteNG.Tree;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
namespace mRemoteNG.Connection
{
[DefaultProperty("Name")]
[DefaultProperty("Name")]
public class ConnectionInfo : AbstractConnectionRecord, IHasParent, IInheritable
{
#region Public Properties
@@ -173,8 +173,11 @@ namespace mRemoteNG.Connection
if (!ShouldThisPropertyBeInherited(propertyName))
return value;
var inheritedValue = GetInheritedPropertyValue<TPropertyType>(propertyName);
return inheritedValue.Equals(default(TPropertyType)) ? value : inheritedValue;
var couldGetInheritedValue = TryGetInheritedPropertyValue<TPropertyType>(propertyName, out var inheritedValue);
return couldGetInheritedValue
? inheritedValue
: value;
}
private bool ShouldThisPropertyBeInherited(string propertyName)
@@ -195,22 +198,23 @@ namespace mRemoteNG.Connection
return inheritPropertyValue;
}
private TPropertyType GetInheritedPropertyValue<TPropertyType>(string propertyName)
private bool TryGetInheritedPropertyValue<TPropertyType>(string propertyName, out TPropertyType inheritedValue)
{
try
{
var connectionInfoType = Parent.GetType();
var parentPropertyInfo = connectionInfoType.GetProperty(propertyName);
if (parentPropertyInfo == null)
return default(TPropertyType); // shouldn't get here...
var parentPropertyValue = (TPropertyType)parentPropertyInfo.GetValue(Parent, null);
throw new NullReferenceException($"Could not retrieve property data for property '{propertyName}' on parent node '{Parent?.Name}'");
return parentPropertyValue;
inheritedValue = (TPropertyType)parentPropertyInfo.GetValue(Parent, null);
return true;
}
catch (Exception e)
{
Runtime.MessageCollector.AddExceptionStackTrace($"Error retrieving inherited property '{propertyName}'", e);
return default(TPropertyType);
inheritedValue = default(TPropertyType);
return false;
}
}
@@ -309,9 +313,10 @@ namespace mRemoteNG.Connection
RedirectKeys = Settings.Default.ConDefaultRedirectKeys;
RedirectDiskDrives = Settings.Default.ConDefaultRedirectDiskDrives;
RedirectPrinters = Settings.Default.ConDefaultRedirectPrinters;
RedirectClipboard = Settings.Default.ConDefaultRedirectClipboard;
RedirectPorts = Settings.Default.ConDefaultRedirectPorts;
RedirectSmartCards = Settings.Default.ConDefaultRedirectSmartCards;
RedirectSound = (RdpProtocol.RDPSounds) Enum.Parse(typeof(RdpProtocol.RDPSounds), Settings.Default.ConDefaultRedirectSound);
RedirectSound = (RdpProtocol.RDPSounds) Enum.Parse(typeof(RdpProtocol.RDPSounds), Settings.Default.ConDefaultRedirectSound);
SoundQuality = (RdpProtocol.RDPSoundQuality)Enum.Parse(typeof(RdpProtocol.RDPSoundQuality), Settings.Default.ConDefaultSoundQuality);
}

View File

@@ -215,8 +215,13 @@ namespace mRemoteNG.Connection
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameRedirectPrinters"),
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionRedirectPrinters"),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool RedirectPrinters {get; set;}
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameRedirectClipboard"),
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionRedirectClipboard"),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool RedirectClipboard { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameRedirectPorts"),
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionRedirectPorts"),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool RedirectPorts {get; set;}

View File

@@ -31,9 +31,14 @@ namespace mRemoteNG.Connection
throw new SettingsPropertyNotFoundException($"No property with name '{expectedPropertyName}' found.");
var valueFromSource = propertyFromSource.GetValue(sourceInstance, null);
var value = Convert.ChangeType(valueFromSource, property.PropertyType);
if (property.PropertyType.IsEnum)
{
property.SetValue(Instance, Enum.Parse(property.PropertyType, valueFromSource.ToString()), null);
continue;
}
property.SetValue(Instance, value, null);
property.SetValue(Instance, Convert.ChangeType(valueFromSource, property.PropertyType), null);
}
catch (Exception ex)
{

View File

@@ -205,7 +205,14 @@ namespace mRemoteNG.Connection.Protocol
{
return;
}
NativeMethods.MoveWindow(PuttyHandle, -SystemInformation.FrameBorderSize.Width, -(SystemInformation.CaptionHeight + SystemInformation.FrameBorderSize.Height), InterfaceControl.Width + SystemInformation.FrameBorderSize.Width * 2, InterfaceControl.Height + SystemInformation.CaptionHeight + SystemInformation.FrameBorderSize.Height * 2, true);
var left = -(SystemInformation.FrameBorderSize.Width + SystemInformation.HorizontalResizeBorderThickness);
var top = -(SystemInformation.CaptionHeight + SystemInformation.FrameBorderSize.Height + SystemInformation.VerticalResizeBorderThickness);
var width = InterfaceControl.Width + (SystemInformation.FrameBorderSize.Width + SystemInformation.HorizontalResizeBorderThickness) * 2;
var height = InterfaceControl.Height + SystemInformation.CaptionHeight +
(SystemInformation.FrameBorderSize.Height + SystemInformation.VerticalResizeBorderThickness) * 2;
NativeMethods.MoveWindow(PuttyHandle, left, top, width, height, true);
}
catch (Exception ex)
{

View File

@@ -319,10 +319,19 @@ namespace mRemoteNG.Connection.Protocol.RDP
return;
}
var size = !Fullscreen ? Control.Size : Screen.FromControl(Control).Bounds.Size;
try
{
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, $"Resizing RDP connection to host '{_connectionInfo.Hostname}'");
var size = !Fullscreen ? Control.Size : Screen.FromControl(Control).Bounds.Size;
IMsRdpClient8 msRdpClient8 = _rdpClient;
msRdpClient8.Reconnect((uint)size.Width, (uint)size.Height);
IMsRdpClient8 msRdpClient8 = _rdpClient;
msRdpClient8.Reconnect((uint)size.Width, (uint)size.Height);
}
catch (Exception ex)
{
Runtime.MessageCollector.AddExceptionMessage(string.Format(Language.ChangeConnectionResolutionError, _connectionInfo.Hostname),
ex, MessageClass.WarningMsg, false);
}
}
private void SetRdGateway()
@@ -546,6 +555,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
_rdpClient.AdvancedSettings2.RedirectPrinters = _connectionInfo.RedirectPrinters;
_rdpClient.AdvancedSettings2.RedirectSmartCards = _connectionInfo.RedirectSmartCards;
_rdpClient.SecuredSettings2.AudioRedirectionMode = (int)_connectionInfo.RedirectSound;
_rdpClient.AdvancedSettings.DisableRdpdr = _connectionInfo.RedirectClipboard ? 0 : 1;
}
catch (Exception ex)
{
@@ -919,17 +929,25 @@ namespace mRemoteNG.Connection.Protocol.RDP
#region Reconnect Stuff
public void tmrReconnect_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
var srvReady = PortScanner.IsPortOpen(_connectionInfo.Hostname, Convert.ToString(_connectionInfo.Port));
try
{
var srvReady = PortScanner.IsPortOpen(_connectionInfo.Hostname, Convert.ToString(_connectionInfo.Port));
ReconnectGroup.ServerReady = srvReady;
ReconnectGroup.ServerReady = srvReady;
if (ReconnectGroup.ReconnectWhenReady && srvReady)
{
tmrReconnect.Enabled = false;
ReconnectGroup.DisposeReconnectGroup();
//SetProps()
_rdpClient.Connect();
}
if (ReconnectGroup.ReconnectWhenReady && srvReady)
{
tmrReconnect.Enabled = false;
ReconnectGroup.DisposeReconnectGroup();
//SetProps()
_rdpClient.Connect();
}
}
catch (Exception ex)
{
Runtime.MessageCollector.AddExceptionMessage(string.Format(Language.AutomaticReconnectError, _connectionInfo.Hostname),
ex, MessageClass.WarningMsg, false);
}
}
#endregion
}

View File

@@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
// by using the '*' as shown below:
// <Assembly: AssemblyVersion("1.0.*")>
[assembly: AssemblyVersion("1.76.7.*")]
[assembly: AssemblyVersion("1.77.0.*")]
[assembly: NeutralResourcesLanguage("en")]

View File

@@ -12,7 +12,11 @@ namespace mRemoteNG {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -563,6 +567,18 @@ namespace mRemoteNG {
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool ConDefaultRedirectClipboard {
get {
return ((bool)(this["ConDefaultRedirectClipboard"]));
}
set {
this["ConDefaultRedirectClipboard"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
@@ -983,6 +999,18 @@ namespace mRemoteNG {
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool InhDefaultRedirectClipboard {
get {
return ((bool)(this["InhDefaultRedirectClipboard"]));
}
set {
this["InhDefaultRedirectClipboard"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]

View File

@@ -137,6 +137,9 @@
<Setting Name="ConDefaultRedirectPrinters" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="ConDefaultRedirectClipboard" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="ConDefaultRedirectPorts" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
@@ -242,6 +245,9 @@
<Setting Name="InhDefaultRedirectPrinters" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="InhDefaultRedirectClipboard" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="InhDefaultRedirectSmartCards" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>

View File

@@ -60,6 +60,24 @@ namespace mRemoteNG {
}
}
/// <summary>
/// Looks up a localized string similar to An error occurred while trying to reconnect to RDP host &apos;{0}&apos;.
/// </summary>
internal static string AutomaticReconnectError {
get {
return ResourceManager.GetString("AutomaticReconnectError", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An error occurred while trying to change the connection resolution to host &apos;{0}&apos;.
/// </summary>
internal static string ChangeConnectionResolutionError {
get {
return ResourceManager.GetString("ChangeConnectionResolutionError", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Create a New Connection File.
/// </summary>
@@ -322,7 +340,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to AdvancedSecurityOptions.
/// Looks up a localized string similar to Advanced security options.
/// </summary>
internal static string strAdvancedSecurityOptions {
get {
@@ -883,7 +901,7 @@ namespace mRemoteNG {
/// <summary>
/// Looks up a localized string similar to For RDP to work properly you need to have at least Remote Desktop Connection (Terminal Services) Client 8.0 installed. You can download it here: http://support.microsoft.com/kb/925876
///If this check still fails or you are unable to use RDP, please consult the mRemoteNG Forum at {0}..
///If this check still fails or you are unable to use RDP, please consult the at {0}..
/// </summary>
internal static string strCcRDPFailed {
get {
@@ -904,7 +922,7 @@ namespace mRemoteNG {
/// <summary>
/// Looks up a localized string similar to VNC requires VncSharp.dll to be located in your mRemoteNG application folder.
///Please make sure that you have the VncSharp.dll file in your mRemoteNG application folder (usually C:\Program Files\mRemoteNG\).
///If you are still not able to pass this check or use VNC in mRemoteNG please consult the mRemoteNG Forum at {0}..
///If you are still not able to pass this check or use VNC in mRemoteNG please consult the at {0}..
/// </summary>
internal static string strCcVNCFailed {
get {
@@ -1076,7 +1094,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to Choose Path.
/// Looks up a localized string similar to Choose path.
/// </summary>
internal static string strChoosePath {
get {
@@ -1301,6 +1319,15 @@ namespace mRemoteNG {
}
}
/// <summary>
/// Looks up a localized string similar to Are you sure you want to close all connections except for &quot;{0}&quot;?.
/// </summary>
internal static string strConfirmCloseConnectionOthersInstruction {
get {
return ResourceManager.GetString("strConfirmCloseConnectionOthersInstruction", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Are you sure you want to close the panel, &quot;{0}&quot;? Any connections that it contains will also be closed..
/// </summary>
@@ -1310,6 +1337,15 @@ namespace mRemoteNG {
}
}
/// <summary>
/// Looks up a localized string similar to Are you sure you want to close all connections to the right of &quot;{0}&quot;?.
/// </summary>
internal static string strConfirmCloseConnectionRightInstruction {
get {
return ResourceManager.GetString("strConfirmCloseConnectionRightInstruction", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Are you sure you want to delete the credential record, {0}?.
/// </summary>
@@ -2661,7 +2697,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to Import from .RDP file(s).
/// Looks up a localized string similar to Import from RDP file(s).
/// </summary>
internal static string strImportRDPFiles {
get {
@@ -2958,7 +2994,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to Read Only:.
/// Looks up a localized string similar to Read only:.
/// </summary>
internal static string strLabelReadOnly {
get {
@@ -2976,7 +3012,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to seconds.
/// Looks up a localized string similar to Seconds.
/// </summary>
internal static string strLabelSeconds {
get {
@@ -2994,7 +3030,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to Server Status:.
/// Looks up a localized string similar to Server status:.
/// </summary>
internal static string strLabelServerStatus {
get {
@@ -3353,6 +3389,24 @@ namespace mRemoteNG {
}
}
/// <summary>
/// Looks up a localized string similar to Disconnect All But This.
/// </summary>
internal static string strMenuDisconnectOthers {
get {
return ResourceManager.GetString("strMenuDisconnectOthers", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Disconnect Tabs To The Right.
/// </summary>
internal static string strMenuDisconnectOthersRight {
get {
return ResourceManager.GetString("strMenuDisconnectOthersRight", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Donate.
/// </summary>
@@ -3471,7 +3525,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to Jump To.
/// Looks up a localized string similar to Jump to.
/// </summary>
internal static string strMenuJumpTo {
get {
@@ -3489,7 +3543,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to Lock Toolbar Positions.
/// Looks up a localized string similar to Lock toolbar positions.
/// </summary>
internal static string strMenuLockToolbars {
get {
@@ -3498,7 +3552,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to Multi SSH Toolbar.
/// Looks up a localized string similar to Multi SSH toolbar.
/// </summary>
internal static string strMenuMultiSshToolbar {
get {
@@ -3984,7 +4038,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to No Compression.
/// Looks up a localized string similar to No сompression.
/// </summary>
internal static string strNoCompression {
get {
@@ -4029,7 +4083,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to No Ext. App specified..
/// Looks up a localized string similar to No ext. app specified..
/// </summary>
internal static string strNoExtAppDefined {
get {
@@ -4102,7 +4156,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to Open File.
/// Looks up a localized string similar to Open file.
/// </summary>
internal static string strOpenFile {
get {
@@ -4174,7 +4228,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to Next Tab.
/// Looks up a localized string similar to Next tab.
/// </summary>
internal static string strOptionsKeyboardCommandsNextTab {
get {
@@ -4183,7 +4237,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to Previous Tab.
/// Looks up a localized string similar to Previous tab.
/// </summary>
internal static string strOptionsKeyboardCommandsPreviousTab {
get {
@@ -4192,7 +4246,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to Modify Shortcut.
/// Looks up a localized string similar to Modify shortcut.
/// </summary>
internal static string strOptionsKeyboardGroupModifyShortcut {
get {
@@ -4201,7 +4255,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to Keyboard Shortcuts.
/// Looks up a localized string similar to Keyboard shortcuts.
/// </summary>
internal static string strOptionsKeyboardLabelKeyboardShortcuts {
get {
@@ -4273,7 +4327,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to Enable Themes.
/// Looks up a localized string similar to Enable themes.
/// </summary>
internal static string strOptionsThemeEnableTheming {
get {
@@ -4282,7 +4336,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to No themes are loaded, check that the default mremoteNG themes exist in the &apos;themes&apos; folder.
/// Looks up a localized string similar to No themes are loaded, check that the default mRemoteNG themes exist in the &apos;themes&apos; folder.
/// </summary>
internal static string strOptionsThemeErrorNoThemes {
get {
@@ -4993,7 +5047,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to Authentication Mode.
/// Looks up a localized string similar to Authentication mode.
/// </summary>
internal static string strPropertyNameAuthenticationMode {
get {
@@ -5002,7 +5056,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to Automatic Resize.
/// Looks up a localized string similar to Automatic resize.
/// </summary>
internal static string strPropertyNameAutomaticResize {
get {
@@ -5272,7 +5326,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to Alert on Idle Disconnect.
/// Looks up a localized string similar to Alert on Idle disconnect.
/// </summary>
internal static string strPropertyNameRDPAlertIdleTimeout {
get {
@@ -5371,7 +5425,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to Sound Quality.
/// Looks up a localized string similar to Sound quality.
/// </summary>
internal static string strPropertyNameSoundQuality {
get {
@@ -7472,7 +7526,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to Use Default.
/// Looks up a localized string similar to Use default.
/// </summary>
internal static string strUseDefault {
get {
@@ -7679,7 +7733,7 @@ namespace mRemoteNG {
}
/// <summary>
/// Looks up a localized string similar to Test Connection.
/// Looks up a localized string similar to Test connection.
/// </summary>
internal static string TestConnection {
get {

View File

@@ -2569,4 +2569,241 @@ Wählen Sie einen Pfad für die mRemoteNG-Protokolldatei</value>
<data name="LoadBalanceInfoUseUtf8" xml:space="preserve">
<value>Verwenden Sie die UTF8-Codierung für die RDP-Eigenschaft "Load Balance Info"</value>
</data>
<data name="strConnectNoCredentials" xml:space="preserve">
<value>Ohne Anmeldedaten verbinden</value>
</data>
<data name="strExportEverything" xml:space="preserve">
<value>Alles exportieren</value>
</data>
<data name="strExportFile" xml:space="preserve">
<value>Datei exportieren</value>
</data>
<data name="strExportProperties" xml:space="preserve">
<value>Eigenschaften exportieren</value>
</data>
<data name="strExportSelectedConnection" xml:space="preserve">
<value>Die Aktuell gewählte Verbindung exportieren</value>
</data>
<data name="strExportSelectedFolder" xml:space="preserve">
<value>Den Aktuell gewählten Ordner exportieren</value>
</data>
<data name="strFilterAllImportable" xml:space="preserve">
<value>Alle wichtigen Dateien</value>
</data>
<data name="strImportFileFailedMainInstruction" xml:space="preserve">
<value>Import-Vorgang fehlgeschlagen</value>
</data>
<data name="strImportLocationContent" xml:space="preserve">
<value>Wo sollen die importierten Elemente abgelegt werden?</value>
</data>
<data name="strLoadFromSqlFailedContent" xml:space="preserve">
<value>Die Verbindungsinformationen konnten nicht vom SQL-Server geladen werden.</value>
</data>
<data name="strOptionsProxyTesting" xml:space="preserve">
<value>Testen...</value>
</data>
<data name="strOptionsTabKeyboard" xml:space="preserve">
<value>Tastatur</value>
</data>
<data name="strOptionsKeyboardLabelKeyboardShortcuts" xml:space="preserve">
<value>Tastenkombinationen</value>
</data>
<data name="strOptionsKeyboardGroupModifyShortcut" xml:space="preserve">
<value>Hotkeys ändern</value>
</data>
<data name="strOptionsKeyboardCommandsPreviousTab" xml:space="preserve">
<value>Vorheriger Tab</value>
</data>
<data name="strOptionsKeyboardCommandsNextTab" xml:space="preserve">
<value>Nächster Tab</value>
</data>
<data name="strUpdateCheckFailedLabel" xml:space="preserve">
<value>Prüfung fehlgeschlagen</value>
</data>
<data name="strUpdateCheckingLabel" xml:space="preserve">
<value>Nach Updates suchen...</value>
</data>
<data name="strPasswordStatusTooShort" xml:space="preserve">
<value>Das Passwort muss mindestens 3 Zeichen lang sein.</value>
</data>
<data name="strPasswordStatusMustMatch" xml:space="preserve">
<value>Die beide Passwörter müssen übereinstimmen.</value>
</data>
<data name="strPortScanComplete" xml:space="preserve">
<value>Port-Scan abgeschlossen.</value>
</data>
<data name="strTitlePasswordWithName" xml:space="preserve">
<value>Passwort für {0}</value>
</data>
<data name="strShowOnToolbar" xml:space="preserve">
<value>In der Symbolleiste anzeigen</value>
</data>
<data name="strTabSecurity" xml:space="preserve">
<value>Sicherheit</value>
</data>
<data name="strBack" xml:space="preserve">
<value>Zurück</value>
</data>
<data name="strDontConnectToConsoleSessionMenuItem" xml:space="preserve">
<value>Keine Verbindung zur Konsolensitzung herstellen</value>
</data>
<data name="strPuttySessionSettings" xml:space="preserve">
<value>PuTTY Sitzungseinstellungen</value>
</data>
<data name="strPropertyNameLoadBalanceInfo" xml:space="preserve">
<value>Lastausgleichsinfo</value>
</data>
<data name="strUpdateGetChangeLogFailed" xml:space="preserve">
<value>Der Changelog konnte nicht heruntergeladen werden.</value>
</data>
<data name="strRDPSoundQualityHigh" xml:space="preserve">
<value>Hoch</value>
</data>
<data name="strRDPSoundQualityMedium" xml:space="preserve">
<value>Mittel</value>
</data>
<data name="strAccept" xml:space="preserve">
<value>Akzeptieren</value>
</data>
<data name="strAdd" xml:space="preserve">
<value>Hinzufügen</value>
</data>
<data name="strCredentialEditor" xml:space="preserve">
<value>Anmeldeinformationen Editor</value>
</data>
<data name="strCredentialManager" xml:space="preserve">
<value>Anmeldeinformationen Manager</value>
</data>
<data name="strRemove" xml:space="preserve">
<value>Entfernen</value>
</data>
<data name="strTitle" xml:space="preserve">
<value>Titel</value>
</data>
<data name="strPropertyDescriptionCredential" xml:space="preserve">
<value>Wählen Sie aus, welche Anmeldeinformationen für diese Verbindung verwendet werden sollen.</value>
</data>
<data name="strLogFilePath" xml:space="preserve">
<value>Pfad der Protokolldatei</value>
</data>
<data name="strChoosePath" xml:space="preserve">
<value>Pfad auswählen</value>
</data>
<data name="strOpenFile" xml:space="preserve">
<value>Datei öffnen</value>
</data>
<data name="strUseDefault" xml:space="preserve">
<value>Standard verwenden</value>
</data>
<data name="strLogging" xml:space="preserve">
<value>Protokollierung</value>
</data>
<data name="strPopups" xml:space="preserve">
<value>Pop-ups</value>
</data>
<data name="strHttpsInsecureAllowAlways" xml:space="preserve">
<value>Immer zulassen</value>
</data>
<data name="strHttpsInsecureAllowOnce" xml:space="preserve">
<value>Einmal zulassen</value>
</data>
<data name="strHttpsInsecureDontAllow" xml:space="preserve">
<value>Nicht erlauben</value>
</data>
<data name="strHttpsInsecurePromptTitle" xml:space="preserve">
<value>Unsicheres Zertifikat zulassen?</value>
</data>
<data name="TestingConnection" xml:space="preserve">
<value>Verbindung testen</value>
</data>
<data name="IncorrectPassword" xml:space="preserve">
<value>Falsches Passwort</value>
</data>
<data name="Source" xml:space="preserve">
<value>Quelle</value>
</data>
<data name="Unlocking" xml:space="preserve">
<value>Freischalten</value>
</data>
<data name="Unlock" xml:space="preserve">
<value>Freischalten</value>
</data>
<data name="strFAMFAMFAMAttributionURL" xml:space="preserve">
<value>http://www.famfamfam.com/</value>
</data>
<data name="strExportItems" xml:space="preserve">
<value>Element exportieren</value>
</data>
<data name="strErrorCouldNotLaunchPutty" xml:space="preserve">
<value>PuTTY konnte nicht gestartet werden.</value>
</data>
<data name="strExternalToolDefaultName" xml:space="preserve">
<value>Neues externes Werkzeug</value>
</data>
<data name="strHttp" xml:space="preserve">
<value>HTTP</value>
</data>
<data name="strHttpGecko" xml:space="preserve">
<value>Gecko (Firefox)</value>
</data>
<data name="strHttpInternetExplorer" xml:space="preserve">
<value>Internet Explorer</value>
</data>
<data name="strHttps" xml:space="preserve">
<value>HTTPS</value>
</data>
<data name="strICA" xml:space="preserve">
<value>ICA</value>
</data>
<data name="strImportFileFailedContent" xml:space="preserve">
<value>Beim Importieren der Datei ist ein Fehler aufgetreten ("{0}").</value>
</data>
<data name="strOptionsKeyboardCommandsGroupTabs" xml:space="preserve">
<value>Tabs</value>
</data>
<data name="strPropertyNameAutomaticResize" xml:space="preserve">
<value>Automatische Größenänderung</value>
</data>
<data name="strWeifenLuoAttributionURL" xml:space="preserve">
<value>http://sourceforge.net/projects/dockpanelsuite/</value>
</data>
<data name="strRDPOverallConnectionTimeout" xml:space="preserve">
<value>RDP-Verbindungs-Timeout</value>
</data>
<data name="strNodeAlreadyInFolder" xml:space="preserve">
<value>Dieser Knoten befindet sich bereits in diesem Ordner.</value>
</data>
<data name="strNodeCannotDragOnSelf" xml:space="preserve">
<value>Der Knoten kann nicht auf sich selbst gezogen werden.</value>
</data>
<data name="strNodeCannotDragParentOnChild" xml:space="preserve">
<value>Der übergeordnete Knoten kann nicht auf den untergeordneten Knoten gezogen werden.</value>
</data>
<data name="strNodeNotDraggable" xml:space="preserve">
<value>Dieser Knoten ist nicht verschiebbar.</value>
</data>
<data name="strUpdatePortableDownloadComplete" xml:space="preserve">
<value>Download abgeschlossen!</value>
</data>
<data name="strDownloadPortable" xml:space="preserve">
<value>Download</value>
</data>
<data name="strID" xml:space="preserve">
<value>ID</value>
</data>
<data name="strPropertyNameSoundQuality" xml:space="preserve">
<value>Klangqualität</value>
</data>
<data name="TestConnection" xml:space="preserve">
<value>Verbindung testen</value>
</data>
<data name="ConfigurationFileNotFound" xml:space="preserve">
<value>Die Konfigurationsdatei fehlt.</value>
</data>
<data name="DatabaseNotAvailable" xml:space="preserve">
<value>Datenbank '{0}' ist nicht verfügbar.</value>
</data>
<data name="SaveConnectionsAfterEveryEdit" xml:space="preserve">
<value>Verbindungen nach jeder Bearbeitung speichern</value>
</data>
</root>

View File

@@ -59,7 +59,7 @@
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
@@ -105,17 +105,17 @@
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="strAbout" xml:space="preserve">
<value>Acerca de</value>
@@ -372,7 +372,7 @@ Versión de Control {0} de VncSharp</value>
<value>Esperar a Salir</value>
</data>
<data name="strCheckForUpdate" xml:space="preserve">
<value>Comporbar de nuevo</value>
<value>Comprobar de nuevo</value>
</data>
<data name="strCheckForUpdatesOnStartup" xml:space="preserve">
<value>Comprobar actualizaciones y novedades en el arranque</value>
@@ -444,11 +444,11 @@ Versión de Control {0} de VncSharp</value>
<value>Error al Cargar la Interfaz de Configuración de Usuario</value>
</data>
<data name="strConfirmCloseConnectionMainInstruction" xml:space="preserve">
<value>Desea cerrar la conexión:
<value>¿Desea cerrar la conexión:
"{0}"?</value>
</data>
<data name="strConfirmCloseConnectionPanelMainInstruction" xml:space="preserve">
<value>Está seguro de querer cerrar el panel, "{0}"? Cualquier conexión que contenga será también cerrada.</value>
<value>¿Está seguro de querer cerrar el panel, "{0}"? Cualquier conexión que contenga el panel también será cerrada.</value>
</data>
<data name="strConfirmDeleteExternalTool" xml:space="preserve">
<value>¿Está seguro de querer borrar la herramienta externa, "{0}"?</value>
@@ -507,7 +507,7 @@ Descripción del Error: {1}</value>
<value>Conexiones</value>
</data>
<data name="strConnectionSetDefaultPortFailed" xml:space="preserve">
<value>No se pudo definir el puerto por defecto!</value>
<value>¡No se pudo definir el puerto por defecto!</value>
</data>
<data name="strConnectionsFileBackupFailed" xml:space="preserve">
<value>¡No pudo crearse copia de seguridad del archivo de conexiones!</value>
@@ -1224,7 +1224,7 @@ Ver el articulo de soporte de Microsoft en http://support.microsoft.com/kb/81183
<value>Introduzca su dominio.</value>
</data>
<data name="strPropertyDescriptionEnableDesktopComposition" xml:space="preserve">
<value>Seleccione si emplear composición de escrotorio o no.</value>
<value>Seleccione si emplear composición de escritorio o no.</value>
</data>
<data name="strPropertyDescriptionEnableFontSmoothing" xml:space="preserve">
<value>Seleccione si emplear suavizado de fuentes o no.</value>
@@ -1295,6 +1295,9 @@ Ver el articulo de soporte de Microsoft en http://support.microsoft.com/kb/81183
<data name="strPropertyDescriptionRedirectPrinters" xml:space="preserve">
<value>Seleccione si las impresoras locales deben ser mostradas en el host remoto.</value>
</data>
<data name="strPropertyDescriptionRedirectClipboard" xml:space="preserve">
<value>Seleccione si el portapapeles debe compartirse con el host remoto.</value>
</data>
<data name="strPropertyDescriptionRedirectSmartCards" xml:space="preserve">
<value>Seleccione si las tarjetas inteligentes deben presentarse a la máquina remota.</value>
</data>
@@ -1445,6 +1448,9 @@ Ver el articulo de soporte de Microsoft en http://support.microsoft.com/kb/81183
<data name="strPropertyNameRedirectPrinters" xml:space="preserve">
<value>Impresoras</value>
</data>
<data name="strPropertyNameRedirectClipboard" xml:space="preserve">
<value>Portapapeles</value>
</data>
<data name="strPropertyNameRedirectSmartCards" xml:space="preserve">
<value>Tarjetas Inteligentes</value>
</data>
@@ -1652,7 +1658,7 @@ Mensaje:
<value>Ajustar al panel</value>
</data>
<data name="strRdpFocusFailed" xml:space="preserve">
<value>!RDP Focus fallido!</value>
<value>¡RDP Focus fallido!</value>
</data>
<data name="strRdpGatewayIsSupported" xml:space="preserve">
<value>RD Gateway soportado.</value>
@@ -1694,10 +1700,10 @@ Mensaje:
<value>¡RDP Asignación de Propiedades fallida!</value>
</data>
<data name="strRdpSetRedirectionFailed" xml:space="preserve">
<value>¡Rdp Asignación de Redirección fallida!</value>
<value>¡RDP Asignación de Redirección fallida!</value>
</data>
<data name="strRdpSetRedirectKeysFailed" xml:space="preserve">
<value>¡Rdp Asignación de Claves de Redirección fallida!</value>
<value>¡RDP Asignación de Claves de Redirección fallida!</value>
</data>
<data name="strRdpSetResolutionFailed" xml:space="preserve">
<value>¡RDP Asignación de Resolución fallida!</value>
@@ -1838,7 +1844,7 @@ Mensaje:
<value>SSH versión 2</value>
</data>
<data name="strSSHStartTransferBG" xml:space="preserve">
<value>¡Tranferencia SSH en background fallida!</value>
<value>¡Tranferencia SSH en segundo plano fallida!</value>
</data>
<data name="strSSHTranferSuccessful" xml:space="preserve">
<value>¡Transferencia Correcta!</value>

File diff suppressed because it is too large Load Diff

View File

@@ -2679,4 +2679,16 @@ mRemoteNG сейчас прекратит работу и начнет проц
<data name="strCreateEmptyPanelOnStartUp" xml:space="preserve">
<value>Создайте пустую панель при запуске mRemoteNG</value>
</data>
<data name="strMenuDisconnectOther" xml:space="preserve">
<value>Отключить остальные вкладки</value>
</data>
<data name="strMenuDisconnectOthersRight" xml:space="preserve">
<value>Отключить вкладки справа</value>
</data>
<data name="strConfirmCloseConnectionOthersInstruction" xml:space="preserve">
<value>Хотите закрыть все подключения, кроме "{0}"?</value>
</data>
<data name="strConfirmCloseConnectionRightInstruction" xml:space="preserve">
<value>Хотите закрыть все подключения справа от "{0}"?</value>
</data>
</root>

View File

@@ -57,6 +57,7 @@
<xs:attribute name="RedirectDiskDrives" type="xs:boolean" use="required" />
<xs:attribute name="RedirectPorts" type="xs:boolean" use="required" />
<xs:attribute name="RedirectPrinters" type="xs:boolean" use="required" />
<xs:attribute name="RedirectClipboard" type="xs:boolean" use="required" />
<xs:attribute name="RedirectSmartCards" type="xs:boolean" use="required" />
<xs:attribute name="RedirectSound" type="xs:string" use="required" />
<xs:attribute name="SoundQuality" type="xs:string" use="required" />
@@ -103,6 +104,7 @@
<xs:attribute name="InheritRedirectKeys" type="xs:boolean" use="optional" />
<xs:attribute name="InheritRedirectPorts" type="xs:boolean" use="optional" />
<xs:attribute name="InheritRedirectPrinters" type="xs:boolean" use="optional" />
<xs:attribute name="InheritRedirectClipboard" type="xs:boolean" use="optional" />
<xs:attribute name="InheritRedirectSmartCards" type="xs:boolean" use="optional" />
<xs:attribute name="InheritRedirectSound" type="xs:boolean" use="optional" />
<xs:attribute name="InheritSoundQuality" type="xs:boolean" use="optional" />

View File

@@ -23,10 +23,12 @@ namespace mRemoteNG.UI.Controls.Base
{
base.OnCreateControl();
_themeManager = ThemeManager.getInstance();
if (_themeManager.ThemingActive)
{
Invalidate();
}
if (!_themeManager.ThemingActive) return;
// Use the Dialog_* colors since Labels generally have the same colors as panels/dialogs/windows/etc...
BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground");
FontOverrider.FontOverride(this);
Invalidate();
}
@@ -38,8 +40,9 @@ namespace mRemoteNG.UI.Controls.Base
return;
}
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
e.Graphics.TextRenderingHint = TextRenderingHint.AntiAlias;
// let's use the defaults - this looks terrible in my testing....
//e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
//e.Graphics.TextRenderingHint = TextRenderingHint.AntiAlias;
if (Enabled)
{
TextRenderer.DrawText(e.Graphics, Text, Font, ClientRectangle, ForeColor, TextFormatFlags.Left | TextFormatFlags.VerticalCenter);

View File

@@ -223,14 +223,19 @@ namespace mRemoteNG.UI.Controls
return (RootNodeInfo)ConnectionTreeModel.RootNodes.First(item => item is RootNodeInfo);
}
public void Invoke(Action action)
{
Invoke((Delegate)action);
}
public void InvokeExpand(object model)
{
Invoke((MethodInvoker)(() => Expand(model)));
Invoke(() => Expand(model));
}
public void InvokeRebuildAll(bool preserveState)
{
Invoke((MethodInvoker)(() => RebuildAll(preserveState)));
Invoke(() => RebuildAll(preserveState));
}
public IEnumerable<RootPuttySessionsNodeInfo> GetRootPuttyNodes()

View File

@@ -1,16 +1,19 @@
using System.ComponentModel;
using System.Windows.Forms;
using mRemoteNG.Connection;
using mRemoteNG.Connection;
using mRemoteNG.Themes;
using mRemoteNG.Tools;
using System.ComponentModel;
using System.Windows.Forms;
namespace mRemoteNG.UI.Controls
{
public class MultiSshToolStrip : ToolStrip
public class MultiSshToolStrip : ToolStrip
{
private IContainer components;
private ToolStripLabel _lblMultiSsh;
private ToolStripTextBox _txtMultiSsh;
private MultiSSHController _multiSshController;
private ThemeManager _themeManager;
public MultiSshToolStrip() : this(null)
{
@@ -20,6 +23,9 @@ namespace mRemoteNG.UI.Controls
{
InitializeComponent();
_multiSshController = new MultiSSHController(_txtMultiSsh, connectionsService);
_themeManager = ThemeManager.getInstance();
_themeManager.ThemeChanged += ApplyTheme;
ApplyTheme();
}
private void InitializeComponent()
@@ -47,7 +53,14 @@ namespace mRemoteNG.UI.Controls
ResumeLayout(true);
}
protected override void Dispose(bool disposing)
private void ApplyTheme()
{
if (!_themeManager.ThemingActive) return;
_txtMultiSsh.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Background");
_txtMultiSsh.ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Foreground");
}
protected override void Dispose(bool disposing)
{
if (disposing)
{

View File

@@ -1,14 +1,3 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;
using mRemoteNG.App;
using mRemoteNG.App.Info;
@@ -34,6 +23,17 @@ using mRemoteNG.UI.Menu;
using mRemoteNG.UI.Panels;
using mRemoteNG.UI.TaskDialog;
using mRemoteNG.UI.Window;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
// ReSharper disable MemberCanBePrivate.Global
@@ -147,7 +147,7 @@ namespace mRemoteNG.UI.Forms
//Theming support
_themeManager = ThemeManager.getInstance();
vsToolStripExtender.DefaultRenderer = _toolStripProfessionalRenderer;
SetSchema();
ApplyTheme();
_screenSystemMenu = new ScreenSelectionSystemMenu(this);
}
@@ -264,7 +264,9 @@ namespace mRemoteNG.UI.Forms
var panelName = !string.IsNullOrEmpty(Settings.Default.StartUpPanelName)
? Settings.Default.StartUpPanelName
: Language.strNewPanel;
_panelAdder.AddPanel(panelName);
if (!_panelAdder.DoesPanelExist(panelName))
_panelAdder.AddPanel(panelName);
}
}
@@ -338,22 +340,37 @@ namespace mRemoteNG.UI.Forms
}
//Theming support
private void SetSchema()
{
if (!_themeManager.ThemingActive) return;
// Persist settings when rebuilding UI
pnlDock.Theme = _themeManager.ActiveTheme.Theme;
ApplyTheme();
}
private void ApplyTheme()
{
if (!_themeManager.ThemingActive) return;
vsToolStripExtender.SetStyle(msMain, _themeManager.ActiveTheme.Version, _themeManager.ActiveTheme.Theme);
vsToolStripExtender.SetStyle(_quickConnectToolStrip, _themeManager.ActiveTheme.Version, _themeManager.ActiveTheme.Theme);
vsToolStripExtender.SetStyle(_externalToolsToolStrip, _themeManager.ActiveTheme.Version, _themeManager.ActiveTheme.Theme);
vsToolStripExtender.SetStyle(_multiSshToolStrip, _themeManager.ActiveTheme.Version, _themeManager.ActiveTheme.Theme);
tsContainer.TopToolStripPanel.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("CommandBarMenuDefault_Background");
}
try
{
// this will always throw when turning themes on from
// the options menu.
pnlDock.Theme = _themeManager.ActiveTheme.Theme;
}
catch (Exception)
{
// intentionally ignore exception
}
// Persist settings when rebuilding UI
try
{
vsToolStripExtender.SetStyle(msMain, _themeManager.ActiveTheme.Version, _themeManager.ActiveTheme.Theme);
vsToolStripExtender.SetStyle(_quickConnectToolStrip, _themeManager.ActiveTheme.Version, _themeManager.ActiveTheme.Theme);
vsToolStripExtender.SetStyle(_externalToolsToolStrip, _themeManager.ActiveTheme.Version, _themeManager.ActiveTheme.Theme);
vsToolStripExtender.SetStyle(_multiSshToolStrip, _themeManager.ActiveTheme.Version, _themeManager.ActiveTheme.Theme);
tsContainer.TopToolStripPanel.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("CommandBarMenuDefault_Background");
BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground");
}
catch (Exception ex)
{
Runtime.MessageCollector.AddExceptionStackTrace("Error applying theme", ex, MessageClass.WarningMsg);
}
}
private void frmMain_Shown(object sender, EventArgs e)
{

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections;
using System.Linq;
using System.Windows.Forms;
using mRemoteNG.App;
using mRemoteNG.Messages;
@@ -44,6 +45,12 @@ namespace mRemoteNG.UI.Panels
}
}
public bool DoesPanelExist(string panelName)
{
return Runtime.WindowList?.OfType<ConnectionWindow>().Any(w => w.TabText == panelName)
?? false;
}
private void ShowConnectionWindow(ConnectionWindow connectionForm)
{
connectionForm.Show(_dockPanel, DockState.Document);

View File

@@ -25,24 +25,22 @@ namespace mRemoteNG.UI.Window
internal Controls.Base.NGLabel lblEdition;
internal Controls.Base.NGLabel lblCredits;
internal Controls.Base.NGTextBox txtCredits;
private Controls.Base.NGTextBox verText;
internal Panel pnlTop;
private void InitializeComponent()
{
this.pnlTop = new System.Windows.Forms.Panel();
this.lblEdition = new Controls.Base.NGLabel();
this.lblEdition = new mRemoteNG.UI.Controls.Base.NGLabel();
this.pbLogo = new System.Windows.Forms.PictureBox();
this.pnlBottom = new System.Windows.Forms.Panel();
this.verText = new Controls.Base.NGTextBox();
this.lblCredits = new Controls.Base.NGLabel();
this.txtCredits = new Controls.Base.NGTextBox();
this.txtChangeLog = new Controls.Base.NGTextBox();
this.lblTitle = new Controls.Base.NGLabel();
this.lblVersion = new Controls.Base.NGLabel();
this.lblChangeLog = new Controls.Base.NGLabel();
this.lblLicense = new Controls.Base.NGLabel();
this.lblCopyright = new Controls.Base.NGLabel();
this.lblCredits = new mRemoteNG.UI.Controls.Base.NGLabel();
this.txtCredits = new mRemoteNG.UI.Controls.Base.NGTextBox();
this.txtChangeLog = new mRemoteNG.UI.Controls.Base.NGTextBox();
this.lblTitle = new mRemoteNG.UI.Controls.Base.NGLabel();
this.lblVersion = new mRemoteNG.UI.Controls.Base.NGLabel();
this.lblChangeLog = new mRemoteNG.UI.Controls.Base.NGLabel();
this.lblLicense = new mRemoteNG.UI.Controls.Base.NGLabel();
this.lblCopyright = new mRemoteNG.UI.Controls.Base.NGLabel();
this.pnlTop.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbLogo)).BeginInit();
this.pnlBottom.SuspendLayout();
@@ -91,7 +89,6 @@ namespace mRemoteNG.UI.Window
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pnlBottom.BackColor = System.Drawing.SystemColors.Control;
this.pnlBottom.Controls.Add(this.verText);
this.pnlBottom.Controls.Add(this.lblCredits);
this.pnlBottom.Controls.Add(this.txtCredits);
this.pnlBottom.Controls.Add(this.txtChangeLog);
@@ -106,18 +103,6 @@ namespace mRemoteNG.UI.Window
this.pnlBottom.Size = new System.Drawing.Size(1121, 559);
this.pnlBottom.TabIndex = 1;
//
// verText
//
this.verText.BackColor = System.Drawing.SystemColors.Control;
this.verText.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.verText.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.verText.Location = new System.Drawing.Point(69, 51);
this.verText.Name = "verText";
this.verText.Size = new System.Drawing.Size(147, 20);
this.verText.TabIndex = 12;
this.verText.TabStop = false;
this.verText.Text = "w.x.y.z";
//
// lblCredits
//
this.lblCredits.AutoSize = true;
@@ -275,14 +260,16 @@ namespace mRemoteNG.UI.Window
private new void ApplyTheme()
{
if (Themes.ThemeManager.getInstance().ThemingActive)
{
base.ApplyTheme();
pnlBottom.BackColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
pnlBottom.ForeColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground");
pnlTop.BackColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
pnlTop.ForeColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground");
}
if (!Themes.ThemeManager.getInstance().ThemingActive) return;
base.ApplyTheme();
BackColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
ForeColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground");
pnlBottom.BackColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
pnlBottom.ForeColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground");
pnlTop.BackColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
pnlTop.ForeColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground");
lblEdition.BackColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
lblEdition.ForeColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground");
}
private void ApplyEditions()
@@ -329,8 +316,7 @@ namespace mRemoteNG.UI.Window
{
lblCopyright.Text = GeneralAppInfo.Copyright;
lblVersion.Text = @"Version ";
verText.Text = GeneralAppInfo.ApplicationVersion;
lblVersion.Text = $@"Version {GeneralAppInfo.ApplicationVersion}";
if (File.Exists(GeneralAppInfo.HomePath + "\\CHANGELOG.TXT"))
{

View File

@@ -399,6 +399,8 @@ namespace mRemoteNG.UI.Window
WindowType = WindowType.ComponentsCheck;
DockPnl = new DockContent();
InitializeComponent();
FontOverrider.FontOverride(this);
Themes.ThemeManager.getInstance().ThemeChanged += ApplyTheme;
}
#endregion
@@ -406,6 +408,7 @@ namespace mRemoteNG.UI.Window
private void ComponentsCheck_Load(object sender, EventArgs e)
{
ApplyLanguage();
ApplyTheme();
chkAlwaysShow.Checked = Settings.Default.StartupComponentsCheck;
CheckComponents();
}
@@ -418,6 +421,24 @@ namespace mRemoteNG.UI.Window
btnCheckAgain.Text = Language.strCcCheckAgain;
}
private new void ApplyTheme()
{
if (!Themes.ThemeManager.getInstance().ThemingActive) return;
base.ApplyTheme();
pnlCheck1.BackColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
pnlCheck1.ForeColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground");
pnlCheck2.BackColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
pnlCheck2.ForeColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground");
pnlCheck3.BackColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
pnlCheck3.ForeColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground");
pnlCheck4.BackColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
pnlCheck4.ForeColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground");
pnlCheck5.BackColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
pnlCheck5.ForeColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground");
pnlChecks.BackColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
pnlChecks.ForeColor = Themes.ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground");
}
private void btnCheckAgain_Click(object sender, EventArgs e)
{
CheckComponents();

View File

@@ -821,6 +821,7 @@ namespace mRemoteNG.UI.Window
strHide.Add("RedirectKeys");
strHide.Add("RedirectPorts");
strHide.Add("RedirectPrinters");
strHide.Add("RedirectClipboard");
strHide.Add("RedirectSmartCards");
strHide.Add("RedirectSound");
strHide.Add("RenderingEngine");
@@ -927,7 +928,8 @@ namespace mRemoteNG.UI.Window
strHide.Add("RedirectKeys");
strHide.Add("RedirectPorts");
strHide.Add("RedirectPrinters");
strHide.Add("RedirectSmartCards");
strHide.Add("RedirectClipboard");
strHide.Add("RedirectSmartCards");
strHide.Add("RedirectSound");
strHide.Add("RenderingEngine");
strHide.Add("Resolution");
@@ -972,7 +974,8 @@ namespace mRemoteNG.UI.Window
strHide.Add("RedirectKeys");
strHide.Add("RedirectPorts");
strHide.Add("RedirectPrinters");
strHide.Add("RedirectSmartCards");
strHide.Add("RedirectClipboard");
strHide.Add("RedirectSmartCards");
strHide.Add("RedirectSound");
strHide.Add("RenderingEngine");
strHide.Add("Resolution");
@@ -1016,7 +1019,8 @@ namespace mRemoteNG.UI.Window
strHide.Add("RedirectKeys");
strHide.Add("RedirectPorts");
strHide.Add("RedirectPrinters");
strHide.Add("RedirectSmartCards");
strHide.Add("RedirectClipboard");
strHide.Add("RedirectSmartCards");
strHide.Add("RedirectSound");
strHide.Add("RenderingEngine");
strHide.Add("Resolution");
@@ -1061,7 +1065,8 @@ namespace mRemoteNG.UI.Window
strHide.Add("RedirectKeys");
strHide.Add("RedirectPorts");
strHide.Add("RedirectPrinters");
strHide.Add("RedirectSmartCards");
strHide.Add("RedirectClipboard");
strHide.Add("RedirectSmartCards");
strHide.Add("RedirectSound");
strHide.Add("RenderingEngine");
strHide.Add("Resolution");
@@ -1107,7 +1112,8 @@ namespace mRemoteNG.UI.Window
strHide.Add("RedirectKeys");
strHide.Add("RedirectPorts");
strHide.Add("RedirectPrinters");
strHide.Add("RedirectSmartCards");
strHide.Add("RedirectClipboard");
strHide.Add("RedirectSmartCards");
strHide.Add("RedirectSound");
strHide.Add("RenderingEngine");
strHide.Add("Resolution");
@@ -1153,7 +1159,8 @@ namespace mRemoteNG.UI.Window
strHide.Add("RedirectKeys");
strHide.Add("RedirectPorts");
strHide.Add("RedirectPrinters");
strHide.Add("RedirectSmartCards");
strHide.Add("RedirectClipboard");
strHide.Add("RedirectSmartCards");
strHide.Add("RedirectSound");
strHide.Add("RenderingEngine");
strHide.Add("Resolution");
@@ -1176,7 +1183,7 @@ namespace mRemoteNG.UI.Window
break;
case ProtocolType.HTTP:
case ProtocolType.HTTPS:
strHide.Add("CacheBitmaps");
strHide.Add("CacheBitmaps");
strHide.Add("Colors");
strHide.Add("DisplayThemes");
strHide.Add("DisplayWallpaper");
@@ -1200,9 +1207,10 @@ namespace mRemoteNG.UI.Window
strHide.Add("RedirectKeys");
strHide.Add("RedirectPorts");
strHide.Add("RedirectPrinters");
strHide.Add("RedirectSmartCards");
strHide.Add("RedirectClipboard");
strHide.Add("RedirectSmartCards");
strHide.Add("RedirectSound");
strHide.Add("Resolution");
strHide.Add("Resolution");
strHide.Add("AutomaticResize");
strHide.Add("UseConsoleSession");
strHide.Add("UseCredSsp");
@@ -1219,6 +1227,7 @@ namespace mRemoteNG.UI.Window
strHide.Add("VNCViewOnly");
strHide.Add("SoundQuality");
break;
case ProtocolType.ICA:
strHide.Add("DisplayThemes");
strHide.Add("DisplayWallpaper");
@@ -1241,7 +1250,8 @@ namespace mRemoteNG.UI.Window
strHide.Add("RedirectKeys");
strHide.Add("RedirectPorts");
strHide.Add("RedirectPrinters");
strHide.Add("RedirectSmartCards");
strHide.Add("RedirectClipboard");
strHide.Add("RedirectSmartCards");
strHide.Add("RedirectSound");
strHide.Add("RenderingEngine");
strHide.Add("AutomaticResize");
@@ -1283,7 +1293,8 @@ namespace mRemoteNG.UI.Window
strHide.Add("RedirectKeys");
strHide.Add("RedirectPorts");
strHide.Add("RedirectPrinters");
strHide.Add("RedirectSmartCards");
strHide.Add("RedirectClipboard");
strHide.Add("RedirectSmartCards");
strHide.Add("RedirectSound");
strHide.Add("RenderingEngine");
strHide.Add("Resolution");
@@ -1341,6 +1352,8 @@ namespace mRemoteNG.UI.Window
strHide.Add("RedirectPorts");
if (conI.Inheritance.RedirectPrinters)
strHide.Add("RedirectPrinters");
if (conI.Inheritance.RedirectClipboard)
strHide.Add("RedirectClipboard");
if (conI.Inheritance.RedirectSmartCards)
strHide.Add("RedirectSmartCards");
if (conI.Inheritance.RedirectSound)

View File

@@ -1,9 +1,3 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using mRemoteNG.App;
using mRemoteNG.Config.Connections;
using mRemoteNG.Connection;
@@ -12,6 +6,12 @@ using mRemoteNG.Tools;
using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
using mRemoteNG.UI.Controls;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
// ReSharper disable ArrangeAccessorOwnerBody
@@ -164,6 +164,12 @@ namespace mRemoteNG.UI.Window
private void ConnectionsServiceOnConnectionsLoaded(object o, ConnectionsLoadedEventArgs connectionsLoadedEventArgs)
{
if (olvConnections.InvokeRequired)
{
olvConnections.Invoke(() => ConnectionsServiceOnConnectionsLoaded(o, connectionsLoadedEventArgs));
return;
}
olvConnections.ConnectionTreeModel = connectionsLoadedEventArgs.NewConnectionTreeModel;
olvConnections.SelectedObject = connectionsLoadedEventArgs.NewConnectionTreeModel.RootNodes
.OfType<RootNodeInfo>().FirstOrDefault();

View File

@@ -18,6 +18,8 @@ namespace mRemoteNG.UI.Window
private ToolStripMenuItem cmenTabRenameTab;
private ToolStripMenuItem cmenTabDuplicateTab;
private ToolStripMenuItem cmenTabDisconnect;
private ToolStripMenuItem cmenTabDisconnectOthers;
private ToolStripMenuItem cmenTabDisconnectOthersRight;
private ToolStripMenuItem cmenTabSmartSize;
private ToolStripMenuItem cmenTabSendSpecialKeysCtrlAltDel;
private ToolStripMenuItem cmenTabSendSpecialKeysCtrlEsc;
@@ -53,6 +55,8 @@ namespace mRemoteNG.UI.Window
cmenTabDuplicateTab = new ToolStripMenuItem();
cmenTabReconnect = new ToolStripMenuItem();
cmenTabDisconnect = new ToolStripMenuItem();
cmenTabDisconnectOthers = new ToolStripMenuItem();
cmenTabDisconnectOthersRight = new ToolStripMenuItem();
cmenTabPuttySettings = new ToolStripMenuItem();
cmenTab.SuspendLayout();
SuspendLayout();
@@ -91,7 +95,9 @@ namespace mRemoteNG.UI.Window
cmenTabRenameTab,
cmenTabDuplicateTab,
cmenTabReconnect,
cmenTabDisconnect
cmenTabDisconnect,
cmenTabDisconnectOthers,
cmenTabDisconnectOthersRight
});
cmenTab.Name = "cmenTab";
cmenTab.RenderMode = ToolStripRenderMode.Professional;
@@ -214,6 +220,20 @@ namespace mRemoteNG.UI.Window
cmenTabDisconnect.Size = new Size(201, 22);
cmenTabDisconnect.Text = @"Disconnect";
//
//cmenTabDisconnectOthers
//
cmenTabDisconnectOthers.Image = Resources.Pause;
cmenTabDisconnectOthers.Name = "cmenTabDisconnectOthers";
cmenTabDisconnectOthers.Size = new Size(201, 22);
cmenTabDisconnectOthers.Text = @"Disconnect Other Tabs";
//
//cmenTabDisconnectOthersRight
//
cmenTabDisconnectOthersRight.Image = Resources.Pause;
cmenTabDisconnectOthersRight.Name = "cmenTabDisconnectOthersRight";
cmenTabDisconnectOthersRight.Size = new Size(201, 22);
cmenTabDisconnectOthersRight.Text = @"Disconnect Tabs To The Right";
//
//cmenTabPuttySettings
//
cmenTabPuttySettings.Name = "cmenTabPuttySettings";

View File

@@ -100,6 +100,8 @@ namespace mRemoteNG.UI.Window
cmenTabDuplicateTab.Click += (sender, args) => DuplicateTab();
cmenTabReconnect.Click += (sender, args) => Reconnect();
cmenTabDisconnect.Click += (sender, args) => CloseTabMenu();
cmenTabDisconnectOthers.Click += (sender, args) => CloseOtherTabs();
cmenTabDisconnectOthersRight.Click += (sender, args) => CloseOtherTabsToTheRight();
cmenTabPuttySettings.Click += (sender, args) => ShowPuttySettingsDialog();
}
@@ -242,6 +244,8 @@ namespace mRemoteNG.UI.Window
cmenTabDuplicateTab.Text = Language.strMenuDuplicateTab;
cmenTabReconnect.Text = Language.strMenuReconnect;
cmenTabDisconnect.Text = Language.strMenuDisconnect;
cmenTabDisconnectOthers.Text = Language.strMenuDisconnectOthers;
cmenTabDisconnectOthersRight.Text = Language.strMenuDisconnectOthersRight;
cmenTabPuttySettings.Text = Language.strPuttySettings;
}
@@ -669,6 +673,92 @@ namespace mRemoteNG.UI.Window
}
}
private void CloseOtherTabs()
{
try
{
if (Settings.Default.ConfirmCloseConnection == (int)ConfirmCloseEnum.Multiple)
{
var result = CTaskDialog.MessageBox(this, GeneralAppInfo.ProductName, string.Format(Language.strConfirmCloseConnectionOthersInstruction, TabController.SelectedTab.Title), "", "", "", Language.strCheckboxDoNotShowThisMessageAgain, ETaskDialogButtons.YesNo, ESysIcons.Question, ESysIcons.Question);
if (CTaskDialog.VerificationChecked)
{
Settings.Default.ConfirmCloseConnection--;
}
if (result == DialogResult.No)
{
return;
}
}
foreach (TabPage tab in TabController.TabPages)
{
if (TabController.TabPages.IndexOf(tab) != TabController.TabPages.IndexOf(TabController.SelectedTab))
{
if (Settings.Default.ConfirmCloseConnection == (int)ConfirmCloseEnum.All)
{
var result = CTaskDialog.MessageBox(this, GeneralAppInfo.ProductName, string.Format(Language.strConfirmCloseConnectionMainInstruction, tab.Title), "", "", "", Language.strCheckboxDoNotShowThisMessageAgain, ETaskDialogButtons.YesNo, ESysIcons.Question, ESysIcons.Question);
if (CTaskDialog.VerificationChecked)
{
Settings.Default.ConfirmCloseConnection--;
}
if (result == DialogResult.No)
{
continue;
}
}
var interfaceControl = tab.Tag as InterfaceControl;
interfaceControl?.Protocol.Close();
}
}
}
catch (Exception ex)
{
Runtime.MessageCollector.AddExceptionMessage("CloseTabMenu (UI.Window.ConnectionWindow) failed", ex);
}
}
private void CloseOtherTabsToTheRight()
{
try
{
if (Settings.Default.ConfirmCloseConnection == (int)ConfirmCloseEnum.Multiple)
{
var result = CTaskDialog.MessageBox(this, GeneralAppInfo.ProductName, string.Format(Language.strConfirmCloseConnectionRightInstruction, TabController.SelectedTab.Title), "", "", "", Language.strCheckboxDoNotShowThisMessageAgain, ETaskDialogButtons.YesNo, ESysIcons.Question, ESysIcons.Question);
if (CTaskDialog.VerificationChecked)
{
Settings.Default.ConfirmCloseConnection--;
}
if (result == DialogResult.No)
{
return;
}
}
foreach (TabPage tab in TabController.TabPages)
{
if (TabController.TabPages.IndexOf(tab) > TabController.TabPages.IndexOf(TabController.SelectedTab))
{
if (Settings.Default.ConfirmCloseConnection == (int)ConfirmCloseEnum.All)
{
var result = CTaskDialog.MessageBox(this, GeneralAppInfo.ProductName, string.Format(Language.strConfirmCloseConnectionMainInstruction, tab.Title), "", "", "", Language.strCheckboxDoNotShowThisMessageAgain, ETaskDialogButtons.YesNo, ESysIcons.Question, ESysIcons.Question);
if (CTaskDialog.VerificationChecked)
{
Settings.Default.ConfirmCloseConnection--;
}
if (result == DialogResult.No)
{
continue;
}
}
var interfaceControl = tab.Tag as InterfaceControl;
interfaceControl?.Protocol.Close();
}
}
}
catch (Exception ex)
{
Runtime.MessageCollector.AddExceptionMessage("CloseTabMenu (UI.Window.ConnectionWindow) failed", ex);
}
}
private void DuplicateTab()
{
try

View File

@@ -170,6 +170,9 @@
<setting name="ConDefaultRedirectPrinters" serializeAs="String">
<value>False</value>
</setting>
<setting name="ConDefaultRedirectClipboard" serializeAs="String">
<value>False</value>
</setting>
<setting name="ConDefaultRedirectPorts" serializeAs="String">
<value>False</value>
</setting>
@@ -275,6 +278,9 @@
<setting name="InhDefaultRedirectPrinters" serializeAs="String">
<value>False</value>
</setting>
<setting name="InhDefaultRedirectClipboard" serializeAs="String">
<value>False</value>
</setting>
<setting name="InhDefaultRedirectSmartCards" serializeAs="String">
<value>False</value>
</setting>

View File

@@ -160,6 +160,7 @@
<Compile Include="Config\ILoader.cs" />
<Compile Include="Config\Import\MRemoteNGCsvImporter.cs" />
<Compile Include="Config\ISaver.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\Xml\XmlConnectionNodeSerializer27.cs" />
<Compile Include="Config\Serializers\CredentialProviderSerializer\CredentialRepositoryListDeserializer.cs" />
<Compile Include="Config\CredentialRepositoryListLoader.cs" />
<Compile Include="Config\Serializers\CredentialSerializer\XmlCredentialPasswordDecryptorDecorator.cs" />