diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 832aff55b..fc742cd68 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -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): diff --git a/CREDITS.TXT b/CREDITS.TXT index 2fe404fa0..f1503a64f 100644 --- a/CREDITS.TXT +++ b/CREDITS.TXT @@ -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 diff --git a/Jenkinsfile_publish.groovy b/Jenkinsfile_publish.groovy index d304d0f6f..4ced70c2d 100644 --- a/Jenkinsfile_publish.groovy +++ b/Jenkinsfile_publish.groovy @@ -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" } } } \ No newline at end of file diff --git a/Tools/github_functions.ps1 b/Tools/github_functions.ps1 index db17cb0ae..f4b3881a3 100644 --- a/Tools/github_functions.ps1 +++ b/Tools/github_functions.ps1 @@ -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 } } diff --git a/Tools/publish_to_github.ps1 b/Tools/publish_to_github.ps1 index 4f920a0d8..ca8ed0a46 100644 --- a/Tools/publish_to_github.ps1 +++ b/Tools/publish_to_github.ps1 @@ -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) \ No newline at end of file diff --git a/mRemoteNGTests/Connection/ConnectionInfoInheritanceTests.cs b/mRemoteNGTests/Connection/ConnectionInfoInheritanceTests.cs index 5778e2ac5..2b18a5dc0 100644 --- a/mRemoteNGTests/Connection/ConnectionInfoInheritanceTests.cs +++ b/mRemoteNGTests/Connection/ConnectionInfoInheritanceTests.cs @@ -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; diff --git a/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs b/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs index 5c9b5510c..de17b756a 100644 --- a/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs +++ b/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs @@ -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; } diff --git a/mRemoteNGTests/UI/Window/ConfigWindowTests/ConfigWindowGeneralTests.cs b/mRemoteNGTests/UI/Window/ConfigWindowTests/ConfigWindowGeneralTests.cs index 6f0352b3f..4d2604aef 100644 --- a/mRemoteNGTests/UI/Window/ConfigWindowTests/ConfigWindowGeneralTests.cs +++ b/mRemoteNGTests/UI/Window/ConfigWindowTests/ConfigWindowGeneralTests.cs @@ -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), diff --git a/mRemoteV1/App/Export.cs b/mRemoteV1/App/Export.cs index 5828782d9..62b8ea8cb 100644 --- a/mRemoteV1/App/Export.cs +++ b/mRemoteV1/App/Export.cs @@ -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); diff --git a/mRemoteV1/Config/Connections/SaveConnectionsOnEdit.cs b/mRemoteV1/Config/Connections/SaveConnectionsOnEdit.cs index 015b6ca6c..adfae2c6f 100644 --- a/mRemoteV1/Config/Connections/SaveConnectionsOnEdit.cs +++ b/mRemoteV1/Config/Connections/SaveConnectionsOnEdit.cs @@ -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(); } diff --git a/mRemoteV1/Config/Connections/XmlConnectionsSaver.cs b/mRemoteV1/Config/Connections/XmlConnectionsSaver.cs index 08fa5c0c0..060c2c2b8 100644 --- a/mRemoteV1/Config/Connections/XmlConnectionsSaver.cs +++ b/mRemoteV1/Config/Connections/XmlConnectionsSaver.cs @@ -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().First().PasswordString.ConvertToSecureString(), _saveFilter); diff --git a/mRemoteV1/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormat.cs b/mRemoteV1/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormat.cs index 0a76f2486..0bef17557 100644 --- a/mRemoteV1/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormat.cs +++ b/mRemoteV1/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormat.cs @@ -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; diff --git a/mRemoteV1/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs b/mRemoteV1/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs index 3563667ab..e8ecdd602 100644 --- a/mRemoteV1/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs +++ b/mRemoteV1/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs @@ -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)) diff --git a/mRemoteV1/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionNodeSerializer26.cs b/mRemoteV1/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionNodeSerializer26.cs index 8b4b8ad57..15b012d24 100644 --- a/mRemoteV1/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionNodeSerializer26.cs +++ b/mRemoteV1/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionNodeSerializer26.cs @@ -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)); diff --git a/mRemoteV1/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionNodeSerializer27.cs b/mRemoteV1/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionNodeSerializer27.cs new file mode 100644 index 000000000..29c124929 --- /dev/null +++ b/mRemoteV1/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionNodeSerializer27.cs @@ -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 + { + 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)); + } + } + } +} \ No newline at end of file diff --git a/mRemoteV1/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDeserializer.cs b/mRemoteV1/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDeserializer.cs index 8c65f6f70..20800f6cb 100644 --- a/mRemoteV1/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDeserializer.cs +++ b/mRemoteV1/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDeserializer.cs @@ -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) { diff --git a/mRemoteV1/Config/Serializers/DataTableDeserializer.cs b/mRemoteV1/Config/Serializers/DataTableDeserializer.cs index e3cecb7c1..63e077717 100644 --- a/mRemoteV1/Config/Serializers/DataTableDeserializer.cs +++ b/mRemoteV1/Config/Serializers/DataTableDeserializer.cs @@ -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"]; diff --git a/mRemoteV1/Config/Serializers/DataTableSerializer.cs b/mRemoteV1/Config/Serializers/DataTableSerializer.cs index db43749c1..05fd2ba86 100644 --- a/mRemoteV1/Config/Serializers/DataTableSerializer.cs +++ b/mRemoteV1/Config/Serializers/DataTableSerializer.cs @@ -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; diff --git a/mRemoteV1/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializer.cs b/mRemoteV1/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializer.cs index f092a746a..2453a948d 100644 --- a/mRemoteV1/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializer.cs +++ b/mRemoteV1/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializer.cs @@ -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) { diff --git a/mRemoteV1/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs b/mRemoteV1/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs index d8b77abd6..27c2b0300 100644 --- a/mRemoteV1/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs +++ b/mRemoteV1/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs @@ -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"); diff --git a/mRemoteV1/Connection/AbstractConnectionRecord.cs b/mRemoteV1/Connection/AbstractConnectionRecord.cs index 8020169a4..835bd9a6c 100644 --- a/mRemoteV1/Connection/AbstractConnectionRecord.cs +++ b/mRemoteV1/Connection/AbstractConnectionRecord.cs @@ -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"), diff --git a/mRemoteV1/Connection/ConnectionInfo.cs b/mRemoteV1/Connection/ConnectionInfo.cs index 64a0702d3..46fe5ff87 100644 --- a/mRemoteV1/Connection/ConnectionInfo.cs +++ b/mRemoteV1/Connection/ConnectionInfo.cs @@ -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(propertyName); - return inheritedValue.Equals(default(TPropertyType)) ? value : inheritedValue; + var couldGetInheritedValue = TryGetInheritedPropertyValue(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(string propertyName) + private bool TryGetInheritedPropertyValue(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); } diff --git a/mRemoteV1/Connection/ConnectionInfoInheritance.cs b/mRemoteV1/Connection/ConnectionInfoInheritance.cs index 9acca54fa..c937f72a9 100644 --- a/mRemoteV1/Connection/ConnectionInfoInheritance.cs +++ b/mRemoteV1/Connection/ConnectionInfoInheritance.cs @@ -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;} diff --git a/mRemoteV1/Connection/DefaultConnectionInfo.cs b/mRemoteV1/Connection/DefaultConnectionInfo.cs index 1efb492a8..9a4df225c 100644 --- a/mRemoteV1/Connection/DefaultConnectionInfo.cs +++ b/mRemoteV1/Connection/DefaultConnectionInfo.cs @@ -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) { diff --git a/mRemoteV1/Connection/Protocol/PuttyBase.cs b/mRemoteV1/Connection/Protocol/PuttyBase.cs index a3709f0d6..9fe0d6ca0 100644 --- a/mRemoteV1/Connection/Protocol/PuttyBase.cs +++ b/mRemoteV1/Connection/Protocol/PuttyBase.cs @@ -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) { diff --git a/mRemoteV1/Connection/Protocol/RDP/RdpProtocol.cs b/mRemoteV1/Connection/Protocol/RDP/RdpProtocol.cs index a831fcbd7..24a84e029 100644 --- a/mRemoteV1/Connection/Protocol/RDP/RdpProtocol.cs +++ b/mRemoteV1/Connection/Protocol/RDP/RdpProtocol.cs @@ -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 } diff --git a/mRemoteV1/Properties/AssemblyInfo.cs b/mRemoteV1/Properties/AssemblyInfo.cs index 27014a274..78e360d69 100644 --- a/mRemoteV1/Properties/AssemblyInfo.cs +++ b/mRemoteV1/Properties/AssemblyInfo.cs @@ -33,5 +33,5 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: // -[assembly: AssemblyVersion("1.76.7.*")] +[assembly: AssemblyVersion("1.77.0.*")] [assembly: NeutralResourcesLanguage("en")] \ No newline at end of file diff --git a/mRemoteV1/Properties/Settings.Designer.cs b/mRemoteV1/Properties/Settings.Designer.cs index 885f33ece..0f631838e 100644 --- a/mRemoteV1/Properties/Settings.Designer.cs +++ b/mRemoteV1/Properties/Settings.Designer.cs @@ -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")] diff --git a/mRemoteV1/Properties/Settings.settings b/mRemoteV1/Properties/Settings.settings index 4f2f8cc64..7ee752fe1 100644 --- a/mRemoteV1/Properties/Settings.settings +++ b/mRemoteV1/Properties/Settings.settings @@ -137,6 +137,9 @@ False + + False + False @@ -242,6 +245,9 @@ False + + False + False diff --git a/mRemoteV1/Resources/Language/Language.Designer.cs b/mRemoteV1/Resources/Language/Language.Designer.cs index d2c32ce51..37c38c881 100644 --- a/mRemoteV1/Resources/Language/Language.Designer.cs +++ b/mRemoteV1/Resources/Language/Language.Designer.cs @@ -60,6 +60,24 @@ namespace mRemoteNG { } } + /// + /// Looks up a localized string similar to An error occurred while trying to reconnect to RDP host '{0}'. + /// + internal static string AutomaticReconnectError { + get { + return ResourceManager.GetString("AutomaticReconnectError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while trying to change the connection resolution to host '{0}'. + /// + internal static string ChangeConnectionResolutionError { + get { + return ResourceManager.GetString("ChangeConnectionResolutionError", resourceCulture); + } + } + /// /// Looks up a localized string similar to Create a New Connection File. /// @@ -322,7 +340,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to AdvancedSecurityOptions. + /// Looks up a localized string similar to Advanced security options. /// internal static string strAdvancedSecurityOptions { get { @@ -883,7 +901,7 @@ namespace mRemoteNG { /// /// 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}.. /// internal static string strCcRDPFailed { get { @@ -904,7 +922,7 @@ namespace mRemoteNG { /// /// 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}.. /// internal static string strCcVNCFailed { get { @@ -1076,7 +1094,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Choose Path. + /// Looks up a localized string similar to Choose path. /// internal static string strChoosePath { get { @@ -1301,6 +1319,15 @@ namespace mRemoteNG { } } + /// + /// Looks up a localized string similar to Are you sure you want to close all connections except for "{0}"?. + /// + internal static string strConfirmCloseConnectionOthersInstruction { + get { + return ResourceManager.GetString("strConfirmCloseConnectionOthersInstruction", resourceCulture); + } + } + /// /// Looks up a localized string similar to Are you sure you want to close the panel, "{0}"? Any connections that it contains will also be closed.. /// @@ -1310,6 +1337,15 @@ namespace mRemoteNG { } } + /// + /// Looks up a localized string similar to Are you sure you want to close all connections to the right of "{0}"?. + /// + internal static string strConfirmCloseConnectionRightInstruction { + get { + return ResourceManager.GetString("strConfirmCloseConnectionRightInstruction", resourceCulture); + } + } + /// /// Looks up a localized string similar to Are you sure you want to delete the credential record, {0}?. /// @@ -2661,7 +2697,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Import from .RDP file(s). + /// Looks up a localized string similar to Import from RDP file(s). /// internal static string strImportRDPFiles { get { @@ -2958,7 +2994,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Read Only:. + /// Looks up a localized string similar to Read only:. /// internal static string strLabelReadOnly { get { @@ -2976,7 +3012,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to seconds. + /// Looks up a localized string similar to Seconds. /// internal static string strLabelSeconds { get { @@ -2994,7 +3030,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Server Status:. + /// Looks up a localized string similar to Server status:. /// internal static string strLabelServerStatus { get { @@ -3353,6 +3389,24 @@ namespace mRemoteNG { } } + /// + /// Looks up a localized string similar to Disconnect All But This. + /// + internal static string strMenuDisconnectOthers { + get { + return ResourceManager.GetString("strMenuDisconnectOthers", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Disconnect Tabs To The Right. + /// + internal static string strMenuDisconnectOthersRight { + get { + return ResourceManager.GetString("strMenuDisconnectOthersRight", resourceCulture); + } + } + /// /// Looks up a localized string similar to Donate. /// @@ -3471,7 +3525,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Jump To. + /// Looks up a localized string similar to Jump to. /// internal static string strMenuJumpTo { get { @@ -3489,7 +3543,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Lock Toolbar Positions. + /// Looks up a localized string similar to Lock toolbar positions. /// internal static string strMenuLockToolbars { get { @@ -3498,7 +3552,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Multi SSH Toolbar. + /// Looks up a localized string similar to Multi SSH toolbar. /// internal static string strMenuMultiSshToolbar { get { @@ -3984,7 +4038,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to No Compression. + /// Looks up a localized string similar to No сompression. /// internal static string strNoCompression { get { @@ -4029,7 +4083,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to No Ext. App specified.. + /// Looks up a localized string similar to No ext. app specified.. /// internal static string strNoExtAppDefined { get { @@ -4102,7 +4156,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Open File. + /// Looks up a localized string similar to Open file. /// internal static string strOpenFile { get { @@ -4174,7 +4228,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Next Tab. + /// Looks up a localized string similar to Next tab. /// internal static string strOptionsKeyboardCommandsNextTab { get { @@ -4183,7 +4237,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Previous Tab. + /// Looks up a localized string similar to Previous tab. /// internal static string strOptionsKeyboardCommandsPreviousTab { get { @@ -4192,7 +4246,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Modify Shortcut. + /// Looks up a localized string similar to Modify shortcut. /// internal static string strOptionsKeyboardGroupModifyShortcut { get { @@ -4201,7 +4255,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Keyboard Shortcuts. + /// Looks up a localized string similar to Keyboard shortcuts. /// internal static string strOptionsKeyboardLabelKeyboardShortcuts { get { @@ -4273,7 +4327,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Enable Themes. + /// Looks up a localized string similar to Enable themes. /// internal static string strOptionsThemeEnableTheming { get { @@ -4282,7 +4336,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to No themes are loaded, check that the default mremoteNG themes exist in the 'themes' folder. + /// Looks up a localized string similar to No themes are loaded, check that the default mRemoteNG themes exist in the 'themes' folder. /// internal static string strOptionsThemeErrorNoThemes { get { @@ -4993,7 +5047,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Authentication Mode. + /// Looks up a localized string similar to Authentication mode. /// internal static string strPropertyNameAuthenticationMode { get { @@ -5002,7 +5056,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Automatic Resize. + /// Looks up a localized string similar to Automatic resize. /// internal static string strPropertyNameAutomaticResize { get { @@ -5272,7 +5326,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Alert on Idle Disconnect. + /// Looks up a localized string similar to Alert on Idle disconnect. /// internal static string strPropertyNameRDPAlertIdleTimeout { get { @@ -5371,7 +5425,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Sound Quality. + /// Looks up a localized string similar to Sound quality. /// internal static string strPropertyNameSoundQuality { get { @@ -7472,7 +7526,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Use Default. + /// Looks up a localized string similar to Use default. /// internal static string strUseDefault { get { @@ -7679,7 +7733,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Test Connection. + /// Looks up a localized string similar to Test connection. /// internal static string TestConnection { get { diff --git a/mRemoteV1/Resources/Language/Language.de.resx b/mRemoteV1/Resources/Language/Language.de.resx index d98b1d657..614a06530 100644 --- a/mRemoteV1/Resources/Language/Language.de.resx +++ b/mRemoteV1/Resources/Language/Language.de.resx @@ -2569,4 +2569,241 @@ Wählen Sie einen Pfad für die mRemoteNG-Protokolldatei Verwenden Sie die UTF8-Codierung für die RDP-Eigenschaft "Load Balance Info" + + Ohne Anmeldedaten verbinden + + + Alles exportieren + + + Datei exportieren + + + Eigenschaften exportieren + + + Die Aktuell gewählte Verbindung exportieren + + + Den Aktuell gewählten Ordner exportieren + + + Alle wichtigen Dateien + + + Import-Vorgang fehlgeschlagen + + + Wo sollen die importierten Elemente abgelegt werden? + + + Die Verbindungsinformationen konnten nicht vom SQL-Server geladen werden. + + + Testen... + + + Tastatur + + + Tastenkombinationen + + + Hotkeys ändern + + + Vorheriger Tab + + + Nächster Tab + + + Prüfung fehlgeschlagen + + + Nach Updates suchen... + + + Das Passwort muss mindestens 3 Zeichen lang sein. + + + Die beide Passwörter müssen übereinstimmen. + + + Port-Scan abgeschlossen. + + + Passwort für {0} + + + In der Symbolleiste anzeigen + + + Sicherheit + + + Zurück + + + Keine Verbindung zur Konsolensitzung herstellen + + + PuTTY Sitzungseinstellungen + + + Lastausgleichsinfo + + + Der Changelog konnte nicht heruntergeladen werden. + + + Hoch + + + Mittel + + + Akzeptieren + + + Hinzufügen + + + Anmeldeinformationen Editor + + + Anmeldeinformationen Manager + + + Entfernen + + + Titel + + + Wählen Sie aus, welche Anmeldeinformationen für diese Verbindung verwendet werden sollen. + + + Pfad der Protokolldatei + + + Pfad auswählen + + + Datei öffnen + + + Standard verwenden + + + Protokollierung + + + Pop-ups + + + Immer zulassen + + + Einmal zulassen + + + Nicht erlauben + + + Unsicheres Zertifikat zulassen? + + + Verbindung testen + + + Falsches Passwort + + + Quelle + + + Freischalten + + + Freischalten + + + http://www.famfamfam.com/ + + + Element exportieren + + + PuTTY konnte nicht gestartet werden. + + + Neues externes Werkzeug + + + HTTP + + + Gecko (Firefox) + + + Internet Explorer + + + HTTPS + + + ICA + + + Beim Importieren der Datei ist ein Fehler aufgetreten ("{0}"). + + + Tabs + + + Automatische Größenänderung + + + http://sourceforge.net/projects/dockpanelsuite/ + + + RDP-Verbindungs-Timeout + + + Dieser Knoten befindet sich bereits in diesem Ordner. + + + Der Knoten kann nicht auf sich selbst gezogen werden. + + + Der übergeordnete Knoten kann nicht auf den untergeordneten Knoten gezogen werden. + + + Dieser Knoten ist nicht verschiebbar. + + + Download abgeschlossen! + + + Download + + + ID + + + Klangqualität + + + Verbindung testen + + + Die Konfigurationsdatei fehlt. + + + Datenbank '{0}' ist nicht verfügbar. + + + Verbindungen nach jeder Bearbeitung speichern + \ No newline at end of file diff --git a/mRemoteV1/Resources/Language/Language.es.resx b/mRemoteV1/Resources/Language/Language.es.resx index b265cb36c..a41667efa 100644 --- a/mRemoteV1/Resources/Language/Language.es.resx +++ b/mRemoteV1/Resources/Language/Language.es.resx @@ -59,7 +59,7 @@ : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> - + @@ -105,17 +105,17 @@ - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - text/microsoft-resx 2.0 + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Acerca de @@ -372,7 +372,7 @@ Versión de Control {0} de VncSharp Esperar a Salir - Comporbar de nuevo + Comprobar de nuevo Comprobar actualizaciones y novedades en el arranque @@ -444,11 +444,11 @@ Versión de Control {0} de VncSharp Error al Cargar la Interfaz de Configuración de Usuario - Desea cerrar la conexión: + ¿Desea cerrar la conexión: "{0}"? - Está seguro de querer cerrar el panel, "{0}"? Cualquier conexión que contenga será también cerrada. + ¿Está seguro de querer cerrar el panel, "{0}"? Cualquier conexión que contenga el panel también será cerrada. ¿Está seguro de querer borrar la herramienta externa, "{0}"? @@ -507,7 +507,7 @@ Descripción del Error: {1} Conexiones - No se pudo definir el puerto por defecto! + ¡No se pudo definir el puerto por defecto! ¡No pudo crearse copia de seguridad del archivo de conexiones! @@ -1224,7 +1224,7 @@ Ver el articulo de soporte de Microsoft en http://support.microsoft.com/kb/81183 Introduzca su dominio. - Seleccione si emplear composición de escrotorio o no. + Seleccione si emplear composición de escritorio o no. Seleccione si emplear suavizado de fuentes o no. @@ -1295,6 +1295,9 @@ Ver el articulo de soporte de Microsoft en http://support.microsoft.com/kb/81183 Seleccione si las impresoras locales deben ser mostradas en el host remoto. + + Seleccione si el portapapeles debe compartirse con el host remoto. + Seleccione si las tarjetas inteligentes deben presentarse a la máquina remota. @@ -1445,6 +1448,9 @@ Ver el articulo de soporte de Microsoft en http://support.microsoft.com/kb/81183 Impresoras + + Portapapeles + Tarjetas Inteligentes @@ -1652,7 +1658,7 @@ Mensaje: Ajustar al panel - !RDP Focus fallido! + ¡RDP Focus fallido! RD Gateway soportado. @@ -1694,10 +1700,10 @@ Mensaje: ¡RDP Asignación de Propiedades fallida! - ¡Rdp Asignación de Redirección fallida! + ¡RDP Asignación de Redirección fallida! - ¡Rdp Asignación de Claves de Redirección fallida! + ¡RDP Asignación de Claves de Redirección fallida! ¡RDP Asignación de Resolución fallida! @@ -1838,7 +1844,7 @@ Mensaje: SSH versión 2 - ¡Tranferencia SSH en background fallida! + ¡Tranferencia SSH en segundo plano fallida! ¡Transferencia Correcta! diff --git a/mRemoteV1/Resources/Language/Language.resx b/mRemoteV1/Resources/Language/Language.resx index 1c99d700f..f697fc45e 100644 --- a/mRemoteV1/Resources/Language/Language.resx +++ b/mRemoteV1/Resources/Language/Language.resx @@ -1,6 +1,6 @@  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + About - + Active - + Active Directory - + Activity - + New Connection - + New folder - + AddNodeFromXML failed! - + AddNodesFromSQL failed! - + Allow only a single instance of the application (mRemoteNG restart required) - + Always - + Always connect, even if authentication fails - + Always show panel selection dialog when opening connections - + Always show panel tabs - + Always show notification area icon - + Ask me again later - + Customize the settings now - + Use the recommended settings - + {0} can automatically check for updates that may provide new features and bug fixes. It is recommended that you allow {0} to check for updates weekly. - + Automatic update settings - + Aspect - + Automatically get session information - + Auto save time in minutes (0 means disabled): - + Minutes (0 means disabled) - + Latest version - + &Browse... - + &Cancel - + Change - + &Close - + Default Inheritance - + Default Properties - + Disconnect - + Icon - + &Import - + Inheritance - + &Launch - + Launch PuTTY - + &New - + &OK - + Properties - + &Scan - + &Stop - + Test Proxy - + You cannot import a normal connection file. Please use File - Open Connection File for normal connection files! - + Cannot start Port Scan, incorrect IP format! - + Appearance - + Connection - + Credentials - + Display - + Gateway - + General - + Miscellaneous - + Protocol - + Redirect - + Always show this screen at startup - + Refresh - + Check failed! - + Check succeeded! - + The (RDP) Sessions feature requires that you have a copy of eolwtscom.dll registered on your system. mRemoteNG ships with this component but it is not registered automatically if you do not use the mRemoteNG Installer. To register it manually, run the following command from an elevated command prompt: regsvr32 "C:\Program Files\mRemoteNG\eolwtscom.dll" (where C:\Program Files\mRemoteNG\ is the path to your mRemoteNG installation). If this check still fails or you are unable to use the (RDP) Sessions feature, please consult the at {0}. - + EOLWTSCOM was found and seems to be registered properly. - + To use the Gecko Rendering Engine you need to have XULrunner 1.8.1.x and the path to the installation set in your Options. You can download XULrunner 1.8.1.3 here: ftp://ftp.mozilla.org/pub/xulrunner/releases/1.8.1.3/contrib/win32/ When you are finished downloading extract the package to a path of your choice. Then in mRemoteNG go to Tools - Options - Advanced and enter the correct path in the XULrunner path field. If you are still not able to pass this check or use the Gecko Engine in mRemoteNG please consult the at {0}. - + GeckoFx was found and seems to be installed properly. - + ICA requires that the XenDesktop Online Plugin is installed and that the wfica.ocx library is registered. You can download the client here: http://www.citrix.com/download/ If you have the XenDesktop Online Plugin installed and the check still fails, try to register wfica.ocx manually. To do this open up the run dialog (Start - Run) and enter the following: regsvr32 "c:\Program Files\Citrix\ICA Client\wfica.ocx" (Where c:\Program Files\Citrix\ICA Client\ is the path to your XenDesktop Online Plugin installation). If you are still not able to pass this check or use ICA in mRemoteNG please consult the at {0}. - + All ICA components were found and seem to be registered properly. Citrix ICA Client Control Version {0} - + not installed properly - + The SSH, Telnet, Rlogin and RAW protocols need PuTTY to work. PuTTY comes with every mRemoteNG package and is located in the installation path. Please make sure that either you have the Putty.exe in your mRemoteNG directory (default: c:\Program Files\mRemoteNG\) or that you specified a valid path to your PuTTY executable in the Options (Tools - Options - Advanced - Custom PuTTY path) - + The PuTTY executable was found and should be ready to use. - + 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 at {0}. - + All RDP components were found and seem to be registered properly. Remote Desktop Connection Control Version {0} - + 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 at {0}. - + All VNC components were found and seem to be registered properly. VncSharp Control Version {0} - + Automatically try to reconnect when disconnected from server (RDP && ICA only) - + Domain - + Do not show this message again. - + Inheritance - + Password - + This proxy server requires authentication - + Use custom PuTTY path: - + Reconnect when ready - + Use a proxy server to connect - + Username - + Wait for exit - + Check Again - + Check for updates at startup - + Check now - + Check proper installation of components at startup - + Choose panel before connecting - + Closed Ports - + Collapse all folders - + Arguments - + Display Name - + Filename - + Hostname/IP - + Message - + Username - + Wait For Exit - + E&xit {0} - + Couldn't parse command line args! - + &Open a connection file - + &Try again - + {0} has detected the Lenovo Auto Scroll Utility running on this system. This utility is known to cause problems with {0}. It is recommended that you disable or uninstall it. - + Compatibility problem detected - + Components Check - + btnIcon_Click failed! - + ShowHideGridItems failed! - + IconMenu_Click failed! - + Property Grid object failed! - + SetHostStatus failed! - + pGrid_PopertyValueChanged failed! - + Config UI load failed! - + Do you want to close the connection: "{0}"? - + Are you sure you want to close the panel, "{0}"? Any connections that it contains will also be closed. - + Are you sure you want to delete the external tool, "{0}"? - + Are you sure you want to delete the {0} selected external tools? - + Are you sure you want to delete the connection, "{0}"? - + Are you sure you want to delete the empty folder, "{0}"? - + Are you sure you want to delete the folder, "{0}"? Any folders or connections that it contains will also be deleted. - + Do you want to close all open connections? - + Are you sure you want to reset the panels to their default layout? - + Connect - + Connect in fullscreen mode - + Connecting... - + Protocol Event Connected - + Connection to "{0}" via "{1}" established by user "{2}" (Description: "{3}"; User Field: "{4}") - + Connection failed! - + Protocol Event ErrorOccured - + Opening connection failed! - + Cannot open connection: No hostname specified! - + RDP error! Error Code: {0} Error Description: {1} - + Connections - + Couldn't set default port! - + Couldn't create backup of connections file! - + Couldn't import connections file! - + Connections file "{0}" could not be loaded! - + Connections file "{0}" could not be loaded! Starting with new connections file. - + Couldn't save connections file! - + Couldn't save connections file as "{0}"! - + Connect without credentials - + Connect to console session - + Connect (with options) - + Connection to {0} via {1} closed by user {2}. - + Connection to {0} via {1} closed by user {2}. (Description: "{3}"; User Field: "{4}") - + Connection Event Closed - + Connection Event Closed failed! - + Couldn't create new connections file! - + Could not find ToolStrip control in FilteredPropertyGrid. - + Installed version - + Default Theme - + Detect - + Don't connect to console session - + Don't connect if authentication fails - + Double click on tab closes it - + Download and Install - + Duplicate - + Do you want to continue with no password? - + For empty Username, Password or Domain fields use: - + 128-bit - + 128-bit (logon only) - + 40-bit - + 56-bit - + Basic - + Completely encrypt connection file - + End IP - + End Port - + AddExternalToolsToToolBar (frmMain) failed. {0} - + AddFolder (UI.Window.ConnectionTreeWindow) failed. {0} - + The database version {0} is not compatible with this version of {1}. - + CloneNode (Tree.Node) failed . {0} - + Error code {0}. - + The connection list could not be saved. - + PuTTY could not be launched. - + Decryption failed. {0} - + Encryption failed. {0} - + The Windows security setting, "System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing", is enabled. This setting is not compatible with {0}. See the Microsoft Support article at http://support.microsoft.com/kb/811833 for more information. {0} will now close. - + Errors - + The startup connection file could not be loaded.{0}{0}{2}{0}{3}{0}{0}In order to prevent data loss, {1} will now exit. - + VerifyDatabaseVersion (Config.Connections.Save) failed. {0} - + Expand all folders - + Experimental - + Export - + Export everything - + Export File - + Export Items - + Export mRemote/mRemoteNG XML - + Export Properties - + Export the currently selected connection - + Export the currently selected folder - + &Export to File... - + Ext. App - + New External Tool - + Includes icons by [FAMFAMFAM] - + http://www.famfamfam.com/ - + File &Format: - + All Files (*.*) - + All importable files - + Application Files (*.exe) - + mRemote CSV Files (*.csv) - + mRemote XML Files (*.xml) - + PuTTY Connection Manager files - + Remote Desktop Connection Manager files (*.rdg) - + RDP Files (*.rdp) - + visionapp Remote Desktop 2008 CSV Files (*.csv) - + Inherit {0} - + Description of inherited property: {0} - + Free - + Fullscreen - + General - + Get Connection Info From SQL failed - + An error occured while loading the connection entry for "{0}" from "{1}". {2} - + Automatic Reconnect - + Connection - + External Tool Properties - + Files - + Host - + HTTP - + HTTP Connect Failed! - + Couldn't create new HTTP Connection! - + Changing HTTP Document Tile Failed! - + Gecko (Firefox) - + Internet Explorer - + HTTPS - + Set HTTP Props failed! - + ICA - + Couldn't create new ICA Connection! - + Loading ICA Plugin failed! - + ICA SetCredentials failed! - + ICA Set Event Handlers Failed! - + ICA Set Props Failed! - + ICA Set Resolution Failed! - + Identify quick connect tabs by adding the prefix "Quick:" - + Import from Active Directory - + Import/Export - + An error occurred while importing the file "{0}". - + Import failed - + Import from &File... - + Under the root{0}{1}|Under the selected folder{0}{2} - + Where would you like the imported items to be placed? - + Import location - + &Import - + Import mRemote/mRemoteNG XML - + Import from Port Scan - + Import from RDP file(s) - + Inactive - + Informations - + mRemoteNG is up to date - + Connection failed! - + Dispose of Int App process failed! - + Int App Focus Failed! - + Int App Handle: {0} - + Killing Int App Process failed! - + Panel Handle: {0} - + Int App Resize failed! - + --- IntApp Stuff --- - + Int App Title: {0} - + CTRL-ALT-DEL - + CTRL-ESC - + Address: - + Arguments: - + Change Log: - + When closing connections: - + &Connect: - + Display Name - + Domain: - + Filename: - + Hostname: - + Options: - + Password: - + Port: - + Portable Edition - + Protocol: - + To configure PuTTY sessions click this button: - + Maximum PuTTY and integrated external tools wait time: - + Released under the GNU General Public License (GPL) - + Seconds - + Select a panel from the list below or click New to add a new one. Click OK to continue. - + Server status: - + Database: - + Database: - + Username: - + Verify: - + Language - + (Automatically Detect) - + {0} must be restarted before changes to the language will take effect. - + Load from SQL failed - + The connection information could not be loaded from the SQL server. - + Load From XML failed! - + Local file - + Local file does not exist! - + Logoff - + Writing to report file failed! - + Couldn't save report to final location. - + Uses the Magic library by [Crownwood Software] - + http://www.dotnetmagic.com/ - + About - + Add Connection Panel - + Check for Updates - + Config - + Connect - + Connection Panels - + Connections - + Connections and Config - + Copy - + Ctrl-Alt-Del - + Ctrl-Esc - + Delete... - + Delete Connection... - + Delete External Tool... - + Delete Folder... - + Disconnect - + Donate - + Duplicate - + Duplicate Connection - + Duplicate Folder - + Duplicate Tab - + Exit - + External Tools - + External Tools Toolbar - + &File - + Full Screen - + Full Screen (RDP) - + &Help - + mRemoteNG Help - + Jump to - + Launch External Tool - + New Connection File - + New External Tool - + Notifications - + Copy All - + Delete - + Delete All - + Open Connection File... - + Options - + Paste - + Port Scan - + Quick Connect Toolbar - + Reconnect - + Refresh Screen (VNC) - + Rename - + Rename Connection - + Rename Folder - + Rename Tab - + Report a Bug - + Reset layout - + Save Connection File - + Save Connection File As... - + Screenshot - + Screenshot Manager - + Send Special Keys (VNC) - + Retrieve - + Sessions - + Sessions and Screenshots - + &Show Help Text - + Show Text - + SmartSize (RDP/VNC) - + SSH File Transfer - + Start Chat (VNC) - + Support Forum - + &Tools - + Transfer File (SSH) - + &View - + View Only (VNC) - + Website - + Minimize to notification area - + Move down - + Move up - + mRemoteNG CSV - + mRemoteNG XML - + My current credentials (Windows logon information) - + Never - + New Connection - + New Folder - + New Panel - + New Root - + New Title - + No - + No сompression - + No ext. app specified. - + None - + None - + Normal - + No SmartSize - + No update available - + You are trying to load a connection file that was created using an very early version of mRemote, this could result in an runtime error. If you run into such an error, please create a new connection file! - + Open new tab to the right of the currently selected tab - + Open Ports - + &Delete - + &New - + &Reset to Default - + Reset &All to Default - + Tabs - + Next tab - + Previous tab - + Modify shortcut - + Keyboard shortcuts - + Testing... - + Keyboard - + Theme - + &Delete - + &New - + Panel Name - + Password protect - + Both passwords must match. - + The password must be at least 3 characters long. - + Please fill all fields - + Port scan complete. - + Couldn't load PortScan panel! - + (These properties will only be saved if you select mRemote/mRemoteNG XML as output file format!) - + Enter the hostname or ip you want to connect to. - + Toggle all inheritance options. - + Select which authentication level this connection should use. - + Select how you want to authenticate against the VNC server. - + Select whether to automatically resize the connection when the window is resized or when fullscreen mode is toggled. Requires RDC 8.0 or higher. - + Select whether to use bitmap caching or not. - + Select the colour quality to be used. - + Select the compression value to be used. - + Put your notes or a description for the host here. - + Select yes if the theme of the remote host should be displayed. - + Select yes if the wallpaper of the remote host should be displayed. - + Enter your domain. - + Select whether to use desktop composition or not. - + Select whether to use font smoothing or not. - + Select the encoding mode to be used. - + Select the encryption strength of the remote host. - + Select the external tool to be started. - + Select a external tool to be started after the disconnection to the remote host. - + Select a external tool to be started before the connection to the remote host is established. - + Choose a icon that will be displayed when connected to the host. - + Specifies the load balancing information for use by load balancing routers to choose the best server. - + Enter the MAC address of the remote host if you wish to use it in an external tool. - + This is the name that will be displayed in the connections tree. - + Sets the panel in which the connection will open. - + Enter your password. - + Enter the port the selected protocol is listening on. - + Choose the protocol mRemoteNG should use to connect to the host. - + Select a PuTTY session to be used when connecting. - + Specifies the domain name that a user provides to connect to the RD Gateway server. - + Specifies the host name of the Remote Desktop Gateway server. - + Specifies when to use a Remote Desktop Gateway (RD Gateway) server. - + Specifies whether or not to log on to the gateway using the same username and password as the connection. - + Specifies the user name that a user provides to connect to the RD Gateway server. - + Select whether local disk drives should be shown on the remote host. - + Select whether key combinations (e.g. Alt-Tab) should be redirected to the remote host. - + Select whether local ports (ie. com, parallel) should be shown on the remote host. - + Select whether local printers should be shown on the remote host. - + + Select whether clipboard should be shared. + + Select whether local smart cards should be available on the remote host. - + Select how remote sound should be redirected. - + Select one of the available rendering engines that will be used to display HTML. - + Choose the resolution or mode this connection will open in. - + Select the SmartSize mode to be used. - + Connect to the console session of the remote host. - + Use the Credential Security Support Provider (CredSSP) for authentication if it is available. - + Feel free to enter any information you need here. - + Enter your username. - + If you want to establish a view only connection to the host select yes. - + Enter the proxy address to be used. - + Enter your password for authenticating against the proxy. - + Enter the port the proxy server listens on. - + If you use a proxy to tunnel VNC connections, select which type it is. - + Enter your username for authenticating against the proxy. - + Hostname/IP - + All - + Server Authentication - + Authentication mode - + Automatic resize - + Cache Bitmaps - + Colours - + Compression - + Description - + Display Themes - + Display Wallpaper - + Domain - + Desktop Composition - + Font Smoothing - + Encoding - + Encryption Strength - + External Tool - + External Tool After - + External Tool Before - + Icon - + Load Balance Info - + MAC Address - + Name - + Panel - + Password - + Port - + Protocol - + PuTTY Session - + Gateway Domain - + Gateway Hostname - + Remote Desktop Gateway Password - + Use Gateway - + Gateway Credentials - + Gateway Username - + Disk Drives - + Key Combinations - + Ports - + Printers - + + Clipboard + + Smart Cards - + Sounds - + Rendering Engine - + Resolution - + SmartSize Mode - + Use Console Session - + Use CredSSP - + User Field - + Username - + View Only - + Proxy Address - + Proxy Password - + Proxy Port - + Proxy Type - + Proxy Username - + Protocol Event Disconnected. Message: {0} - + Protocol Event Disconnected failed. {0} - + Protocol to import - + Proxy test failed! - + Proxy test succeeded! - + Connection failed! - + Dispose of Putty process failed! - + Couldn't set focus! - + Get Putty Sessions Failed! - + Putty Handle: {0} - + Killing Putty Process failed! - + Panel Handle: {0} - + Putty Resize Failed! - + PuTTY Saved Sessions - + PuTTY Session Settings - + PuTTY Settings - + Show PuTTY Settings Dialog failed! - + Putty Start Failed! - + --- PuTTY Stuff --- - + PuTTY Title: {0} - + Quick: {0} - + Quick Connect - + Quick Connect Add Failed! - + Creating quick connect failed - + &Warn me when closing connections - + Warn me only when e&xiting mRemoteNG - + Warn me only when closing &multiple connections - + Do &not warn me when closing connections - + RAW - + RDP - + 16777216 Colours (24-bit) - + 256 Colours (8-bit) - + 32768 Colours (15-bit) - + 16777216 Colours (32-bit) - + 65536 Colours (16-bit) - + RDP Add Resolution failed! - + RDP Add Resolutions failed! - + Add Session failed - + Close RDP Connection failed! - + Couldn't create RDP control, please check mRemoteNG requirements. - + Disable Cursor blinking - + Disable Cursor Shadow - + Disable Full Window drag - + Disable Menu Animations - + Disable Themes - + Disable Wallpaper - + RDP disconnected! - + RDP Disconnect failed, trying to close! - + Internal error code 1. - + Internal error code 2. - + Internal error code 3. This is not a valid state. - + Internal error code 4. - + An unrecoverable error has occurred during client connection. - + GetError failed (FatalErrors) - + An unknown fatal RDP error has occurred. Error code {0}. - + An out-of-memory error has occurred. - + An unknown error has occurred. - + A window-creation error has occurred. - + Winsock initialization error. - + Couldn't import rdp file! - + Fit To Panel - + RDP Focus failed! - + RD Gateway is supported. - + RD Gateway is not supported! - + GetSessions failed! - + RDP reconnection count: - + RDP SetAuthenticationLevel failed! - + RDP SetUseConsoleSession failed! - + Setting Console switch for RDC {0}. - + RDP SetCredentials failed! - + RDP SetEventHandlers failed! - + RDP SetRDGateway failed! - + RDP SetPerformanceFlags failed! - + RDP SetPort failed! - + RDP SetProps failed! - + Rdp Set Redirection Failed! - + Rdp Set Redirect Keys Failed! - + RDP SetResolution failed! - + Smart Size - + Bring to this computer - + Do not play - + Leave at remote computer - + RDP ToggleFullscreen failed! - + RDP ToggleSmartSize failed! - + Reconnect to previously opened sessions on startup - + Refresh - + Remote file - + Remove All - + Rename - + Rlogin - + Save - + Save All - + Do you want to save the current connections file before loading another? - + Save connections on exit - + Graphics Interchange Format File (.gif)|*.gif|Joint Photographic Experts Group File (.jpeg)|*.jpeg|Joint Photographic Experts Group File (.jpg)|*.jpg|Portable Network Graphics File (.png)|*.png - + Screen - + Screenshot - + Screenshots - + Search - + Send To... - + Get Sessions Background failed - + Kill Session Background failed - + Set hostname like display name when creating or renaming connections - + Setting main form text failed - + Couldn't save settings or dispose SysTray Icon! - + Show description tooltips in connection tree - + Show full connections file path in window title - + Show logon information on tab names - + Show protocols on tab names - + Single click on connection opens it - + Single click on opened connection in Connection Tree switches to opened Connection Tab - + Aspect - + Free - + No SmartSize - + Socks 5 - + Sort - + Ascending (A-Z) - + Descending (Z-A) - + Special Keys - + Please see Help - Getting started - SQL Configuration for more Info! - + SQL Server - + SQL Update check finished and there is an update available! Going to refresh connections. - + SSH version 1 - + SSH version 2 - + SSH background transfer failed! - + Transfer successful! - + SSH Transfer End (UI.Window.SSHTransfer) failed! - + SSH transfer failed. - + Start IP - + Start Port - + Startup/Exit - + Status - + Switch to Notifications panel on: - + Advanced - + Appearance - + Tabs && Panels - + Updates - + Telnet - + The following: - + Config Panel - + Connections Panel - + General - + The background colour of the config panel. - + The colour of the category text in the config panel. - + The colour of the grid lines in the config panel - + The background colour of the help area of the config panel. - + The colour of the text in the help area of the config panel. - + The colour of the text in the config panel. - + The background colour of the connections panel. - + The colour of the text in the connections panel. - + The colour of the tree lines in the connections panel. - + The background colour of the menus. - + The colour of the text in the menus. - + The background colour of the search box. - + The colour of the text in the search box. - + The colour of the prompt text in the search box. - + The background colour of the toolbars. - + The colour of the text in the toolbars. - + The background colour of the main window. - + Config Panel Background Colour - + Config Panel Category Text Colour - + Config Panel Grid Line Colour - + Config Panel Help Background Colour - + Config Panel Help Text Colour - + Config Panel Text Colour - + Connections Panel Background Colour - + Connections Panel Text Colour - + Connections Panel Tree Line Colour - + Menu Background Colour - + Menu Text Colour - + Search Box Background Colour - + Search Box Text Colour - + Search Box Text Prompt Colour - + Toolbar Background Colour - + Toolbar Text Colour - + Window Background Colour - + Error ({0}) - + Information ({0}) - + Password - + Password for {0} - + Select Panel - + Warning ({0}) - + Transfer - + Transfer failed! - + Try to integrate - + Show On Toolbar - + Type - + Ultra VNC Repeater - + UltraVNC SingleClick port: - + Uncheck the properties you want not to be saved! - + Unnamed Theme - + mRemoteNG requires an update - + mRemoteNG can periodically connect to the mRemoteNG website to check for updates. - + The update information could not be downloaded. - + Check failed - + Checking for updates... - + mRemoteNG Portable Edition does not currently support automatic updates. - + Download complete! mRemoteNG will now quit and begin with the installation. - + The update could not be downloaded. - + The update download could not be initiated. - + Every {0} days - + Daily - + Monthly - + Weekly - + The change log could not be downloaded. - + Use a different username and password - + User - + Use the same username and password - + Use a smart card - + Use SQL Server to load && save connections - + Version - + VNC - + VNC disconnect failed! - + VNC Refresh Screen Failed! - + VNC SendSpecialKeys failed! - + VNC Set Event Handlers failed! - + VNC Set Props Failed! - + VNC Start Chat Failed! - + VNC Toggle SmartSize Failed! - + VNC Toggle ViewOnly Failed! - + Warn me if authentication fails - + Warnings - + Uses the DockPanel Suite by [Weifen Luo] - + http://sourceforge.net/projects/dockpanelsuite/ - + XULrunner path: - + Yes - + Reconnect All Open Connections - + RDP Connection Timeout - + This node is already in this folder. - + Cannot drag node onto itself. - + Cannot drag parent node onto child. - + This node is not draggable. - + Block Cipher Mode - + Encryption Engine - + Security - + Key Derivation Function Iterations - + Dynamic - + High - + Medium - + Choose the Sound Quality provided by the protocol: Dynamic, Medium, High - + Sound quality - + Download Completed! - + Download - + The number of minutes for the RDP session to sit idle before automatically disconnecting (for no limit use 0) - + Minutes to Idle - + Accept - + Add - + Credential Editor - + Credential Manager - + ID - + Remove - + Title - + Select which credential to use for this connection. - + Are you sure you want to delete the credential record, {0}? - + Could not find a credential record with ID matching "{0}" for the connection record named "{1}". - + Select whether to receive an alert after the RDP session disconnects due to inactivity - + Alert on Idle disconnect - + Password must contain at least {0} of the following characters: {1} - + Password must contain at least {0} lower case character(s) - + Password must contain at least {0} number(s) - + Password must contain at least {0} upper case character(s) - + Password length must be between {0} and {1} - + Choose a path for the mRemoteNG log file - + Debug - + Show these message types - + Log file path - + Log these message types - + Choose path - + Open file - + Use default - + Logging - + Popups - + Log to application directory - + Assigned Credential - + Allow Always - + Allow Once - + Don't Allow - + Allow Insecure Certificate for URL: {0}? - + Allow Insecure Certificate? - + The selected repository is unlocked - + Incorrect password - + Source - + Unlocking - + Unlock Credential Repository - + Unlock - + Prompt to unlock credential repositories on startup - + Credentials - + Upgrade - + Back - + Connection file path - + Create and open new file - + Open a different file - + In v1.76 we have introduced a credential management system. This feature requires a significant change in how we store and interact with credentials within mRemoteNG. You will be required to perform a one-way upgrade of your mRemoteNG connections file. This page will walk you through the process of upgrading your connections file or give you a chance to open a different connections file if you do not want to perform the upgrade. - + Credential not available Shown when a credential is not loaded/available for use. - + Do you really want to delete the theme? - + Enable themes - + New theme name - + Cannot create theme, name already present or special characters in the name - + Type the new theme name - + Warning: Restart is required to disable the themes or to completely apply a new one - + No themes are loaded, check that the default mRemoteNG themes exist in the 'themes' folder - + Could not find external tool with name "{0}" - + Create a New Connection File - + The connection file could not be found. - + Import an Existing File - + Use a Custom File Path - + Testing connection - + Server '{0}' was not accessible. - + Connection successful - + Login failed for user '{0}'. - + Database '{0}' not available. - + Save connections after every edit - + Filter search matches in connection tree - + Test connection - + Read only: - + Use UTF8 encoding for RDP "Load Balance Info" property - + Timeout (seconds) - + Working directory: - + Run elevated - + Run elevate - + Show on toolbar column - + Try to integrate - + Working directory - + Lock toolbar positions - + Multi SSH toolbar - + Import sub OUs - + Lock toolbar positions - + Multi SSH toolbar - + Advanced security options - + mRemoteNG Options - + Use UTF8 encoding for RDP "Load Balance Info" property - + Create an empty panel when mRemoteNG starts @@ -2694,4 +2700,22 @@ This page will walk you through the process of upgrading your connections file o UltraVNC SingleClick + + Disconnect Tabs To The Right + + + Disconnect All But This + + + Are you sure you want to close all connections except for "{0}"? + + + Are you sure you want to close all connections to the right of "{0}"? + + + An error occurred while trying to reconnect to RDP host '{0}' + + + An error occurred while trying to change the connection resolution to host '{0}' + \ No newline at end of file diff --git a/mRemoteV1/Resources/Language/Language.ru.resx b/mRemoteV1/Resources/Language/Language.ru.resx index c4e3425e6..397583444 100644 --- a/mRemoteV1/Resources/Language/Language.ru.resx +++ b/mRemoteV1/Resources/Language/Language.ru.resx @@ -2679,4 +2679,16 @@ mRemoteNG сейчас прекратит работу и начнет проц Создайте пустую панель при запуске mRemoteNG + + Отключить остальные вкладки + + + Отключить вкладки справа + + + Хотите закрыть все подключения, кроме "{0}"? + + + Хотите закрыть все подключения справа от "{0}"? + \ No newline at end of file diff --git a/mRemoteV1/Schemas/mremoteng_confcons_v2_7.xsd b/mRemoteV1/Schemas/mremoteng_confcons_v2_7.xsd index b8d378003..1ab3d981d 100644 --- a/mRemoteV1/Schemas/mremoteng_confcons_v2_7.xsd +++ b/mRemoteV1/Schemas/mremoteng_confcons_v2_7.xsd @@ -57,6 +57,7 @@ + @@ -103,6 +104,7 @@ + diff --git a/mRemoteV1/UI/Controls/Base/NGLabel.cs b/mRemoteV1/UI/Controls/Base/NGLabel.cs index 0613f4454..80ad21aa0 100644 --- a/mRemoteV1/UI/Controls/Base/NGLabel.cs +++ b/mRemoteV1/UI/Controls/Base/NGLabel.cs @@ -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); diff --git a/mRemoteV1/UI/Controls/ConnectionTree/ConnectionTree.cs b/mRemoteV1/UI/Controls/ConnectionTree/ConnectionTree.cs index 09ee2b7b9..009603f68 100644 --- a/mRemoteV1/UI/Controls/ConnectionTree/ConnectionTree.cs +++ b/mRemoteV1/UI/Controls/ConnectionTree/ConnectionTree.cs @@ -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 GetRootPuttyNodes() diff --git a/mRemoteV1/UI/Controls/MultiSshToolStrip.cs b/mRemoteV1/UI/Controls/MultiSshToolStrip.cs index 9693d9b64..7b64b64bd 100644 --- a/mRemoteV1/UI/Controls/MultiSshToolStrip.cs +++ b/mRemoteV1/UI/Controls/MultiSshToolStrip.cs @@ -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) { diff --git a/mRemoteV1/UI/Forms/frmMain.cs b/mRemoteV1/UI/Forms/frmMain.cs index 84735025c..e0c233ab5 100644 --- a/mRemoteV1/UI/Forms/frmMain.cs +++ b/mRemoteV1/UI/Forms/frmMain.cs @@ -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) { diff --git a/mRemoteV1/UI/Panels/PanelAdder.cs b/mRemoteV1/UI/Panels/PanelAdder.cs index c68af9c67..2418878ab 100644 --- a/mRemoteV1/UI/Panels/PanelAdder.cs +++ b/mRemoteV1/UI/Panels/PanelAdder.cs @@ -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().Any(w => w.TabText == panelName) + ?? false; + } + private void ShowConnectionWindow(ConnectionWindow connectionForm) { connectionForm.Show(_dockPanel, DockState.Document); diff --git a/mRemoteV1/UI/Window/AboutWindow.cs b/mRemoteV1/UI/Window/AboutWindow.cs index 7689a37fc..30602b73e 100644 --- a/mRemoteV1/UI/Window/AboutWindow.cs +++ b/mRemoteV1/UI/Window/AboutWindow.cs @@ -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")) { diff --git a/mRemoteV1/UI/Window/ComponentsCheckWindow.cs b/mRemoteV1/UI/Window/ComponentsCheckWindow.cs index 71852152d..1e357f139 100644 --- a/mRemoteV1/UI/Window/ComponentsCheckWindow.cs +++ b/mRemoteV1/UI/Window/ComponentsCheckWindow.cs @@ -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(); diff --git a/mRemoteV1/UI/Window/ConfigWindow.cs b/mRemoteV1/UI/Window/ConfigWindow.cs index 5e4915eb2..20a73711f 100644 --- a/mRemoteV1/UI/Window/ConfigWindow.cs +++ b/mRemoteV1/UI/Window/ConfigWindow.cs @@ -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) diff --git a/mRemoteV1/UI/Window/ConnectionTreeWindow.cs b/mRemoteV1/UI/Window/ConnectionTreeWindow.cs index 23fbd49ad..9a4049f14 100644 --- a/mRemoteV1/UI/Window/ConnectionTreeWindow.cs +++ b/mRemoteV1/UI/Window/ConnectionTreeWindow.cs @@ -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().FirstOrDefault(); diff --git a/mRemoteV1/UI/Window/ConnectionWindow.Designer.cs b/mRemoteV1/UI/Window/ConnectionWindow.Designer.cs index 08a0ef4ab..8e097cbc0 100644 --- a/mRemoteV1/UI/Window/ConnectionWindow.Designer.cs +++ b/mRemoteV1/UI/Window/ConnectionWindow.Designer.cs @@ -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"; diff --git a/mRemoteV1/UI/Window/ConnectionWindow.cs b/mRemoteV1/UI/Window/ConnectionWindow.cs index 717be9f77..712145362 100644 --- a/mRemoteV1/UI/Window/ConnectionWindow.cs +++ b/mRemoteV1/UI/Window/ConnectionWindow.cs @@ -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 diff --git a/mRemoteV1/app.config b/mRemoteV1/app.config index 8b26045a6..eaaf2d11c 100644 --- a/mRemoteV1/app.config +++ b/mRemoteV1/app.config @@ -170,6 +170,9 @@ False + + False + False @@ -275,6 +278,9 @@ False + + False + False diff --git a/mRemoteV1/mRemoteV1.csproj b/mRemoteV1/mRemoteV1.csproj index 4f2e97195..0cd5ee63f 100644 --- a/mRemoteV1/mRemoteV1.csproj +++ b/mRemoteV1/mRemoteV1.csproj @@ -160,6 +160,7 @@ +