Compare commits

...

17 Commits

Author SHA1 Message Date
David Sparer
dfc45a2904 update changelog 2018-02-25 12:59:58 -06:00
David Sparer
563fdffb67 fixed build scripts that publish to github
github no longer accepts tls1.0 connections, use tls1.2
2018-02-25 12:58:12 -06:00
David Sparer
f2e9c5e2c0 fixed issue with expanded property not being deserialized 2018-02-25 12:57:40 -06:00
David Sparer
86a591364c modified the xml serializer slightly to make it conform to the XSD file
This required all bools to be serialized to lower case which broke a few assumptions we made in the deserializer
2018-02-25 11:26:29 -06:00
David Sparer
2a82485f81 fixed build issue where installer wasnt being renamed with version number 2018-02-25 09:04:59 -06:00
David Sparer
e13549d361 fixed build issue where binary signatures were not being validated during release builds 2018-02-25 09:00:51 -06:00
David Sparer
a85c1bd7d3 bumped assembly and set release date 2018-02-24 15:19:09 -06:00
David Sparer
946679f490 dont attempt to close a tab if it is disposed 2018-02-24 15:09:09 -06:00
David Sparer
b6f27eac18 added another test and did some cleanup 2018-02-24 14:34:13 -06:00
David Sparer
2cc82145a3 csv serialization now fully preserves tree structure 2018-02-24 12:58:16 -06:00
David Sparer
2dae0f2d8e fix bug where sometimes containers would have their container flag turned off 2018-02-24 12:57:38 -06:00
David Sparer
412f6edc36 change guard checks to use extension method 2018-02-16 20:17:31 -06:00
David Sparer
764791b8e5 changed the Maybe type name to Optional, which is slightly more common 2018-02-16 20:17:30 -06:00
David Sparer
bd20d6ae7d moved classes to new namespace 2018-02-16 20:17:30 -06:00
David Sparer
8db0bf7bea make constant id readonly 2018-02-13 16:15:49 -06:00
David Sparer
cff6aa72fc update changelog 2018-02-13 14:38:58 -06:00
David Sparer
63ddf06057 Made port scan timeout configurable
resolves #648
2018-02-13 14:29:26 -06:00
55 changed files with 1171 additions and 867 deletions

View File

@@ -1,12 +1,13 @@
1.76.0 Alpha 3 (2018-xx-xx):
1.76.1 Alpha 3 (2018-02-24):
Features/Enhancements:
----------------------
#625: Added ability to import mRemoteNG formatted CSV files
#648: The port scan ping timeout is now configurable
Fixes:
------
Fixed a few Xml serialization bugs that would occur if boolean values weren't capitalized
1.76.0 Alpha 2 (2018-02-01):

View File

@@ -1,5 +1,6 @@
$githubUrl = 'https://api.github.com'
# GitHub doesn't support the default powershell protocol (TLS 1.0)
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
function Publish-GitHubRelease {
param (

View File

@@ -45,5 +45,5 @@ Format-Table -AutoSize -Wrap -InputObject @{
& "$PSScriptRoot\verify_LargeAddressAware.ps1" -TargetDir $TargetDir -TargetFileName $TargetFileName
& "$PSScriptRoot\tidy_files_for_release.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName
& "$PSScriptRoot\sign_binaries.ps1" -TargetDir $TargetDir -CertificatePath $CertificatePath -CertificatePassword $CertificatePassword -ConfigurationName $ConfigurationName -Exclude $ExcludeFromSigning
& "$PSScriptRoot\verify_binary_signatures.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName
& "$PSScriptRoot\verify_binary_signatures.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName -CertificatePath $CertificatePath
& "$PSScriptRoot\zip_portable_files.ps1" -SolutionDir $SolutionDir -TargetDir $TargetDir -ConfigurationName $ConfigurationName

View File

@@ -9,7 +9,7 @@ Write-Host $SolutionDir
Write-Host $renameTarget
$targetVersionedFile = "$SolutionDir\mRemoteV1\bin\Release\mRemoteNG.exe"
$version = &"$SolutionDir\Tools\sigcheck.exe" /accepteula -q -n $targetVersionedFile
$version = &"$SolutionDir\Tools\exes\sigcheck.exe" /accepteula -q -n $targetVersionedFile
$renameTargetFileObject = Get-Item -Path $renameTarget -ErrorAction SilentlyContinue

View File

@@ -8,6 +8,7 @@ param (
$ConfigurationName,
[string]
[Parameter(Mandatory=$true)]
# The code signing certificate to use when signing the files.
$CertificatePath
)

View File

@@ -4,6 +4,7 @@ using System.Security;
using System.Xml.Linq;
using mRemoteNG.Config;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Config.Serializers.Xml;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Security;

View File

@@ -1,8 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Config.Serializers.MiscSerializers;
using mRemoteNG.Config.Serializers.Csv;
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Connection.Protocol.Http;
@@ -11,10 +10,11 @@ using mRemoteNG.Connection.Protocol.RDP;
using mRemoteNG.Connection.Protocol.VNC;
using mRemoteNG.Credential;
using mRemoteNG.Security;
using mRemoteNGTests.TestHelpers;
using NSubstitute;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers.MiscSerializers
namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv
{
public class CsvConnectionsDeserializerMremotengFormatTests
{
@@ -50,6 +50,22 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
return propertyValue;
}
[Test]
public void TreeStructureDeserializedCorrectly()
{
//Root
// |- folder1
// | |- Con1
// |- Con2
var treeModel = new ConnectionTreeModelBuilder().Build();
var serializer = new CsvConnectionsSerializerMremotengFormat(new SaveFilter(), _credentialRepositoryList);
var csv = serializer.Serialize(treeModel);
var deserializedConnections = _deserializer.Deserialize(csv);
var con1 = deserializedConnections.GetRecursiveChildList().First(info => info.Name == "Con1");
var folder1 = deserializedConnections.GetRecursiveChildList().First(info => info.Name == "folder1");
Assert.That(con1.Parent, Is.EqualTo(folder1));
}
internal static ConnectionInfo GetTestConnection()
{
return new ConnectionInfo

View File

@@ -1,13 +1,17 @@
using System;
using System.Linq;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Config.Serializers.Csv;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Credential;
using mRemoteNG.Security;
using mRemoteNG.Tree;
using mRemoteNGTests.TestHelpers;
using NSubstitute;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers.MiscSerializers
namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv
{
public class CsvConnectionsSerializerMremotengFormatTests
{
@@ -28,6 +32,24 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
_credentialRepositoryList.GetCredentialRecord(new Guid()).ReturnsForAnyArgs(credRecord);
}
[Test]
public void SerializesNodeId()
{
var serializer = new CsvConnectionsSerializerMremotengFormat(new SaveFilter(), _credentialRepositoryList);
var connectionInfo = BuildConnectionInfo();
var csv = serializer.Serialize(connectionInfo);
Assert.That(csv, Does.Match(connectionInfo.ConstantID));
}
[Test]
public void DoesntSerializeTheRootNode()
{
var serializer = new CsvConnectionsSerializerMremotengFormat(new SaveFilter(), _credentialRepositoryList);
var treeModel = new ConnectionTreeModelBuilder().Build();
var csv = serializer.Serialize(treeModel);
Assert.That(csv, Does.Not.Match($"{treeModel.RootNodes[0].ConstantID};.*;{TreeNodeType.Root}"));
}
[TestCase(Username)]
[TestCase(Domain)]
[TestCase(Password)]
@@ -82,6 +104,32 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
Assert.Throws<ArgumentNullException>(() => serializer.Serialize((ConnectionTreeModel)null));
}
[Test]
public void FoldersAreSerialized()
{
var serializer = new CsvConnectionsSerializerMremotengFormat(new SaveFilter(), _credentialRepositoryList);
var container = BuildContainer();
var csv = serializer.Serialize(container);
Assert.That(csv, Does.Match(container.Name));
Assert.That(csv, Does.Match(container.Username));
Assert.That(csv, Does.Match(container.Domain));
Assert.That(csv, Does.Match(container.Password));
Assert.That(csv, Does.Contain(TreeNodeType.Container.ToString()));
}
[Test]
public void SerializationIncludesRawInheritedValuesIfObjectInheritsFromParentOutsideOfSerializationScope()
{
var serializer = new CsvConnectionsSerializerMremotengFormat(new SaveFilter(), _credentialRepositoryList);
var treeModel = new ConnectionTreeModelBuilder().Build();
var serializationTarget = treeModel.GetRecursiveChildList().First(info => info.Name == "folder3");
var csv = serializer.Serialize(serializationTarget);
var lineWithFolder3 = csv.Split(new[] {Environment.NewLine}, StringSplitOptions.None).First(s => s.Contains(serializationTarget.Name));
Assert.That(lineWithFolder3, Does.Contain(serializationTarget.Username));
Assert.That(lineWithFolder3, Does.Contain(serializationTarget.Domain));
Assert.That(lineWithFolder3, Does.Contain(serializationTarget.Password));
}
private ConnectionInfo BuildConnectionInfo()
{
return new ConnectionInfo
@@ -93,5 +141,16 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
Inheritance = {Colors = true}
};
}
private ContainerInfo BuildContainer()
{
return new ContainerInfo
{
Name = "MyFolder",
Username = "BlahBlah1",
Domain = "aklkskkksh8",
Password = "qweraslkdjf87"
};
}
}
}

View File

@@ -0,0 +1,96 @@
using System;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Xml;
using System.Xml.Schema;
using mRemoteNG.Config.Serializers.Xml;
using mRemoteNG.Security;
using mRemoteNG.Security.SymmetricEncryption;
using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
using mRemoteNGTests.TestHelpers;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Xml
{
public class ValidateXmlSchemas
{
private XmlConnectionsSerializer _serializer;
private ConnectionTreeModel _connectionTreeModel;
private ICryptographyProvider _cryptographyProvider;
private XmlReaderSettings _xmlReaderSettings;
[SetUp]
public void Setup()
{
_connectionTreeModel = new ConnectionTreeModelBuilder().Build();
_cryptographyProvider = new AeadCryptographyProvider();
var connectionNodeSerializer = new XmlConnectionNodeSerializer26(
_cryptographyProvider,
_connectionTreeModel.RootNodes.OfType<RootNodeInfo>().First().PasswordString.ConvertToSecureString(),
new SaveFilter());
_serializer = new XmlConnectionsSerializer(_cryptographyProvider, connectionNodeSerializer);
_xmlReaderSettings = new XmlReaderSettings
{
ValidationType = ValidationType.Schema,
ValidationFlags = XmlSchemaValidationFlags.ProcessInlineSchema |
XmlSchemaValidationFlags.ProcessSchemaLocation |
XmlSchemaValidationFlags.ReportValidationWarnings
};
}
[Test]
public void ValidateSchema()
{
var sb = new StringBuilder();
var xml = _serializer.Serialize(_connectionTreeModel);
var schemaFile = GetTargetPath("mremoteng_confcons_v2_6.xsd");
_xmlReaderSettings.Schemas.Add("http://mremoteng.org", schemaFile);
_xmlReaderSettings.ValidationEventHandler += (sender, args) =>
{
sb.AppendLine($"{args.Severity}: {args.Message}");
};
using (var stream = GenerateStreamFromString(xml))
{
var reader = XmlReader.Create(stream, _xmlReaderSettings);
while (reader.Read()) ;
}
Assert.That(sb.ToString(), Is.Empty);
}
public string GetTargetPath(string fileName, [CallerFilePath] string sourceFilePath = "")
{
const string debugOrRelease =
#if DEBUG
"Debug";
#else
"Release";
#endif
const string normalOrPortable =
#if PORTABLE
" Portable";
#else
"";
#endif
var path = Path.GetDirectoryName(sourceFilePath);
var filePath = $@"{path}\..\..\..\..\bin\{debugOrRelease}{normalOrPortable}\Schemas\{fileName}";
return filePath;
}
private Stream GenerateStreamFromString(string s)
{
var stream = new MemoryStream();
var writer = new StreamWriter(stream);
writer.Write(s);
writer.Flush();
stream.Position = 0;
return stream;
}
}
}

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Config.Serializers.Xml;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Security;
@@ -9,7 +10,7 @@ using mRemoteNG.Tree;
using mRemoteNGTests.Properties;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers
namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Xml
{
public class XmlConnectionsDeserializerTests
{
@@ -104,6 +105,14 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers
Assert.That(folder22.Inheritance.Username, Is.True);
}
[TestCaseSource(typeof(XmlConnectionsDeserializerFixtureData), nameof(XmlConnectionsDeserializerFixtureData.FixtureParams))]
public void ExpandedPropertyGetsDeserialized(Datagram testData)
{
Setup(testData.ConfCons, testData.Password);
var folder1 = GetFolderNamed("Folder1", _connectionTreeModel.GetRecursiveChildList());
Assert.That(folder1.IsExpanded, Is.True);
}
private bool ContainsNodeNamed(string name, IEnumerable<ConnectionInfo> list)
{
return list.Any(node => node.Name == name);

View File

@@ -1,6 +1,7 @@
using System.Linq;
using System.Xml.XPath;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Config.Serializers.Xml;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Security;
@@ -9,7 +10,7 @@ using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers
namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Xml
{
public class XmlConnectionsDocumentCompilerTests
{

View File

@@ -1,6 +1,7 @@
using System.Linq;
using System.Xml.Linq;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Config.Serializers.Xml;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Security;
@@ -9,7 +10,7 @@ using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers
namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Xml
{
public class XmlConnectionsDocumentEncryptorTests
{

View File

@@ -2,6 +2,7 @@
using System.Xml;
using System.Xml.Linq;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Config.Serializers.Xml;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Security;
@@ -10,7 +11,7 @@ using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers
namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Xml
{
public class XmlConnectionsSerializerTests
{
@@ -55,7 +56,7 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers
[TestCase("Username", "")]
[TestCase("Domain", "")]
[TestCase("Password", "")]
[TestCase("InheritAutomaticResize", "False")]
[TestCase("InheritAutomaticResize", "false")]
public void SerializerRespectsSaveFilterSettings(string attributeName, string expectedValue)
{
var connectionNodeSerializer = new XmlConnectionNodeSerializer26(

View File

@@ -2,13 +2,14 @@
using System.Collections;
using System.Xml.Linq;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Config.Serializers.Xml;
using mRemoteNG.Security;
using mRemoteNG.Security.Factories;
using mRemoteNG.Security.SymmetricEncryption;
using mRemoteNG.Tree.Root;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers
namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Xml
{
public class XmlRootNodeSerializerTests
{
@@ -75,7 +76,7 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers
{
var element = _rootNodeSerializer.SerializeRootNodeInfo(_rootNodeInfo, _cryptographyProvider, fullFileEncryption);
var attributeValue = element.Attribute(XName.Get("FullFileEncryption"))?.Value;
Assert.That(attributeValue, Is.EqualTo(fullFileEncryption.ToString()));
Assert.That(bool.Parse(attributeValue), Is.EqualTo(fullFileEncryption));
}
[TestCase("", "ThisIsNotProtected")]

View File

@@ -1,4 +1,5 @@
using mRemoteNG.Config.Serializers;
using System.Linq;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Security;
@@ -26,7 +27,7 @@ namespace mRemoteNGTests.Config.Serializers
{
var model = CreateConnectionTreeModel();
var dataTable = _dataTableSerializer.Serialize(model);
Assert.That(dataTable.Rows.Count, Is.EqualTo(3));
Assert.That(dataTable.Rows.Count, Is.EqualTo(model.GetRecursiveChildList().Count()));
}
[Test]

View File

@@ -1,4 +1,5 @@
using mRemoteNG.Connection;
using System;
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Connection.Protocol.Http;
using mRemoteNG.Connection.Protocol.ICA;
@@ -9,10 +10,14 @@ using NUnit.Framework;
namespace mRemoteNGTests.Connection
{
public class AbstractConnectionInfoDataTests
public class AbstractConnectionInfoDataTests
{
#pragma warning disable 618
private class TestAbstractConnectionInfoData : AbstractConnectionRecord {}
private class TestAbstractConnectionInfoData : AbstractConnectionRecord {
public TestAbstractConnectionInfoData() : base(Guid.NewGuid().ToString())
{
}
}
#pragma warning restore 618
private TestAbstractConnectionInfoData _testAbstractConnectionInfoData;

View File

@@ -27,22 +27,6 @@ namespace mRemoteNGTests.Connection
_connectionInfo = null;
}
[Test]
public void CreatingConnectionInfoWithParentSetsTheParentProperty()
{
var container = new ContainerInfo();
var connectionInfo = new ConnectionInfo(container);
Assert.That(connectionInfo.Parent, Is.EqualTo(container));
}
[Test]
public void CreatingConnectionInfoWithParentAddsToTheParentsChildList()
{
var container = new ContainerInfo();
var connectionInfo = new ConnectionInfo(container);
Assert.That(container.Children, Does.Contain(connectionInfo));
}
[Test]
public void CopyCreatesMemberwiseCopy()
{

View File

@@ -1,5 +1,6 @@
using System.Linq;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Config.Serializers.Xml;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Security;

View File

@@ -34,8 +34,9 @@
using System.Collections;
using System.Windows.Forms;
using NUnit.Extensions.Forms;
namespace NUnit.Extensions.Forms
namespace mRemoteNGTests
{
/// <summary>
/// A ControlTester for testing List Views.

View File

@@ -7,17 +7,52 @@ namespace mRemoteNGTests.TestHelpers
{
public class ConnectionTreeModelBuilder
{
/// <summary>
/// Builds a tree which looks like:
/// Root
/// |- folder1
/// | |- con1
/// |- con2
/// |- folder2
/// |- folder3
/// |- con3
/// </summary>
/// <returns></returns>
public ConnectionTreeModel Build()
{
var model = new ConnectionTreeModel();
var root = new RootNodeInfo(RootNodeType.Connection);
var folder1 = new ContainerInfo { Name = "folder1", Username = "user1", Domain = "domain1", Password = "password1" };
var folder2 = new ContainerInfo { Name = "folder2", Username = "user2", Domain = "domain2", Password = "password2" };
var folder3 = new ContainerInfo
{
Name = "folder3",
Inheritance =
{
Username = true,
Domain = true,
Password = true
}
};
var con1 = new ConnectionInfo { Name = "Con1", Username = "user1", Domain = "domain1", Password = "password1" };
var con2 = new ConnectionInfo { Name = "Con2", Username = "user2", Domain = "domain2", Password = "password2" };
var con3 = new ContainerInfo
{
Name = "con3",
Inheritance =
{
Username = true,
Domain = true,
Password = true
}
};
root.AddChild(folder1);
root.AddChild(con2);
folder1.AddChild(con1);
root.AddChild(folder2);
folder2.AddChild(folder3);
folder3.AddChild(con3);
model.AddRootNode(root);
return model;
}

View File

@@ -3,12 +3,12 @@ using NUnit.Framework;
namespace mRemoteNGTests.Tools
{
public class MaybeTests
public class OptionalTests
{
[Test]
public void MaybeReturnsEmptyListWhenGivenNullValue()
{
var sut = new Maybe<object>(null);
var sut = new Optional<object>(null);
Assert.That(sut, Is.Empty);
}
@@ -16,7 +16,7 @@ namespace mRemoteNGTests.Tools
public void MaybeReturnsValueIfNotNull()
{
var expected = new object();
var sut = new Maybe<object>(expected);
var sut = new Optional<object>(expected);
Assert.That(sut, Has.Member(expected));
}

View File

@@ -114,6 +114,7 @@
<Compile Include="Config\DataProviders\FileBackupCreatorTests.cs" />
<Compile Include="Config\DataProviders\FileDataProviderTests.cs" />
<Compile Include="Config\DataProviders\FileDataProviderWithRollingBackupTests.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\Xml\ValidateXmlSchemas.cs" />
<Compile Include="Config\Serializers\DataTableDeserializerTests.cs" />
<Compile Include="Config\CredentialHarvesterTests.cs" />
<Compile Include="Config\CredentialRecordLoaderTests.cs" />
@@ -121,21 +122,21 @@
<Compile Include="Config\Serializers\CredentialProviderSerializerTests.cs" />
<Compile Include="Config\Serializers\CredentialSerializers\XmlCredentialPasswordDecryptorDecoratorTests.cs" />
<Compile Include="Config\Serializers\CredentialSerializers\XmlCredentialPasswordEncryptorDecoratorTests.cs" />
<Compile Include="Config\Serializers\MiscSerializers\CsvConnectionsDeserializerMremotengFormatTests.cs" />
<Compile Include="Config\Serializers\MiscSerializers\CsvConnectionsSerializerMremotengFormatTests.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\Csv\CsvConnectionsDeserializerMremotengFormatTests.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\Csv\CsvConnectionsSerializerMremotengFormatTests.cs" />
<Compile Include="Config\Serializers\DataTableSerializerTests.cs" />
<Compile Include="Config\Serializers\MiscSerializers\PortScanDeserializerTests.cs" />
<Compile Include="Config\Serializers\MiscSerializers\PuttyConnectionManagerDeserializerTests.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\XmlConnectionsDeserializerTests.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\Xml\XmlConnectionsDeserializerTests.cs" />
<Compile Include="Config\Serializers\MiscSerializers\RemoteDesktopConnectionDeserializerTests.cs" />
<Compile Include="Config\Serializers\MiscSerializers\RemoteDesktopConnectionManager27DeserializerTests.cs" />
<Compile Include="Config\Serializers\MiscSerializers\RemoteDesktopConnectionManagerDeserializerTests.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\XmlConnectionsDocumentCompilerTests.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\XmlConnectionsDocumentEncryptorTests.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\XmlConnectionsSerializerTests.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\Xml\XmlConnectionsDocumentCompilerTests.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\Xml\XmlConnectionsDocumentEncryptorTests.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\Xml\XmlConnectionsSerializerTests.cs" />
<Compile Include="Config\Serializers\CredentialSerializers\XmlCredentialRecordDeserializerTests.cs" />
<Compile Include="Config\Serializers\CredentialSerializers\XmlCredentialSerializerTests.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\XmlRootNodeSerializerTests.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\Xml\XmlRootNodeSerializerTests.cs" />
<Compile Include="Config\Serializers\Versioning\SqlVersion22To23UpgraderTests.cs" />
<Compile Include="Config\Serializers\Versioning\SqlVersion23To24UpgraderTests.cs" />
<Compile Include="Config\Serializers\Versioning\SqlVersion24To25UpgraderTests.cs" />
@@ -173,7 +174,7 @@
<Compile Include="TestHelpers\FileTestHelpers.cs" />
<Compile Include="Tools\ExternalToolsArgumentParserTests.cs" />
<Compile Include="Tools\FullyObservableCollectionTests.cs" />
<Compile Include="Tools\MaybeTests.cs" />
<Compile Include="Tools\OptionalTests.cs" />
<Compile Include="Tree\ClickHandlers\TreeNodeCompositeClickHandlerTests.cs" />
<Compile Include="Tree\ConnectionTreeDragAndDropHandlerTests.cs" />
<Compile Include="Tree\ConnectionTreeModelTests.cs" />

View File

@@ -4,6 +4,8 @@ using System.Windows.Forms;
using mRemoteNG.Config.Connections;
using mRemoteNG.Config.DataProviders;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Config.Serializers.Csv;
using mRemoteNG.Config.Serializers.Xml;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Security;

View File

@@ -10,7 +10,7 @@ namespace mRemoteNG.Config.Connections
/// The previous <see cref="ConnectionTreeModel"/> that is being
/// unloaded.
/// </summary>
public Maybe<ConnectionTreeModel> PreviousConnectionTreeModel { get; }
public Optional<ConnectionTreeModel> PreviousConnectionTreeModel { get; }
/// <summary>
/// True if the previous <see cref="ConnectionTreeModel"/> was loaded from
@@ -37,7 +37,7 @@ namespace mRemoteNG.Config.Connections
public string NewSourcePath { get; }
public ConnectionsLoadedEventArgs(
Maybe<ConnectionTreeModel> previousTreeModelModel, ConnectionTreeModel newTreeModelModel,
Optional<ConnectionTreeModel> previousTreeModelModel, ConnectionTreeModel newTreeModelModel,
bool previousSourceWasDatabase, bool newSourceIsDatabase,
string newSourcePath)
{

View File

@@ -2,6 +2,7 @@
using mRemoteNG.App;
using mRemoteNG.Config.DataProviders;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Config.Serializers.Csv;
using mRemoteNG.Security;
using mRemoteNG.Tree;

View File

@@ -5,6 +5,7 @@ using mRemoteNG.Config.Serializers;
using mRemoteNG.Tools;
using mRemoteNG.Tree;
using System.IO;
using mRemoteNG.Config.Serializers.Xml;
namespace mRemoteNG.Config.Connections
{

View File

@@ -3,6 +3,7 @@ using System.Linq;
using mRemoteNG.App;
using mRemoteNG.Config.DataProviders;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Config.Serializers.Xml;
using mRemoteNG.Security;
using mRemoteNG.Security.Factories;
using mRemoteNG.Tree;

View File

@@ -2,7 +2,7 @@
using System.Linq;
using mRemoteNG.App;
using mRemoteNG.Config.DataProviders;
using mRemoteNG.Config.Serializers.MiscSerializers;
using mRemoteNG.Config.Serializers.Csv;
using mRemoteNG.Container;
using mRemoteNG.Messages;

View File

@@ -3,6 +3,7 @@ using System.Linq;
using mRemoteNG.App;
using mRemoteNG.Config.DataProviders;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Config.Serializers.Xml;
using mRemoteNG.Container;
using mRemoteNG.Messages;

View File

@@ -11,16 +11,16 @@ using mRemoteNG.Container;
using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
namespace mRemoteNG.Config.Serializers.MiscSerializers
namespace mRemoteNG.Config.Serializers.Csv
{
public class CsvConnectionsDeserializerMremotengFormat : IDeserializer<string, ConnectionTreeModel>
{
public ConnectionTreeModel Deserialize(string serializedData)
{
var root = new RootNodeInfo(RootNodeType.Connection);
var lines = serializedData.Split(new []{"\r\n", "\r", "\n"}, StringSplitOptions.RemoveEmptyEntries);
var csvHeaders = new List<string>();
// used to map a connectioninfo to it's parent's GUID
var parentMapping = new Dictionary<ConnectionInfo, string>();
for (var lineNumber = 0; lineNumber < lines.Length; lineNumber++)
{
@@ -30,39 +30,58 @@ namespace mRemoteNG.Config.Serializers.MiscSerializers
else
{
var connectionInfo = ParseConnectionInfo(csvHeaders, line);
var folder = ParseConnectionFolder(line[csvHeaders.IndexOf("Folder")], root);
folder.AddChild(connectionInfo);
parentMapping.Add(connectionInfo, line[csvHeaders.IndexOf("Parent")]);
}
}
var root = CreateTreeStructure(parentMapping);
var connectionTreeModel = new ConnectionTreeModel();
connectionTreeModel.AddRootNode(root);
return connectionTreeModel;
}
private ContainerInfo ParseConnectionFolder(string folderString, ContainerInfo rootContainer)
private RootNodeInfo CreateTreeStructure(Dictionary<ConnectionInfo, string> parentMapping)
{
var containerNames = folderString.Split('\\');
var parentContainer = rootContainer;
var root = new RootNodeInfo(RootNodeType.Connection);
for (var i = containerNames.Length - 2; i >= 0; i--)
foreach (var node in parentMapping)
{
var containerName = containerNames[i];
var container = parentContainer.Children.OfType<ContainerInfo>().FirstOrDefault(info => info.Name == containerName);
if (container == null)
// no parent mapped, add to root
if (string.IsNullOrEmpty(node.Value))
root.AddChild(node.Key);
// search for parent in the list by GUID
var parent = parentMapping
.Keys
.OfType<ContainerInfo>()
.FirstOrDefault(info => info.ConstantID == node.Value);
if (parent != null)
{
container = new ContainerInfo {Name = containerName};
parentContainer.AddChild(container);
parent.AddChild(node.Key);
}
else
{
root.AddChild(node.Key);
}
parentContainer = container;
}
return parentContainer;
return root;
}
private ConnectionInfo ParseConnectionInfo(IList<string> headers, string[] connectionCsv)
{
var connectionRecord = new ConnectionInfo();
var nodeType = headers.Contains("NodeType")
? (TreeNodeType)Enum.Parse(typeof(TreeNodeType), connectionCsv[headers.IndexOf("NodeType")], true)
: TreeNodeType.Connection;
var nodeId = headers.Contains("Id")
? connectionCsv[headers.IndexOf("Id")]
: Guid.NewGuid().ToString();
var connectionRecord = nodeType == TreeNodeType.Connection
? new ConnectionInfo(nodeId)
: new ContainerInfo(nodeId);
connectionRecord.Name = headers.Contains("Name") ? connectionCsv[headers.IndexOf("Name")] : "";
connectionRecord.Description = headers.Contains("Description") ? connectionCsv[headers.IndexOf("Description")] : "";

View File

@@ -0,0 +1,220 @@
using System;
using System.Linq;
using System.Text;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Credential;
using mRemoteNG.Security;
using mRemoteNG.Tools;
using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
namespace mRemoteNG.Config.Serializers.Csv
{
public class CsvConnectionsSerializerMremotengFormat : ISerializer<ConnectionInfo,string>
{
private readonly SaveFilter _saveFilter;
private readonly ICredentialRepositoryList _credentialRepositoryList;
public CsvConnectionsSerializerMremotengFormat(SaveFilter saveFilter, ICredentialRepositoryList credentialRepositoryList)
{
saveFilter.ThrowIfNull(nameof(saveFilter));
credentialRepositoryList.ThrowIfNull(nameof(credentialRepositoryList));
_saveFilter = saveFilter;
_credentialRepositoryList = credentialRepositoryList;
}
public string Serialize(ConnectionTreeModel connectionTreeModel)
{
connectionTreeModel.ThrowIfNull(nameof(connectionTreeModel));
var rootNode = connectionTreeModel.RootNodes.First(node => node is RootNodeInfo);
return Serialize(rootNode);
}
public string Serialize(ConnectionInfo serializationTarget)
{
serializationTarget.ThrowIfNull(nameof(serializationTarget));
var sb = new StringBuilder();
WriteCsvHeader(sb);
SerializeNodesRecursive(serializationTarget, sb);
return sb.ToString();
}
private void WriteCsvHeader(StringBuilder sb)
{
sb.Append("Name;Id;Parent;NodeType;Description;Icon;Panel;");
if (_saveFilter.SaveUsername)
sb.Append("Username;");
if (_saveFilter.SavePassword)
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;");
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");
}
private void SerializeNodesRecursive(ConnectionInfo node, StringBuilder sb)
{
var nodeAsContainer = node as ContainerInfo;
if (nodeAsContainer != null)
{
foreach (var child in nodeAsContainer.Children)
{
SerializeNodesRecursive(child, sb);
}
}
// dont serialize the root node
if (node is RootNodeInfo)
return;
SerializeConnectionInfo(node, sb);
}
private void SerializeConnectionInfo(ConnectionInfo con, StringBuilder sb)
{
sb.AppendLine();
sb.Append(string.Join(";",
CleanStringForCsv(con.Name),
CleanStringForCsv(con.ConstantID),
CleanStringForCsv(con.Parent?.ConstantID ?? ""),
CleanStringForCsv(con.GetTreeNodeType()),
CleanStringForCsv(con.Description),
CleanStringForCsv(con.Icon),
CleanStringForCsv(con.Panel)))
.Append(";");
if (_saveFilter.SaveUsername)
sb.Append($"{CleanStringForCsv(con.Username)};");
if (_saveFilter.SavePassword)
sb.Append($"{CleanStringForCsv(con.Password)};");
if (_saveFilter.SaveDomain)
sb.Append($"{CleanStringForCsv(con.Domain)};");
sb.Append(string.Join(";",
CleanStringForCsv(con.Hostname),
CleanStringForCsv(con.Protocol),
CleanStringForCsv(con.PuttySession),
CleanStringForCsv(con.Port),
CleanStringForCsv(con.UseConsoleSession),
CleanStringForCsv(con.UseCredSsp),
CleanStringForCsv(con.RenderingEngine),
CleanStringForCsv(con.ICAEncryptionStrength),
CleanStringForCsv(con.RDPAuthenticationLevel),
CleanStringForCsv(con.LoadBalanceInfo),
CleanStringForCsv(con.Colors),
CleanStringForCsv(con.Resolution),
CleanStringForCsv(con.AutomaticResize),
CleanStringForCsv(con.DisplayWallpaper),
CleanStringForCsv(con.DisplayThemes),
CleanStringForCsv(con.EnableFontSmoothing),
CleanStringForCsv(con.EnableDesktopComposition),
CleanStringForCsv(con.CacheBitmaps),
CleanStringForCsv(con.RedirectDiskDrives),
CleanStringForCsv(con.RedirectPorts),
CleanStringForCsv(con.RedirectPrinters),
CleanStringForCsv(con.RedirectSmartCards),
CleanStringForCsv(con.RedirectSound),
CleanStringForCsv(con.RedirectKeys),
CleanStringForCsv(con.PreExtApp),
CleanStringForCsv(con.PostExtApp),
CleanStringForCsv(con.MacAddress),
CleanStringForCsv(con.UserField),
CleanStringForCsv(con.ExtApp),
CleanStringForCsv(con.VNCCompression),
CleanStringForCsv(con.VNCEncoding),
CleanStringForCsv(con.VNCAuthMode),
CleanStringForCsv(con.VNCProxyType),
CleanStringForCsv(con.VNCProxyIP),
CleanStringForCsv(con.VNCProxyPort),
CleanStringForCsv(con.VNCProxyUsername),
CleanStringForCsv(con.VNCProxyPassword),
CleanStringForCsv(con.VNCColors),
CleanStringForCsv(con.VNCSmartSizeMode),
CleanStringForCsv(con.VNCViewOnly),
CleanStringForCsv(con.RDGatewayUsageMethod),
CleanStringForCsv(con.RDGatewayHostname),
CleanStringForCsv(con.RDGatewayUseConnectionCredentials),
CleanStringForCsv(con.RDGatewayUsername),
CleanStringForCsv(con.RDGatewayPassword),
CleanStringForCsv(con.RDGatewayDomain)))
.Append(";");
if (!_saveFilter.SaveInheritance)
return;
sb.Append(string.Join(";",
con.Inheritance.CacheBitmaps,
con.Inheritance.Colors,
con.Inheritance.Description,
con.Inheritance.DisplayThemes,
con.Inheritance.DisplayWallpaper,
con.Inheritance.EnableFontSmoothing,
con.Inheritance.EnableDesktopComposition,
con.Inheritance.Domain,
con.Inheritance.Icon,
con.Inheritance.Panel,
con.Inheritance.Password,
con.Inheritance.Port,
con.Inheritance.Protocol,
con.Inheritance.PuttySession,
con.Inheritance.RedirectDiskDrives,
con.Inheritance.RedirectKeys,
con.Inheritance.RedirectPorts,
con.Inheritance.RedirectPrinters,
con.Inheritance.RedirectSmartCards,
con.Inheritance.RedirectSound,
con.Inheritance.Resolution,
con.Inheritance.AutomaticResize,
con.Inheritance.UseConsoleSession,
con.Inheritance.UseCredSsp,
con.Inheritance.RenderingEngine,
con.Inheritance.Username,
con.Inheritance.ICAEncryptionStrength,
con.Inheritance.RDPAuthenticationLevel,
con.Inheritance.LoadBalanceInfo,
con.Inheritance.PreExtApp,
con.Inheritance.PostExtApp,
con.Inheritance.MacAddress,
con.Inheritance.UserField,
con.Inheritance.ExtApp,
con.Inheritance.VNCCompression,
con.Inheritance.VNCEncoding,
con.Inheritance.VNCAuthMode,
con.Inheritance.VNCProxyType,
con.Inheritance.VNCProxyIP,
con.Inheritance.VNCProxyPort,
con.Inheritance.VNCProxyUsername,
con.Inheritance.VNCProxyPassword,
con.Inheritance.VNCColors,
con.Inheritance.VNCSmartSizeMode,
con.Inheritance.VNCViewOnly,
con.Inheritance.RDGatewayUsageMethod,
con.Inheritance.RDGatewayHostname,
con.Inheritance.RDGatewayUseConnectionCredentials,
con.Inheritance.RDGatewayUsername,
con.Inheritance.RDGatewayPassword,
con.Inheritance.RDGatewayDomain,
con.Inheritance.RDPAlertIdleTimeout,
con.Inheritance.RDPMinutesToIdleTimeout,
con.Inheritance.SoundQuality));
}
/// <summary>
/// Remove text that is unsafe for use in CSV files
/// </summary>
/// <param name="text"></param>
private string CleanStringForCsv(object text)
{
return text.ToString().Replace(";", "");
}
}
}

View File

@@ -5,8 +5,7 @@ using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Security;
namespace mRemoteNG.Config.Serializers
namespace mRemoteNG.Config.Serializers.Xml
{
// ReSharper disable once InconsistentNaming
public class XmlConnectionNodeSerializer26 : ISerializer<ConnectionInfo,XElement>
@@ -43,7 +42,7 @@ namespace mRemoteNG.Config.Serializers
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()));
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));
@@ -66,30 +65,30 @@ namespace mRemoteNG.Config.Serializers
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()));
element.Add(new XAttribute("UseCredSsp", connectionInfo.UseCredSsp.ToString()));
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));
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()));
element.Add(new XAttribute("DisplayWallpaper", connectionInfo.DisplayWallpaper.ToString()));
element.Add(new XAttribute("DisplayThemes", connectionInfo.DisplayThemes.ToString()));
element.Add(new XAttribute("EnableFontSmoothing", connectionInfo.EnableFontSmoothing.ToString()));
element.Add(new XAttribute("EnableDesktopComposition", connectionInfo.EnableDesktopComposition.ToString()));
element.Add(new XAttribute("CacheBitmaps", connectionInfo.CacheBitmaps.ToString()));
element.Add(new XAttribute("RedirectDiskDrives", connectionInfo.RedirectDiskDrives.ToString()));
element.Add(new XAttribute("RedirectPorts", connectionInfo.RedirectPorts.ToString()));
element.Add(new XAttribute("RedirectPrinters", connectionInfo.RedirectPrinters.ToString()));
element.Add(new XAttribute("RedirectSmartCards", connectionInfo.RedirectSmartCards.ToString()));
element.Add(new XAttribute("RedirectSound", connectionInfo.RedirectSound.ToString()));
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("RedirectSmartCards", connectionInfo.RedirectSmartCards.ToString().ToLowerInvariant()));
element.Add(new XAttribute("RedirectSound", connectionInfo.RedirectSound.ToString().ToLowerInvariant()));
element.Add(new XAttribute("SoundQuality", connectionInfo.SoundQuality.ToString()));
element.Add(new XAttribute("RedirectKeys", connectionInfo.RedirectKeys.ToString()));
element.Add(new XAttribute("Connected", (connectionInfo.OpenConnections.Count > 0).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));
@@ -113,7 +112,7 @@ namespace mRemoteNG.Config.Serializers
element.Add(new XAttribute("VNCColors", connectionInfo.VNCColors));
element.Add(new XAttribute("VNCSmartSizeMode", connectionInfo.VNCSmartSizeMode));
element.Add(new XAttribute("VNCViewOnly", connectionInfo.VNCViewOnly.ToString()));
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));
@@ -136,117 +135,118 @@ namespace mRemoteNG.Config.Serializers
{
if (_saveFilter.SaveInheritance)
{
element.Add(new XAttribute("InheritCacheBitmaps", connectionInfo.Inheritance.CacheBitmaps.ToString()));
element.Add(new XAttribute("InheritColors", connectionInfo.Inheritance.Colors.ToString()));
element.Add(new XAttribute("InheritDescription", connectionInfo.Inheritance.Description.ToString()));
element.Add(new XAttribute("InheritDisplayThemes", connectionInfo.Inheritance.DisplayThemes.ToString()));
element.Add(new XAttribute("InheritDisplayWallpaper", connectionInfo.Inheritance.DisplayWallpaper.ToString()));
element.Add(new XAttribute("InheritEnableFontSmoothing", connectionInfo.Inheritance.EnableFontSmoothing.ToString()));
element.Add(new XAttribute("InheritEnableDesktopComposition", connectionInfo.Inheritance.EnableDesktopComposition.ToString()));
element.Add(new XAttribute("InheritDomain", connectionInfo.Inheritance.Domain.ToString()));
element.Add(new XAttribute("InheritIcon", connectionInfo.Inheritance.Icon.ToString()));
element.Add(new XAttribute("InheritPanel", connectionInfo.Inheritance.Panel.ToString()));
element.Add(new XAttribute("InheritPassword", connectionInfo.Inheritance.Password.ToString()));
element.Add(new XAttribute("InheritPort", connectionInfo.Inheritance.Port.ToString()));
element.Add(new XAttribute("InheritProtocol", connectionInfo.Inheritance.Protocol.ToString()));
element.Add(new XAttribute("InheritPuttySession", connectionInfo.Inheritance.PuttySession.ToString()));
element.Add(new XAttribute("InheritRedirectDiskDrives", connectionInfo.Inheritance.RedirectDiskDrives.ToString()));
element.Add(new XAttribute("InheritRedirectKeys", connectionInfo.Inheritance.RedirectKeys.ToString()));
element.Add(new XAttribute("InheritRedirectPorts", connectionInfo.Inheritance.RedirectPorts.ToString()));
element.Add(new XAttribute("InheritRedirectPrinters", connectionInfo.Inheritance.RedirectPrinters.ToString()));
element.Add(new XAttribute("InheritRedirectSmartCards", connectionInfo.Inheritance.RedirectSmartCards.ToString()));
element.Add(new XAttribute("InheritRedirectSound", connectionInfo.Inheritance.RedirectSound.ToString()));
element.Add(new XAttribute("InheritSoundQuality", connectionInfo.Inheritance.SoundQuality.ToString()));
element.Add(new XAttribute("InheritResolution", connectionInfo.Inheritance.Resolution.ToString()));
element.Add(new XAttribute("InheritAutomaticResize", connectionInfo.Inheritance.AutomaticResize.ToString()));
element.Add(new XAttribute("InheritUseConsoleSession", connectionInfo.Inheritance.UseConsoleSession.ToString()));
element.Add(new XAttribute("InheritUseCredSsp", connectionInfo.Inheritance.UseCredSsp.ToString()));
element.Add(new XAttribute("InheritRenderingEngine", connectionInfo.Inheritance.RenderingEngine.ToString()));
element.Add(new XAttribute("InheritUsername", connectionInfo.Inheritance.Username.ToString()));
element.Add(new XAttribute("InheritICAEncryptionStrength", connectionInfo.Inheritance.ICAEncryptionStrength.ToString()));
element.Add(new XAttribute("InheritRDPAuthenticationLevel", connectionInfo.Inheritance.RDPAuthenticationLevel.ToString()));
element.Add(new XAttribute("InheritRDPMinutesToIdleTimeout", connectionInfo.Inheritance.RDPMinutesToIdleTimeout.ToString()));
element.Add(new XAttribute("InheritRDPAlertIdleTimeout", connectionInfo.Inheritance.RDPAlertIdleTimeout.ToString()));
element.Add(new XAttribute("InheritLoadBalanceInfo", connectionInfo.Inheritance.LoadBalanceInfo.ToString()));
element.Add(new XAttribute("InheritPreExtApp", connectionInfo.Inheritance.PreExtApp.ToString()));
element.Add(new XAttribute("InheritPostExtApp", connectionInfo.Inheritance.PostExtApp.ToString()));
element.Add(new XAttribute("InheritMacAddress", connectionInfo.Inheritance.MacAddress.ToString()));
element.Add(new XAttribute("InheritUserField", connectionInfo.Inheritance.UserField.ToString()));
element.Add(new XAttribute("InheritExtApp", connectionInfo.Inheritance.ExtApp.ToString()));
element.Add(new XAttribute("InheritVNCCompression", connectionInfo.Inheritance.VNCCompression.ToString()));
element.Add(new XAttribute("InheritVNCEncoding", connectionInfo.Inheritance.VNCEncoding.ToString()));
element.Add(new XAttribute("InheritVNCAuthMode", connectionInfo.Inheritance.VNCAuthMode.ToString()));
element.Add(new XAttribute("InheritVNCProxyType", connectionInfo.Inheritance.VNCProxyType.ToString()));
element.Add(new XAttribute("InheritVNCProxyIP", connectionInfo.Inheritance.VNCProxyIP.ToString()));
element.Add(new XAttribute("InheritVNCProxyPort", connectionInfo.Inheritance.VNCProxyPort.ToString()));
element.Add(new XAttribute("InheritVNCProxyUsername", connectionInfo.Inheritance.VNCProxyUsername.ToString()));
element.Add(new XAttribute("InheritVNCProxyPassword", connectionInfo.Inheritance.VNCProxyPassword.ToString()));
element.Add(new XAttribute("InheritVNCColors", connectionInfo.Inheritance.VNCColors.ToString()));
element.Add(new XAttribute("InheritVNCSmartSizeMode", connectionInfo.Inheritance.VNCSmartSizeMode.ToString()));
element.Add(new XAttribute("InheritVNCViewOnly", connectionInfo.Inheritance.VNCViewOnly.ToString()));
element.Add(new XAttribute("InheritRDGatewayUsageMethod", connectionInfo.Inheritance.RDGatewayUsageMethod.ToString()));
element.Add(new XAttribute("InheritRDGatewayHostname", connectionInfo.Inheritance.RDGatewayHostname.ToString()));
element.Add(new XAttribute("InheritRDGatewayUseConnectionCredentials", connectionInfo.Inheritance.RDGatewayUseConnectionCredentials.ToString()));
element.Add(new XAttribute("InheritRDGatewayUsername", connectionInfo.Inheritance.RDGatewayUsername.ToString()));
element.Add(new XAttribute("InheritRDGatewayPassword", connectionInfo.Inheritance.RDGatewayPassword.ToString()));
element.Add(new XAttribute("InheritRDGatewayDomain", connectionInfo.Inheritance.RDGatewayDomain.ToString()));
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("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
{
element.Add(new XAttribute("InheritCacheBitmaps", false.ToString()));
element.Add(new XAttribute("InheritColors", false.ToString()));
element.Add(new XAttribute("InheritDescription", false.ToString()));
element.Add(new XAttribute("InheritDisplayThemes", false.ToString()));
element.Add(new XAttribute("InheritDisplayWallpaper", false.ToString()));
element.Add(new XAttribute("InheritEnableFontSmoothing", false.ToString()));
element.Add(new XAttribute("InheritEnableDesktopComposition", false.ToString()));
element.Add(new XAttribute("InheritDomain", false.ToString()));
element.Add(new XAttribute("InheritIcon", false.ToString()));
element.Add(new XAttribute("InheritPanel", false.ToString()));
element.Add(new XAttribute("InheritPassword", false.ToString()));
element.Add(new XAttribute("InheritPort", false.ToString()));
element.Add(new XAttribute("InheritProtocol", false.ToString()));
element.Add(new XAttribute("InheritPuttySession", false.ToString()));
element.Add(new XAttribute("InheritRedirectDiskDrives", false.ToString()));
element.Add(new XAttribute("InheritRedirectKeys", false.ToString()));
element.Add(new XAttribute("InheritRedirectPorts", false.ToString()));
element.Add(new XAttribute("InheritRedirectPrinters", false.ToString()));
element.Add(new XAttribute("InheritRedirectSmartCards", false.ToString()));
element.Add(new XAttribute("InheritRedirectSound", false.ToString()));
element.Add(new XAttribute("InheritSoundQuality", false.ToString()));
element.Add(new XAttribute("InheritResolution", false.ToString()));
element.Add(new XAttribute("InheritAutomaticResize", false.ToString()));
element.Add(new XAttribute("InheritUseConsoleSession", false.ToString()));
element.Add(new XAttribute("InheritUseCredSsp", false.ToString()));
element.Add(new XAttribute("InheritRenderingEngine", false.ToString()));
element.Add(new XAttribute("InheritUsername", false.ToString()));
element.Add(new XAttribute("InheritICAEncryptionStrength", false.ToString()));
element.Add(new XAttribute("InheritRDPAuthenticationLevel", false.ToString()));
element.Add(new XAttribute("InheritRDPMinutesToIdleTimeout", false.ToString()));
element.Add(new XAttribute("InheritRDPAlertIdleTimeout", false.ToString()));
element.Add(new XAttribute("InheritLoadBalanceInfo", false.ToString()));
element.Add(new XAttribute("InheritPreExtApp", false.ToString()));
element.Add(new XAttribute("InheritPostExtApp", false.ToString()));
element.Add(new XAttribute("InheritMacAddress", false.ToString()));
element.Add(new XAttribute("InheritUserField", false.ToString()));
element.Add(new XAttribute("InheritExtApp", false.ToString()));
element.Add(new XAttribute("InheritVNCCompression", false.ToString()));
element.Add(new XAttribute("InheritVNCEncoding", false.ToString()));
element.Add(new XAttribute("InheritVNCAuthMode", false.ToString()));
element.Add(new XAttribute("InheritVNCProxyType", false.ToString()));
element.Add(new XAttribute("InheritVNCProxyIP", false.ToString()));
element.Add(new XAttribute("InheritVNCProxyPort", false.ToString()));
element.Add(new XAttribute("InheritVNCProxyUsername", false.ToString()));
element.Add(new XAttribute("InheritVNCProxyPassword", false.ToString()));
element.Add(new XAttribute("InheritVNCColors", false.ToString()));
element.Add(new XAttribute("InheritVNCSmartSizeMode", false.ToString()));
element.Add(new XAttribute("InheritVNCViewOnly", false.ToString()));
element.Add(new XAttribute("InheritRDGatewayUsageMethod", false.ToString()));
element.Add(new XAttribute("InheritRDGatewayHostname", false.ToString()));
element.Add(new XAttribute("InheritRDGatewayUseConnectionCredentials", false.ToString()));
element.Add(new XAttribute("InheritRDGatewayUsername", false.ToString()));
element.Add(new XAttribute("InheritRDGatewayPassword", false.ToString()));
element.Add(new XAttribute("InheritRDGatewayDomain", false.ToString()));
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("InheritRedirectSmartCards", falseString));
element.Add(new XAttribute("InheritRedirectSound", falseString));
element.Add(new XAttribute("InheritSoundQuality", falseString));
element.Add(new XAttribute("InheritResolution", falseString));
element.Add(new XAttribute("InheritAutomaticResize", falseString));
element.Add(new XAttribute("InheritUseConsoleSession", falseString));
element.Add(new XAttribute("InheritUseCredSsp", falseString));
element.Add(new XAttribute("InheritRenderingEngine", falseString));
element.Add(new XAttribute("InheritUsername", falseString));
element.Add(new XAttribute("InheritICAEncryptionStrength", falseString));
element.Add(new XAttribute("InheritRDPAuthenticationLevel", falseString));
element.Add(new XAttribute("InheritRDPMinutesToIdleTimeout", falseString));
element.Add(new XAttribute("InheritRDPAlertIdleTimeout", falseString));
element.Add(new XAttribute("InheritLoadBalanceInfo", falseString));
element.Add(new XAttribute("InheritPreExtApp", falseString));
element.Add(new XAttribute("InheritPostExtApp", falseString));
element.Add(new XAttribute("InheritMacAddress", falseString));
element.Add(new XAttribute("InheritUserField", falseString));
element.Add(new XAttribute("InheritExtApp", falseString));
element.Add(new XAttribute("InheritVNCCompression", falseString));
element.Add(new XAttribute("InheritVNCEncoding", falseString));
element.Add(new XAttribute("InheritVNCAuthMode", falseString));
element.Add(new XAttribute("InheritVNCProxyType", falseString));
element.Add(new XAttribute("InheritVNCProxyIP", falseString));
element.Add(new XAttribute("InheritVNCProxyPort", falseString));
element.Add(new XAttribute("InheritVNCProxyUsername", falseString));
element.Add(new XAttribute("InheritVNCProxyPassword", falseString));
element.Add(new XAttribute("InheritVNCColors", falseString));
element.Add(new XAttribute("InheritVNCSmartSizeMode", falseString));
element.Add(new XAttribute("InheritVNCViewOnly", falseString));
element.Add(new XAttribute("InheritRDGatewayUsageMethod", falseString));
element.Add(new XAttribute("InheritRDGatewayHostname", falseString));
element.Add(new XAttribute("InheritRDGatewayUseConnectionCredentials", falseString));
element.Add(new XAttribute("InheritRDGatewayUsername", falseString));
element.Add(new XAttribute("InheritRDGatewayPassword", falseString));
element.Add(new XAttribute("InheritRDGatewayDomain", falseString));
}
}
}

View File

@@ -19,7 +19,7 @@ using mRemoteNG.Tree.Root;
using mRemoteNG.UI.Forms;
using mRemoteNG.UI.TaskDialog;
namespace mRemoteNG.Config.Serializers
namespace mRemoteNG.Config.Serializers.Xml
{
public class XmlConnectionsDeserializer : IDeserializer<string, ConnectionTreeModel>
{
@@ -71,7 +71,8 @@ namespace mRemoteNG.Config.Serializers
if (_confVersion >= 2.6)
{
if (rootXmlElement?.Attributes["FullFileEncryption"].Value == "True")
var fullFileEncryptionValue = rootXmlElement?.Attributes["FullFileEncryption"].Value ?? "";
if (bool.Parse(fullFileEncryptionValue))
{
var decryptedContent = _decryptor.Decrypt(rootXmlElement.InnerText);
rootXmlElement.InnerXml = decryptedContent;
@@ -186,7 +187,10 @@ namespace mRemoteNG.Config.Serializers
if (_confVersion >= 0.9)
containerInfo.CopyFrom(GetConnectionInfoFromXml(xmlNode));
if (_confVersion >= 0.8)
containerInfo.IsExpanded = xmlNode.Attributes?["Expanded"].Value == "True";
{
var expandedValue = xmlNode.Attributes?["Expanded"].Value ?? "";
containerInfo.IsExpanded = bool.Parse(expandedValue);
}
parentContainer.AddChild(containerInfo);
AddNodesFromXmlRecursive(xmlNode, containerInfo);
@@ -204,7 +208,9 @@ namespace mRemoteNG.Config.Serializers
private ConnectionInfo GetConnectionInfoFromXml(XmlNode xmlnode)
{
if (xmlnode.Attributes == null) return null;
var connectionInfo = new ConnectionInfo();
var connectionId = xmlnode.Attributes["Id"]?.Value ?? Guid.NewGuid().ToString();
var connectionInfo = new ConnectionInfo(connectionId);
try
{
@@ -219,7 +225,9 @@ namespace mRemoteNG.Config.Serializers
if (_confVersion < 1.1) //1.0 - 0.1
{
connectionInfo.Resolution = Convert.ToBoolean(xmlnode.Attributes["Fullscreen"].Value) ? RdpProtocol.RDPResolutions.Fullscreen : RdpProtocol.RDPResolutions.FitToWindow;
connectionInfo.Resolution = Convert.ToBoolean(xmlnode.Attributes["Fullscreen"].Value)
? RdpProtocol.RDPResolutions.Fullscreen
: RdpProtocol.RDPResolutions.FitToWindow;
}
if (_confVersion <= 2.6) // 0.2 - 2.6
@@ -257,7 +265,9 @@ namespace mRemoteNG.Config.Serializers
{
if (_confVersion < 0.7)
{
connectionInfo.Port = Convert.ToInt32(Convert.ToBoolean(xmlnode.Attributes["UseVNC"].Value) ? xmlnode.Attributes["VNCPort"].Value : xmlnode.Attributes["RDPPort"].Value);
connectionInfo.Port = Convert.ToInt32(Convert.ToBoolean(xmlnode.Attributes["UseVNC"].Value)
? xmlnode.Attributes["VNCPort"].Value
: xmlnode.Attributes["RDPPort"].Value);
}
connectionInfo.UseConsoleSession = bool.Parse(xmlnode.Attributes["ConnectToConsole"].Value);
@@ -491,7 +501,6 @@ namespace mRemoteNG.Config.Serializers
if (_confVersion >= 2.6)
{
connectionInfo.ConstantID = xmlnode.Attributes["Id"]?.Value ?? connectionInfo.ConstantID;
connectionInfo.SoundQuality = (RdpProtocol.RDPSoundQuality)MiscTools.StringToEnum(typeof(RdpProtocol.RDPSoundQuality), Convert.ToString(xmlnode.Attributes["SoundQuality"].Value));
connectionInfo.Inheritance.SoundQuality = bool.Parse(xmlnode.Attributes["InheritSoundQuality"].Value);
connectionInfo.RDPMinutesToIdleTimeout = Convert.ToInt32(xmlnode.Attributes["RDPMinutesToIdleTimeout"]?.Value ?? "0");

View File

@@ -8,8 +8,7 @@ using mRemoteNG.Security;
using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
namespace mRemoteNG.Config.Serializers
namespace mRemoteNG.Config.Serializers.Xml
{
public class XmlConnectionsDocumentCompiler
{

View File

@@ -2,8 +2,7 @@
using System.Xml.Linq;
using mRemoteNG.Security;
namespace mRemoteNG.Config.Serializers
namespace mRemoteNG.Config.Serializers.Xml
{
public class XmlConnectionsDocumentEncryptor
{

View File

@@ -10,7 +10,7 @@ using mRemoteNG.Security;
using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
namespace mRemoteNG.Config.Serializers
namespace mRemoteNG.Config.Serializers.Xml
{
public class XmlConnectionsSerializer : ISerializer<ConnectionTreeModel,string>, ISerializer<ConnectionInfo, string>
{

View File

@@ -2,19 +2,20 @@
using mRemoteNG.Security;
using mRemoteNG.Tree.Root;
namespace mRemoteNG.Config.Serializers
namespace mRemoteNG.Config.Serializers.Xml
{
public class XmlRootNodeSerializer
{
public XElement SerializeRootNodeInfo(RootNodeInfo rootNodeInfo, ICryptographyProvider cryptographyProvider, bool fullFileEncryption = false)
{
var element = new XElement("Connections");
XNamespace xmlNamespace = "http://mremoteng.org";
var element = new XElement(xmlNamespace + "Connections");
element.Add(new XAttribute(XNamespace.Xmlns+"mrng", xmlNamespace));
element.Add(new XAttribute(XName.Get("Name"), rootNodeInfo.Name));
element.Add(new XAttribute(XName.Get("EncryptionEngine"), cryptographyProvider.CipherEngine));
element.Add(new XAttribute(XName.Get("BlockCipherMode"), cryptographyProvider.CipherMode));
element.Add(new XAttribute(XName.Get("KdfIterations"), cryptographyProvider.KeyDerivationIterations));
element.Add(new XAttribute(XName.Get("FullFileEncryption"), fullFileEncryption.ToString()));
element.Add(new XAttribute(XName.Get("FullFileEncryption"), fullFileEncryption.ToString().ToLowerInvariant()));
element.Add(CreateProtectedAttribute(rootNodeInfo, cryptographyProvider));
element.Add(new XAttribute(XName.Get("ConfVersion"), "2.6"));
return element;

View File

@@ -15,7 +15,7 @@ using mRemoteNG.Tree.Root;
namespace mRemoteNG.Config.Serializers
{
public class DataTableDeserializer : IDeserializer<DataTable, ConnectionTreeModel>
public class DataTableDeserializer : IDeserializer<DataTable, ConnectionTreeModel>
{
public ConnectionTreeModel Deserialize(DataTable table)
{
@@ -46,14 +46,16 @@ namespace mRemoteNG.Config.Serializers
private ConnectionInfo DeserializeConnectionInfo(DataRow row)
{
var connectionInfo = new ConnectionInfo();
var connectionId = row["ConstantID"] as string ?? Guid.NewGuid().ToString();
var connectionInfo = new ConnectionInfo(connectionId);
PopulateConnectionInfoFromDatarow(row, connectionInfo);
return connectionInfo;
}
private ContainerInfo DeserializeContainerInfo(DataRow row)
{
var containerInfo = new ContainerInfo();
var containerId = row["ConstantID"] as string ?? Guid.NewGuid().ToString();
var containerInfo = new ContainerInfo(containerId);
PopulateConnectionInfoFromDatarow(row, containerInfo);
return containerInfo;
}
@@ -61,7 +63,6 @@ namespace mRemoteNG.Config.Serializers
private void PopulateConnectionInfoFromDatarow(DataRow dataRow, ConnectionInfo connectionInfo)
{
connectionInfo.Name = (string)dataRow["Name"];
connectionInfo.ConstantID = (string)dataRow["ConstantID"];
// This throws a NPE - Parent is a connectionInfo object which will be null at this point.
// The Parent object is linked properly later in CreateNodeHierarchy()
@@ -187,7 +188,7 @@ namespace mRemoteNG.Config.Serializers
private ConnectionTreeModel CreateNodeHierarchy(List<ConnectionInfo> connectionList, DataTable dataTable)
{
var connectionTreeModel = new ConnectionTreeModel();
var rootNode = new RootNodeInfo(RootNodeType.Connection) {ConstantID = "0"};
var rootNode = new RootNodeInfo(RootNodeType.Connection, "0");
connectionTreeModel.AddRootNode(rootNode);
foreach (DataRow row in dataTable.Rows)

View File

@@ -1,238 +0,0 @@
using System;
using System.Linq;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Credential;
using mRemoteNG.Security;
using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
namespace mRemoteNG.Config.Serializers
{
public class CsvConnectionsSerializerMremotengFormat : ISerializer<ConnectionInfo,string>
{
private string _csv = "";
private ConnectionInfo _serializationTarget;
private readonly SaveFilter _saveFilter;
private readonly ICredentialRepositoryList _credentialRepositoryList;
public CsvConnectionsSerializerMremotengFormat(SaveFilter saveFilter, ICredentialRepositoryList credentialRepositoryList)
{
if (saveFilter == null)
throw new ArgumentNullException(nameof(saveFilter));
if (credentialRepositoryList == null)
throw new ArgumentNullException(nameof(credentialRepositoryList));
_saveFilter = saveFilter;
_credentialRepositoryList = credentialRepositoryList;
}
public string Serialize(ConnectionTreeModel connectionTreeModel)
{
if (connectionTreeModel == null)
throw new ArgumentNullException(nameof(connectionTreeModel));
var rootNode = connectionTreeModel.RootNodes.First(node => node is RootNodeInfo);
return Serialize(rootNode);
}
public string Serialize(ConnectionInfo serializationTarget)
{
if (serializationTarget == null)
throw new ArgumentNullException(nameof(serializationTarget));
_csv = "";
_serializationTarget = serializationTarget;
WriteCsvHeader();
SerializeNodesRecursive(serializationTarget);
return _csv;
}
private void WriteCsvHeader()
{
var csvHeader = string.Empty;
csvHeader += "Name;Folder;Description;Icon;Panel;";
if (_saveFilter.SaveUsername)
csvHeader += "Username;";
if (_saveFilter.SavePassword)
csvHeader += "Password;";
if (_saveFilter.SaveDomain)
csvHeader += "Domain;";
csvHeader += "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;";
if (_saveFilter.SaveInheritance)
csvHeader += "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";
_csv += csvHeader;
}
private void SerializeNodesRecursive(ConnectionInfo node)
{
var nodeAsContainer = node as ContainerInfo;
if (nodeAsContainer != null)
{
foreach (var child in nodeAsContainer.Children)
{
var info = child as ContainerInfo;
if (info != null)
SerializeNodesRecursive(info);
else
SerializeConnectionInfo(child);
}
}
else
SerializeConnectionInfo(node);
}
private void SerializeConnectionInfo(ConnectionInfo con)
{
var csvLine = Environment.NewLine;
csvLine += CleanStringForCsv(con.Name) + ";" +
CleanStringForCsv(GetNodePath(con)) + ";" +
CleanStringForCsv(con.Description) + ";" +
CleanStringForCsv(con.Icon) + ";" +
CleanStringForCsv(con.Panel) + ";";
if (_saveFilter.SaveUsername)
csvLine += CleanStringForCsv(con.Username) + ";";
if (_saveFilter.SavePassword)
csvLine += CleanStringForCsv(con.Password) + ";";
if (_saveFilter.SaveDomain)
csvLine += CleanStringForCsv(con.Domain) + ";";
csvLine += CleanStringForCsv(con.Hostname) + ";" +
CleanStringForCsv(con.Protocol) + ";" +
CleanStringForCsv(con.PuttySession) + ";" +
CleanStringForCsv(con.Port) + ";" +
CleanStringForCsv(con.UseConsoleSession) + ";" +
CleanStringForCsv(con.UseCredSsp) + ";" +
CleanStringForCsv(con.RenderingEngine) + ";" +
CleanStringForCsv(con.ICAEncryptionStrength) + ";" +
CleanStringForCsv(con.RDPAuthenticationLevel) + ";" +
CleanStringForCsv(con.LoadBalanceInfo) + ";" +
CleanStringForCsv(con.Colors) + ";" +
CleanStringForCsv(con.Resolution) + ";" +
CleanStringForCsv(con.AutomaticResize) + ";" +
CleanStringForCsv(con.DisplayWallpaper) + ";" +
CleanStringForCsv(con.DisplayThemes) + ";" +
CleanStringForCsv(con.EnableFontSmoothing) + ";" +
CleanStringForCsv(con.EnableDesktopComposition) + ";" +
CleanStringForCsv(con.CacheBitmaps) + ";" +
CleanStringForCsv(con.RedirectDiskDrives) + ";" +
CleanStringForCsv(con.RedirectPorts) + ";" +
CleanStringForCsv(con.RedirectPrinters) + ";" +
CleanStringForCsv(con.RedirectSmartCards) + ";" +
CleanStringForCsv(con.RedirectSound) + ";" +
CleanStringForCsv(con.RedirectKeys) + ";" +
CleanStringForCsv(con.PreExtApp) + ";" +
CleanStringForCsv(con.PostExtApp) + ";" +
CleanStringForCsv(con.MacAddress) + ";" +
CleanStringForCsv(con.UserField) + ";" +
CleanStringForCsv(con.ExtApp) + ";" +
CleanStringForCsv(con.VNCCompression) + ";" +
CleanStringForCsv(con.VNCEncoding) + ";" +
CleanStringForCsv(con.VNCAuthMode) + ";" +
CleanStringForCsv(con.VNCProxyType) + ";" +
CleanStringForCsv(con.VNCProxyIP) + ";" +
CleanStringForCsv(con.VNCProxyPort) + ";" +
CleanStringForCsv(con.VNCProxyUsername) + ";" +
CleanStringForCsv(con.VNCProxyPassword) + ";" +
CleanStringForCsv(con.VNCColors) + ";" +
CleanStringForCsv(con.VNCSmartSizeMode) + ";" +
CleanStringForCsv(con.VNCViewOnly) + ";" +
CleanStringForCsv(con.RDGatewayUsageMethod) + ";" +
CleanStringForCsv(con.RDGatewayHostname) + ";" +
CleanStringForCsv(con.RDGatewayUseConnectionCredentials) + ";" +
CleanStringForCsv(con.RDGatewayUsername) + ";" +
CleanStringForCsv(con.RDGatewayPassword) + ";" +
CleanStringForCsv(con.RDGatewayDomain) + ";";
if (_saveFilter.SaveInheritance)
{
csvLine += con.Inheritance.CacheBitmaps + ";" +
con.Inheritance.Colors + ";" +
con.Inheritance.Description + ";" +
con.Inheritance.DisplayThemes + ";" +
con.Inheritance.DisplayWallpaper + ";" +
con.Inheritance.EnableFontSmoothing + ";" +
con.Inheritance.EnableDesktopComposition + ";" +
con.Inheritance.Domain + ";" +
con.Inheritance.Icon + ";" +
con.Inheritance.Panel + ";" +
con.Inheritance.Password + ";" +
con.Inheritance.Port + ";" +
con.Inheritance.Protocol + ";" +
con.Inheritance.PuttySession + ";" +
con.Inheritance.RedirectDiskDrives + ";" +
con.Inheritance.RedirectKeys + ";" +
con.Inheritance.RedirectPorts + ";" +
con.Inheritance.RedirectPrinters + ";" +
con.Inheritance.RedirectSmartCards + ";" +
con.Inheritance.RedirectSound + ";" +
con.Inheritance.Resolution + ";" +
con.Inheritance.AutomaticResize + ";" +
con.Inheritance.UseConsoleSession + ";" +
con.Inheritance.UseCredSsp + ";" +
con.Inheritance.RenderingEngine + ";" +
con.Inheritance.Username + ";" +
con.Inheritance.ICAEncryptionStrength + ";" +
con.Inheritance.RDPAuthenticationLevel + ";" +
con.Inheritance.LoadBalanceInfo + ";" +
con.Inheritance.PreExtApp + ";" +
con.Inheritance.PostExtApp + ";" +
con.Inheritance.MacAddress + ";" +
con.Inheritance.UserField + ";" +
con.Inheritance.ExtApp + ";" +
con.Inheritance.VNCCompression + ";" +
con.Inheritance.VNCEncoding + ";" +
con.Inheritance.VNCAuthMode + ";" +
con.Inheritance.VNCProxyType + ";" +
con.Inheritance.VNCProxyIP + ";" +
con.Inheritance.VNCProxyPort + ";" +
con.Inheritance.VNCProxyUsername + ";" +
con.Inheritance.VNCProxyPassword + ";" +
con.Inheritance.VNCColors + ";" +
con.Inheritance.VNCSmartSizeMode + ";" +
con.Inheritance.VNCViewOnly + ";" +
con.Inheritance.RDGatewayUsageMethod + ";" +
con.Inheritance.RDGatewayHostname + ";" +
con.Inheritance.RDGatewayUseConnectionCredentials + ";" +
con.Inheritance.RDGatewayUsername + ";" +
con.Inheritance.RDGatewayPassword + ";" +
con.Inheritance.RDGatewayDomain + ";" +
con.Inheritance.RDPAlertIdleTimeout + ";" +
con.Inheritance.RDPMinutesToIdleTimeout + ";" +
con.Inheritance.SoundQuality;
}
_csv += csvLine;
}
/// <summary>
/// Remove text that is unsafe for use in CSV files
/// </summary>
/// <param name="text"></param>
private string CleanStringForCsv(object text)
{
return text.ToString().Replace(";", "");
}
private string GetNodePath(ConnectionInfo connectionInfo)
{
var nodePath = "";
var currentItem = connectionInfo;
while (currentItem != _serializationTarget)
{
currentItem = currentItem.Parent;
if (currentItem == null)
break;
nodePath += $@"{currentItem.Name}\";
}
nodePath = nodePath.TrimEnd('\\');
return nodePath;
}
}
}

View File

@@ -498,7 +498,7 @@ namespace mRemoteNG.Connection
#region Misc
[Browsable(false)]
public string ConstantID { get; set; }
public string ConstantID { get; /*set;*/ }
[LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 7),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameExternalToolBefore"),
@@ -658,6 +658,11 @@ namespace mRemoteNG.Connection
#endregion
#endregion
protected AbstractConnectionRecord(string uniqueId)
{
ConstantID = uniqueId.ThrowIfNullOrEmpty(nameof(uniqueId));
}
protected virtual TPropertyType GetPropertyValue<TPropertyType>(string propertyName, TPropertyType value)
{
return (TPropertyType)GetType().GetProperty(propertyName).GetValue(this, null);

View File

@@ -14,7 +14,6 @@ using mRemoteNG.Connection.Protocol.SSH;
using mRemoteNG.Connection.Protocol.Telnet;
using mRemoteNG.Connection.Protocol.VNC;
using mRemoteNG.Container;
using mRemoteNG.Tools;
using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
@@ -32,7 +31,7 @@ namespace mRemoteNG.Connection
public ProtocolList OpenConnections { get; protected set; }
[Browsable(false)]
public bool IsContainer { get; set; }
public virtual bool IsContainer { get; set; }
[Browsable(false)]
public bool IsDefault { get; set; }
@@ -52,7 +51,14 @@ namespace mRemoteNG.Connection
#endregion
#region Constructors
public ConnectionInfo()
public ConnectionInfo()
: this(Guid.NewGuid().ToString())
{
}
public ConnectionInfo(string uniqueId)
: base(uniqueId)
{
SetTreeDisplayDefaults();
SetConnectionDefaults();
@@ -65,12 +71,6 @@ namespace mRemoteNG.Connection
SetNonBrowsablePropertiesDefaults();
SetDefaults();
}
public ConnectionInfo(ContainerInfo parent) : this()
{
IsContainer = true;
parent.AddChild(this);
}
#endregion
#region Public Methods
@@ -78,7 +78,6 @@ namespace mRemoteNG.Connection
{
var newConnectionInfo = new ConnectionInfo();
newConnectionInfo.CopyFrom(this);
newConnectionInfo.ConstantID = MiscTools.CreateConstantID();
newConnectionInfo.Inheritance = Inheritance.Clone();
return newConnectionInfo;
}
@@ -317,7 +316,6 @@ namespace mRemoteNG.Connection
private void SetMiscDefaults()
{
ConstantID = MiscTools.CreateConstantID();
PreExtApp = Settings.Default.ConDefaultPreExtApp;
PostExtApp = Settings.Default.ConDefaultPostExtApp;
MacAddress = Settings.Default.ConDefaultMacAddress;

View File

@@ -227,7 +227,7 @@ namespace mRemoteNG.Connection
public event EventHandler<ConnectionsLoadedEventArgs> ConnectionsLoaded;
public event EventHandler<ConnectionsSavedEventArgs> ConnectionsSaved;
private void RaiseConnectionsLoadedEvent(Maybe<ConnectionTreeModel> previousTreeModel, ConnectionTreeModel newTreeModel,
private void RaiseConnectionsLoadedEvent(Optional<ConnectionTreeModel> previousTreeModel, ConnectionTreeModel newTreeModel,
bool previousSourceWasDatabase, bool newSourceIsDatabase,
string newSourcePath)
{

View File

@@ -1,16 +1,15 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using mRemoteNG.Connection;
using System.ComponentModel;
using System.Linq;
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Tools;
using mRemoteNG.Tree;
namespace mRemoteNG.Container
{
[DefaultProperty("Name")]
[DefaultProperty("Name")]
public class ContainerInfo : ConnectionInfo, INotifyCollectionChanged
{
[Browsable(false)]
@@ -19,13 +18,20 @@ namespace mRemoteNG.Container
[Category(""), Browsable(false), ReadOnly(false), Bindable(false), DefaultValue(""), DesignOnly(false)]
public bool IsExpanded { get; set; }
[Browsable(false)]
public override bool IsContainer { get { return true; } set {} }
public ContainerInfo()
public ContainerInfo(string uniqueId)
: base(uniqueId)
{
SetDefaults();
IsContainer = true;
}
public ContainerInfo()
: this(Guid.NewGuid().ToString())
{
}
public override TreeNodeType GetTreeNodeType()
{
return TreeNodeType.Container;
@@ -178,7 +184,6 @@ namespace mRemoteNG.Container
{
var newContainer = new ContainerInfo();
newContainer.CopyFrom(this);
newContainer.ConstantID = MiscTools.CreateConstantID();
newContainer.OpenConnections = new ProtocolList();
newContainer.Inheritance = Inheritance.Clone();
foreach (var child in Children.ToArray())

View File

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

View File

@@ -7507,6 +7507,15 @@ namespace mRemoteNG {
}
}
/// <summary>
/// Looks up a localized string similar to Timeout (seconds).
/// </summary>
internal static string TimeoutInSeconds {
get {
return ResourceManager.GetString("TimeoutInSeconds", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Unlock.
/// </summary>

View File

@@ -2631,4 +2631,7 @@ This page will walk you through the process of upgrading your connections file o
<data name="LoadBalanceInfoUseUtf8" xml:space="preserve">
<value>Use UTF8 encoding for RDP "Load Balance Info" property</value>
</data>
<data name="TimeoutInSeconds" xml:space="preserve">
<value>Timeout (seconds)</value>
</data>
</root>

View File

@@ -1,20 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="mremoteng_confcons_v2_6"
targetNamespace="http://mremoteng.org"
elementFormDefault="qualified"
xmlns="http://mremoteng.org"
xmlns:mrng="http://mremoteng.org"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified"
>
<xs:element name="Connections">
<xs:complexType>
<xs:sequence>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="Node" type="mrng:connectioninfo" />
</xs:sequence>
<xs:attribute name="Name" type="xs:string" use="required" />
<xs:attribute name="Export" type="xs:boolean" use="required" />
<xs:attribute name="EncryptionEngine" type="xs:string" use="required" />
<xs:attribute name="BlockCipherMode" type="xs:string" use="required" />
<xs:attribute name="KdfIterations" type="xs:int" use="optional" />
@@ -31,6 +30,7 @@
</xs:sequence>
<xs:attribute name="Name" type="xs:string" use="required" />
<xs:attribute name="Type" type="xs:string" use="required" />
<xs:attribute name="Expanded" type="xs:boolean" use="optional" />
<xs:attribute name="Descr" type="xs:string" use="required" />
<xs:attribute name="Icon" type="xs:string" use="required" />
<xs:attribute name="Panel" type="xs:string" use="required" />

View File

@@ -5,20 +5,20 @@ namespace mRemoteNG.Tools
{
public static class Extensions
{
public static Maybe<T> Maybe<T>(this T value)
public static Optional<T> Maybe<T>(this T value)
{
return new Maybe<T>(value);
return new Optional<T>(value);
}
public static Maybe<U> MaybeParse<T, U>(this T value, Func<T, U> parseFunc)
public static Optional<U> MaybeParse<T, U>(this T value, Func<T, U> parseFunc)
{
try
{
return new Maybe<U>(parseFunc(value));
return new Optional<U>(parseFunc(value));
}
catch
{
return new Maybe<U>();
return new Optional<U>();
}
}

View File

@@ -4,16 +4,16 @@ using System.Linq;
namespace mRemoteNG.Tools
{
public class Maybe<T> : IEnumerable<T>
public class Optional<T> : IEnumerable<T>
{
private readonly T[] _maybe;
public Maybe()
public Optional()
{
_maybe = new T[0];
}
public Maybe(T value)
public Optional(T value)
{
_maybe = value != null
? new[] {value}
@@ -35,16 +35,16 @@ namespace mRemoteNG.Tools
return _maybe.Any() ? _maybe.First().ToString() : "";
}
public static implicit operator Maybe<T>(T value)
public static implicit operator Optional<T>(T value)
{
return new Maybe<T>(value);
return new Optional<T>(value);
}
public static Maybe<TOut> FromNullable<TOut>(TOut? value) where TOut : struct
public static Optional<TOut> FromNullable<TOut>(TOut? value) where TOut : struct
{
return value.HasValue
? new Maybe<TOut>(value.Value)
: new Maybe<TOut>();
? new Optional<TOut>(value.Value)
: new Optional<TOut>();
}
}
}

View File

@@ -17,17 +17,24 @@ namespace mRemoteNG.Tools
private readonly List<int> _ports = new List<int>();
private Thread _scanThread;
private readonly List<ScanHost> _scannedHosts = new List<ScanHost>();
private readonly int _timeoutInMilliseconds;
#region Public Methods
public PortScanner(IPAddress ipAddress1, IPAddress ipAddress2, int port1, int port2)
public PortScanner(IPAddress ipAddress1, IPAddress ipAddress2, int port1, int port2, int timeoutInMilliseconds = 5000)
{
var ipAddressStart = IpAddressMin(ipAddress1, ipAddress2);
var ipAddressEnd = IpAddressMax(ipAddress1, ipAddress2);
var portStart = Math.Min(port1, port2);
var portEnd = Math.Max(port1, port2);
if (timeoutInMilliseconds < 0)
throw new ArgumentOutOfRangeException(nameof(timeoutInMilliseconds));
_timeoutInMilliseconds = timeoutInMilliseconds;
_ports.Clear();
for (var port = portStart; port <= portEnd; port++)
{
@@ -87,7 +94,7 @@ namespace mRemoteNG.Tools
try
{
pingSender.PingCompleted += PingSender_PingCompleted;
pingSender.SendAsync(ipAddress, ipAddress);
pingSender.SendAsync(ipAddress, _timeoutInMilliseconds, ipAddress);
}
catch (Exception ex)
{

View File

@@ -1,8 +1,7 @@
using mRemoteNG.Tools;
using System;
using System.ComponentModel;
using System.Security;
using mRemoteNG.Container;
using mRemoteNG.Security;
using mRemoteNG.Tools;
namespace mRemoteNG.Tree.Root
@@ -13,11 +12,17 @@ namespace mRemoteNG.Tree.Root
private string _name;
private string _customPassword = "";
public RootNodeInfo(RootNodeType rootType)
public RootNodeInfo(RootNodeType rootType, string uniqueId)
: base(uniqueId)
{
_name = Language.strConnections;
Type = rootType;
}
public RootNodeInfo(RootNodeType rootType)
: this(rootType, Guid.NewGuid().ToString())
{
}
#region Public Properties

View File

@@ -727,6 +727,9 @@ namespace mRemoteNG.UI.Window
private delegate void CloseTabDelegate(TabPage tabToBeClosed);
private void CloseTab(TabPage tabToBeClosed)
{
if (tabToBeClosed.Disposing || tabToBeClosed.IsDisposed)
return;
if (TabController.InvokeRequired)
{
CloseTabDelegate s = CloseTab;

View File

@@ -36,120 +36,126 @@ namespace mRemoteNG.UI.Window
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PortScanWindow));
this.ipStart = new mRemoteNG.UI.Controls.IPTextBox();
this.ipEnd = new mRemoteNG.UI.Controls.IPTextBox();
this.lblStartIP = new mRemoteNG.UI.Controls.Base.NGLabel();
this.lblEndIP = new mRemoteNG.UI.Controls.Base.NGLabel();
this.btnScan = new Controls.Base.NGButton();
this.olvHosts = new mRemoteNG.UI.Controls.Base.NGListView();
this.resultsMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
this.importHTTPToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.importHTTPSToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.importRDPToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.importRloginToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.importSSH2ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.importTelnetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.importVNCToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.btnImport = new Controls.Base.NGButton();
this.cbProtocol = new Controls.Base.NGComboBox();
this.lblOnlyImport = new mRemoteNG.UI.Controls.Base.NGLabel();
this.clmHost = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.clmSSH = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.clmTelnet = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.clmHTTP = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.clmHTTPS = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.clmRlogin = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.clmRDP = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.clmVNC = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.clmOpenPorts = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.clmClosedPorts = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.prgBar = new mRemoteNG.UI.Controls.Base.NGProgressBar();
this.pnlPorts = new System.Windows.Forms.Panel();
this.portEnd = new Controls.Base.NGNumericUpDown();
this.portStart = new Controls.Base.NGNumericUpDown();
this.Label2 = new mRemoteNG.UI.Controls.Base.NGLabel();
this.Label1 = new mRemoteNG.UI.Controls.Base.NGLabel();
this.pnlImport = new System.Windows.Forms.Panel();
((System.ComponentModel.ISupportInitialize)(this.olvHosts)).BeginInit();
this.resultsMenuStrip.SuspendLayout();
this.pnlPorts.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.portEnd)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.portStart)).BeginInit();
this.pnlImport.SuspendLayout();
this.SuspendLayout();
//
// ipStart
//
this.ipStart.Location = new System.Drawing.Point(12, 25);
this.ipStart.Name = "ipStart";
this.ipStart.Size = new System.Drawing.Size(130, 20);
this.ipStart.TabIndex = 10;
this.ipStart.ToolTipText = "";
//
// ipEnd
//
this.ipEnd.Location = new System.Drawing.Point(148, 25);
this.ipEnd.Name = "ipEnd";
this.ipEnd.Size = new System.Drawing.Size(130, 20);
this.ipEnd.TabIndex = 15;
this.ipEnd.ToolTipText = "";
//
// lblStartIP
//
this.lblStartIP.AutoSize = true;
this.lblStartIP.Location = new System.Drawing.Point(12, 7);
this.lblStartIP.Name = "lblStartIP";
this.lblStartIP.Size = new System.Drawing.Size(46, 13);
this.lblStartIP.TabIndex = 0;
this.lblStartIP.Text = "Start IP:";
//
// lblEndIP
//
this.lblEndIP.AutoSize = true;
this.lblEndIP.Location = new System.Drawing.Point(148, 7);
this.lblEndIP.Name = "lblEndIP";
this.lblEndIP.Size = new System.Drawing.Size(42, 13);
this.lblEndIP.TabIndex = 5;
this.lblEndIP.Text = "End IP:";
//
// btnScan
//
this.btnScan.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnScan.Image = global::mRemoteNG.Resources.Search;
this.btnScan.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnScan.Location = new System.Drawing.Point(597, 12);
this.btnScan.Name = "btnScan";
this.btnScan.Size = new System.Drawing.Size(95, 55);
this.btnScan.TabIndex = 20;
this.btnScan.Text = "&Scan";
this.btnScan.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.btnScan.UseVisualStyleBackColor = true;
this.btnScan.Click += new System.EventHandler(this.btnScan_Click);
//
// olvHosts
//
this.olvHosts.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PortScanWindow));
this.ipStart = new mRemoteNG.UI.Controls.IPTextBox();
this.ipEnd = new mRemoteNG.UI.Controls.IPTextBox();
this.lblStartIP = new mRemoteNG.UI.Controls.Base.NGLabel();
this.lblEndIP = new mRemoteNG.UI.Controls.Base.NGLabel();
this.btnScan = new mRemoteNG.UI.Controls.Base.NGButton();
this.olvHosts = new mRemoteNG.UI.Controls.Base.NGListView();
this.resultsMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
this.importHTTPToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.importHTTPSToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.importRDPToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.importRloginToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.importSSH2ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.importTelnetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.importVNCToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.btnImport = new mRemoteNG.UI.Controls.Base.NGButton();
this.cbProtocol = new mRemoteNG.UI.Controls.Base.NGComboBox();
this.lblOnlyImport = new mRemoteNG.UI.Controls.Base.NGLabel();
this.clmHost = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.clmSSH = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.clmTelnet = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.clmHTTP = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.clmHTTPS = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.clmRlogin = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.clmRDP = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.clmVNC = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.clmOpenPorts = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.clmClosedPorts = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.prgBar = new mRemoteNG.UI.Controls.Base.NGProgressBar();
this.pnlPorts = new System.Windows.Forms.Panel();
this.numericSelectorTimeout = new mRemoteNG.UI.Controls.Base.NGNumericUpDown();
this.lblTimeout = new System.Windows.Forms.Label();
this.portEnd = new mRemoteNG.UI.Controls.Base.NGNumericUpDown();
this.portStart = new mRemoteNG.UI.Controls.Base.NGNumericUpDown();
this.Label2 = new mRemoteNG.UI.Controls.Base.NGLabel();
this.Label1 = new mRemoteNG.UI.Controls.Base.NGLabel();
this.pnlImport = new System.Windows.Forms.Panel();
((System.ComponentModel.ISupportInitialize)(this.olvHosts)).BeginInit();
this.resultsMenuStrip.SuspendLayout();
this.pnlPorts.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericSelectorTimeout)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.portEnd)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.portStart)).BeginInit();
this.pnlImport.SuspendLayout();
this.SuspendLayout();
//
// ipStart
//
this.ipStart.Location = new System.Drawing.Point(12, 25);
this.ipStart.Name = "ipStart";
this.ipStart.Size = new System.Drawing.Size(130, 20);
this.ipStart.TabIndex = 10;
this.ipStart.ToolTipText = "";
//
// ipEnd
//
this.ipEnd.Location = new System.Drawing.Point(148, 25);
this.ipEnd.Name = "ipEnd";
this.ipEnd.Size = new System.Drawing.Size(130, 20);
this.ipEnd.TabIndex = 15;
this.ipEnd.ToolTipText = "";
//
// lblStartIP
//
this.lblStartIP.AutoSize = true;
this.lblStartIP.Location = new System.Drawing.Point(12, 7);
this.lblStartIP.Name = "lblStartIP";
this.lblStartIP.Size = new System.Drawing.Size(46, 13);
this.lblStartIP.TabIndex = 0;
this.lblStartIP.Text = "Start IP:";
//
// lblEndIP
//
this.lblEndIP.AutoSize = true;
this.lblEndIP.Location = new System.Drawing.Point(148, 7);
this.lblEndIP.Name = "lblEndIP";
this.lblEndIP.Size = new System.Drawing.Size(42, 13);
this.lblEndIP.TabIndex = 5;
this.lblEndIP.Text = "End IP:";
//
// btnScan
//
this.btnScan._mice = mRemoteNG.UI.Controls.Base.NGButton.MouseState.HOVER;
this.btnScan.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnScan.Image = global::mRemoteNG.Resources.Search;
this.btnScan.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnScan.Location = new System.Drawing.Point(801, 12);
this.btnScan.Name = "btnScan";
this.btnScan.Size = new System.Drawing.Size(95, 55);
this.btnScan.TabIndex = 20;
this.btnScan.Text = "&Scan";
this.btnScan.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.btnScan.UseVisualStyleBackColor = true;
this.btnScan.Click += new System.EventHandler(this.btnScan_Click);
//
// olvHosts
//
this.olvHosts.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.olvHosts.CellEditUseWholeCell = false;
this.olvHosts.ContextMenuStrip = this.resultsMenuStrip;
this.olvHosts.FullRowSelect = true;
this.olvHosts.GridLines = true;
this.olvHosts.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.olvHosts.HideSelection = false;
this.olvHosts.Location = new System.Drawing.Point(12, 73);
this.olvHosts.Name = "olvHosts";
this.olvHosts.ShowGroups = false;
this.olvHosts.Size = new System.Drawing.Size(680, 290);
this.olvHosts.TabIndex = 26;
this.olvHosts.UseCompatibleStateImageBehavior = false;
this.olvHosts.View = System.Windows.Forms.View.Details;
//
// resultsMenuStrip
//
this.resultsMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.olvHosts.CellEditUseWholeCell = false;
this.olvHosts.ContextMenuStrip = this.resultsMenuStrip;
this.olvHosts.Cursor = System.Windows.Forms.Cursors.Default;
this.olvHosts.DecorateLines = true;
this.olvHosts.FullRowSelect = true;
this.olvHosts.GridLines = true;
this.olvHosts.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.olvHosts.HideSelection = false;
this.olvHosts.Location = new System.Drawing.Point(12, 73);
this.olvHosts.Name = "olvHosts";
this.olvHosts.ShowGroups = false;
this.olvHosts.Size = new System.Drawing.Size(884, 290);
this.olvHosts.TabIndex = 26;
this.olvHosts.UseCompatibleStateImageBehavior = false;
this.olvHosts.View = System.Windows.Forms.View.Details;
//
// resultsMenuStrip
//
this.resultsMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.importHTTPToolStripMenuItem,
this.importHTTPSToolStripMenuItem,
this.importRDPToolStripMenuItem,
@@ -157,75 +163,77 @@ namespace mRemoteNG.UI.Window
this.importSSH2ToolStripMenuItem,
this.importTelnetToolStripMenuItem,
this.importVNCToolStripMenuItem});
this.resultsMenuStrip.Name = "resultsMenuStrip";
this.resultsMenuStrip.Size = new System.Drawing.Size(150, 158);
//
// importHTTPToolStripMenuItem
//
this.importHTTPToolStripMenuItem.Name = "importHTTPToolStripMenuItem";
this.importHTTPToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
this.importHTTPToolStripMenuItem.Text = "Import HTTP";
this.importHTTPToolStripMenuItem.Click += new System.EventHandler(this.importHTTPToolStripMenuItem_Click);
//
// importHTTPSToolStripMenuItem
//
this.importHTTPSToolStripMenuItem.Name = "importHTTPSToolStripMenuItem";
this.importHTTPSToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
this.importHTTPSToolStripMenuItem.Text = "Import HTTPS";
this.importHTTPSToolStripMenuItem.Click += new System.EventHandler(this.importHTTPSToolStripMenuItem_Click);
//
// importRDPToolStripMenuItem
//
this.importRDPToolStripMenuItem.Name = "importRDPToolStripMenuItem";
this.importRDPToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
this.importRDPToolStripMenuItem.Text = "Import RDP";
this.importRDPToolStripMenuItem.Click += new System.EventHandler(this.importRDPToolStripMenuItem_Click);
//
// importRloginToolStripMenuItem
//
this.importRloginToolStripMenuItem.Name = "importRloginToolStripMenuItem";
this.importRloginToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
this.importRloginToolStripMenuItem.Text = "Import Rlogin";
this.importRloginToolStripMenuItem.Click += new System.EventHandler(this.importRloginToolStripMenuItem_Click);
//
// importSSH2ToolStripMenuItem
//
this.importSSH2ToolStripMenuItem.Name = "importSSH2ToolStripMenuItem";
this.importSSH2ToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
this.importSSH2ToolStripMenuItem.Text = "Import SSH2";
this.importSSH2ToolStripMenuItem.Click += new System.EventHandler(this.importSSH2ToolStripMenuItem_Click);
//
// importTelnetToolStripMenuItem
//
this.importTelnetToolStripMenuItem.Name = "importTelnetToolStripMenuItem";
this.importTelnetToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
this.importTelnetToolStripMenuItem.Text = "Import Telnet";
this.importTelnetToolStripMenuItem.Click += new System.EventHandler(this.importTelnetToolStripMenuItem_Click);
//
// importVNCToolStripMenuItem
//
this.importVNCToolStripMenuItem.Name = "importVNCToolStripMenuItem";
this.importVNCToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
this.importVNCToolStripMenuItem.Text = "Import VNC";
this.importVNCToolStripMenuItem.Click += new System.EventHandler(this.importVNCToolStripMenuItem_Click);
//
// btnImport
//
this.btnImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnImport.Location = new System.Drawing.Point(594, 3);
this.btnImport.Name = "btnImport";
this.btnImport.Size = new System.Drawing.Size(75, 31);
this.btnImport.TabIndex = 101;
this.btnImport.Text = "&Import";
this.btnImport.UseVisualStyleBackColor = true;
this.btnImport.Click += new System.EventHandler(this.btnImport_Click);
//
// cbProtocol
//
this.cbProtocol.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.cbProtocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbProtocol.FormattingEnabled = true;
this.cbProtocol.Items.AddRange(new object[] {
this.resultsMenuStrip.Name = "resultsMenuStrip";
this.resultsMenuStrip.Size = new System.Drawing.Size(150, 158);
//
// importHTTPToolStripMenuItem
//
this.importHTTPToolStripMenuItem.Name = "importHTTPToolStripMenuItem";
this.importHTTPToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
this.importHTTPToolStripMenuItem.Text = "Import HTTP";
this.importHTTPToolStripMenuItem.Click += new System.EventHandler(this.importHTTPToolStripMenuItem_Click);
//
// importHTTPSToolStripMenuItem
//
this.importHTTPSToolStripMenuItem.Name = "importHTTPSToolStripMenuItem";
this.importHTTPSToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
this.importHTTPSToolStripMenuItem.Text = "Import HTTPS";
this.importHTTPSToolStripMenuItem.Click += new System.EventHandler(this.importHTTPSToolStripMenuItem_Click);
//
// importRDPToolStripMenuItem
//
this.importRDPToolStripMenuItem.Name = "importRDPToolStripMenuItem";
this.importRDPToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
this.importRDPToolStripMenuItem.Text = "Import RDP";
this.importRDPToolStripMenuItem.Click += new System.EventHandler(this.importRDPToolStripMenuItem_Click);
//
// importRloginToolStripMenuItem
//
this.importRloginToolStripMenuItem.Name = "importRloginToolStripMenuItem";
this.importRloginToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
this.importRloginToolStripMenuItem.Text = "Import Rlogin";
this.importRloginToolStripMenuItem.Click += new System.EventHandler(this.importRloginToolStripMenuItem_Click);
//
// importSSH2ToolStripMenuItem
//
this.importSSH2ToolStripMenuItem.Name = "importSSH2ToolStripMenuItem";
this.importSSH2ToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
this.importSSH2ToolStripMenuItem.Text = "Import SSH2";
this.importSSH2ToolStripMenuItem.Click += new System.EventHandler(this.importSSH2ToolStripMenuItem_Click);
//
// importTelnetToolStripMenuItem
//
this.importTelnetToolStripMenuItem.Name = "importTelnetToolStripMenuItem";
this.importTelnetToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
this.importTelnetToolStripMenuItem.Text = "Import Telnet";
this.importTelnetToolStripMenuItem.Click += new System.EventHandler(this.importTelnetToolStripMenuItem_Click);
//
// importVNCToolStripMenuItem
//
this.importVNCToolStripMenuItem.Name = "importVNCToolStripMenuItem";
this.importVNCToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
this.importVNCToolStripMenuItem.Text = "Import VNC";
this.importVNCToolStripMenuItem.Click += new System.EventHandler(this.importVNCToolStripMenuItem_Click);
//
// btnImport
//
this.btnImport._mice = mRemoteNG.UI.Controls.Base.NGButton.MouseState.HOVER;
this.btnImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnImport.Location = new System.Drawing.Point(798, 3);
this.btnImport.Name = "btnImport";
this.btnImport.Size = new System.Drawing.Size(75, 31);
this.btnImport.TabIndex = 101;
this.btnImport.Text = "&Import";
this.btnImport.UseVisualStyleBackColor = true;
this.btnImport.Click += new System.EventHandler(this.btnImport_Click);
//
// cbProtocol
//
this.cbProtocol._mice = mRemoteNG.UI.Controls.Base.NGComboBox.MouseState.HOVER;
this.cbProtocol.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.cbProtocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbProtocol.FormattingEnabled = true;
this.cbProtocol.Items.AddRange(new object[] {
"SSH2",
"Telnet",
"HTTP",
@@ -233,190 +241,214 @@ namespace mRemoteNG.UI.Window
"Rlogin",
"RDP",
"VNC"});
this.cbProtocol.Location = new System.Drawing.Point(157, 6);
this.cbProtocol.Name = "cbProtocol";
this.cbProtocol.Size = new System.Drawing.Size(122, 21);
this.cbProtocol.TabIndex = 28;
//
// lblOnlyImport
//
this.lblOnlyImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblOnlyImport.AutoSize = true;
this.lblOnlyImport.Location = new System.Drawing.Point(5, 13);
this.lblOnlyImport.Name = "lblOnlyImport";
this.lblOnlyImport.Size = new System.Drawing.Size(104, 13);
this.lblOnlyImport.TabIndex = 1;
this.lblOnlyImport.Text = "Protocol to import:";
//
// clmHost
//
this.clmHost.AspectName = "HostIPorName";
this.clmHost.FillsFreeSpace = true;
this.clmHost.Text = "Hostname/IP";
this.clmHost.Width = 130;
//
// clmSSH
//
this.clmSSH.AspectName = "SshName";
this.clmSSH.Text = "SSH";
this.clmSSH.Width = 50;
//
// clmTelnet
//
this.clmTelnet.AspectName = "TelnetName";
this.clmTelnet.Text = "Telnet";
this.clmTelnet.Width = 50;
//
// clmHTTP
//
this.clmHTTP.AspectName = "HttpName";
this.clmHTTP.Text = "HTTP";
this.clmHTTP.Width = 50;
//
// clmHTTPS
//
this.clmHTTPS.AspectName = "HttpsName";
this.clmHTTPS.Text = "HTTPS";
this.clmHTTPS.Width = 50;
//
// clmRlogin
//
this.clmRlogin.AspectName = "RloginName";
this.clmRlogin.Text = "Rlogin";
this.clmRlogin.Width = 50;
//
// clmRDP
//
this.clmRDP.AspectName = "RdpName";
this.clmRDP.Text = "RDP";
this.clmRDP.Width = 50;
//
// clmVNC
//
this.clmVNC.AspectName = "VncName";
this.clmVNC.Text = "VNC";
this.clmVNC.Width = 50;
//
// clmOpenPorts
//
this.clmOpenPorts.AspectName = "OpenPortsName";
this.clmOpenPorts.FillsFreeSpace = true;
this.clmOpenPorts.Text = "Open Ports";
this.clmOpenPorts.Width = 150;
//
// clmClosedPorts
//
this.clmClosedPorts.AspectName = "ClosedPortsName";
this.clmClosedPorts.FillsFreeSpace = true;
this.clmClosedPorts.Text = "Closed Ports";
this.clmClosedPorts.Width = 150;
//
// prgBar
//
this.prgBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
this.cbProtocol.Location = new System.Drawing.Point(157, 6);
this.cbProtocol.Name = "cbProtocol";
this.cbProtocol.Size = new System.Drawing.Size(122, 21);
this.cbProtocol.TabIndex = 28;
//
// lblOnlyImport
//
this.lblOnlyImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblOnlyImport.AutoSize = true;
this.lblOnlyImport.Location = new System.Drawing.Point(5, 13);
this.lblOnlyImport.Name = "lblOnlyImport";
this.lblOnlyImport.Size = new System.Drawing.Size(104, 13);
this.lblOnlyImport.TabIndex = 1;
this.lblOnlyImport.Text = "Protocol to import:";
//
// clmHost
//
this.clmHost.AspectName = "HostIPorName";
this.clmHost.FillsFreeSpace = true;
this.clmHost.Text = "Hostname/IP";
this.clmHost.Width = 130;
//
// clmSSH
//
this.clmSSH.AspectName = "SshName";
this.clmSSH.Text = "SSH";
this.clmSSH.Width = 50;
//
// clmTelnet
//
this.clmTelnet.AspectName = "TelnetName";
this.clmTelnet.Text = "Telnet";
this.clmTelnet.Width = 50;
//
// clmHTTP
//
this.clmHTTP.AspectName = "HttpName";
this.clmHTTP.Text = "HTTP";
this.clmHTTP.Width = 50;
//
// clmHTTPS
//
this.clmHTTPS.AspectName = "HttpsName";
this.clmHTTPS.Text = "HTTPS";
this.clmHTTPS.Width = 50;
//
// clmRlogin
//
this.clmRlogin.AspectName = "RloginName";
this.clmRlogin.Text = "Rlogin";
this.clmRlogin.Width = 50;
//
// clmRDP
//
this.clmRDP.AspectName = "RdpName";
this.clmRDP.Text = "RDP";
this.clmRDP.Width = 50;
//
// clmVNC
//
this.clmVNC.AspectName = "VncName";
this.clmVNC.Text = "VNC";
this.clmVNC.Width = 50;
//
// clmOpenPorts
//
this.clmOpenPorts.AspectName = "OpenPortsName";
this.clmOpenPorts.FillsFreeSpace = true;
this.clmOpenPorts.Text = "Open Ports";
this.clmOpenPorts.Width = 150;
//
// clmClosedPorts
//
this.clmClosedPorts.AspectName = "ClosedPortsName";
this.clmClosedPorts.FillsFreeSpace = true;
this.clmClosedPorts.Text = "Closed Ports";
this.clmClosedPorts.Width = 150;
//
// prgBar
//
this.prgBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.prgBar.Location = new System.Drawing.Point(12, 50);
this.prgBar.Name = "prgBar";
this.prgBar.Size = new System.Drawing.Size(571, 16);
this.prgBar.Step = 1;
this.prgBar.TabIndex = 28;
//
// pnlPorts
//
this.pnlPorts.Controls.Add(this.portEnd);
this.pnlPorts.Controls.Add(this.portStart);
this.pnlPorts.Controls.Add(this.Label2);
this.pnlPorts.Controls.Add(this.Label1);
this.pnlPorts.Location = new System.Drawing.Point(284, 7);
this.pnlPorts.Name = "pnlPorts";
this.pnlPorts.Size = new System.Drawing.Size(307, 38);
this.pnlPorts.TabIndex = 18;
//
// portEnd
//
this.portEnd.Location = new System.Drawing.Point(232, 12);
this.portEnd.Maximum = new decimal(new int[] {
this.prgBar.Location = new System.Drawing.Point(15, 51);
this.prgBar.Name = "prgBar";
this.prgBar.Size = new System.Drawing.Size(775, 16);
this.prgBar.Step = 1;
this.prgBar.TabIndex = 28;
//
// pnlPorts
//
this.pnlPorts.Controls.Add(this.numericSelectorTimeout);
this.pnlPorts.Controls.Add(this.lblTimeout);
this.pnlPorts.Controls.Add(this.portEnd);
this.pnlPorts.Controls.Add(this.portStart);
this.pnlPorts.Controls.Add(this.Label2);
this.pnlPorts.Controls.Add(this.Label1);
this.pnlPorts.Location = new System.Drawing.Point(284, 7);
this.pnlPorts.Name = "pnlPorts";
this.pnlPorts.Size = new System.Drawing.Size(506, 38);
this.pnlPorts.TabIndex = 18;
//
// numericSelectorTimeout
//
this.numericSelectorTimeout.Location = new System.Drawing.Point(436, 12);
this.numericSelectorTimeout.Maximum = new decimal(new int[] {
2147482,
0,
0,
0});
this.numericSelectorTimeout.Name = "numericSelectorTimeout";
this.numericSelectorTimeout.Size = new System.Drawing.Size(67, 22);
this.numericSelectorTimeout.TabIndex = 17;
//
// lblTimeout
//
this.lblTimeout.AutoSize = true;
this.lblTimeout.Location = new System.Drawing.Point(315, 14);
this.lblTimeout.Name = "lblTimeout";
this.lblTimeout.Size = new System.Drawing.Size(102, 13);
this.lblTimeout.TabIndex = 16;
this.lblTimeout.Text = "Timeout (seconds):";
//
// portEnd
//
this.portEnd.Location = new System.Drawing.Point(232, 12);
this.portEnd.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.portEnd.Name = "portEnd";
this.portEnd.Size = new System.Drawing.Size(67, 22);
this.portEnd.TabIndex = 15;
this.portEnd.Enter += new System.EventHandler(this.portEnd_Enter);
//
// portStart
//
this.portStart.Location = new System.Drawing.Point(79, 12);
this.portStart.Maximum = new decimal(new int[] {
this.portEnd.Name = "portEnd";
this.portEnd.Size = new System.Drawing.Size(67, 22);
this.portEnd.TabIndex = 15;
this.portEnd.Enter += new System.EventHandler(this.portEnd_Enter);
//
// portStart
//
this.portStart.Location = new System.Drawing.Point(79, 12);
this.portStart.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.portStart.Name = "portStart";
this.portStart.Size = new System.Drawing.Size(67, 22);
this.portStart.TabIndex = 5;
this.portStart.Enter += new System.EventHandler(this.portStart_Enter);
//
// Label2
//
this.Label2.AutoSize = true;
this.Label2.Location = new System.Drawing.Point(162, 16);
this.Label2.Name = "Label2";
this.Label2.Size = new System.Drawing.Size(54, 13);
this.Label2.TabIndex = 10;
this.Label2.Text = "End Port:";
//
// Label1
//
this.Label1.AutoSize = true;
this.Label1.Location = new System.Drawing.Point(3, 17);
this.Label1.Name = "Label1";
this.Label1.Size = new System.Drawing.Size(58, 13);
this.Label1.TabIndex = 0;
this.Label1.Text = "Start Port:";
//
// pnlImport
//
this.pnlImport.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
this.portStart.Name = "portStart";
this.portStart.Size = new System.Drawing.Size(67, 22);
this.portStart.TabIndex = 5;
this.portStart.Enter += new System.EventHandler(this.portStart_Enter);
//
// Label2
//
this.Label2.AutoSize = true;
this.Label2.Location = new System.Drawing.Point(160, 14);
this.Label2.Name = "Label2";
this.Label2.Size = new System.Drawing.Size(54, 13);
this.Label2.TabIndex = 10;
this.Label2.Text = "End Port:";
//
// Label1
//
this.Label1.AutoSize = true;
this.Label1.Location = new System.Drawing.Point(7, 14);
this.Label1.Name = "Label1";
this.Label1.Size = new System.Drawing.Size(58, 13);
this.Label1.TabIndex = 0;
this.Label1.Text = "Start Port:";
//
// pnlImport
//
this.pnlImport.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pnlImport.Controls.Add(this.btnImport);
this.pnlImport.Controls.Add(this.lblOnlyImport);
this.pnlImport.Controls.Add(this.cbProtocol);
this.pnlImport.Location = new System.Drawing.Point(12, 369);
this.pnlImport.Name = "pnlImport";
this.pnlImport.Size = new System.Drawing.Size(680, 40);
this.pnlImport.TabIndex = 102;
//
// PortScanWindow
//
this.AcceptButton = this.btnImport;
this.ClientSize = new System.Drawing.Size(704, 421);
this.Controls.Add(this.pnlImport);
this.Controls.Add(this.olvHosts);
this.Controls.Add(this.pnlPorts);
this.Controls.Add(this.prgBar);
this.Controls.Add(this.btnScan);
this.Controls.Add(this.lblEndIP);
this.Controls.Add(this.lblStartIP);
this.Controls.Add(this.ipEnd);
this.Controls.Add(this.ipStart);
this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "PortScanWindow";
this.TabText = "Port Scan";
this.Text = "Port Scan";
this.Load += new System.EventHandler(this.PortScan_Load);
((System.ComponentModel.ISupportInitialize)(this.olvHosts)).EndInit();
this.resultsMenuStrip.ResumeLayout(false);
this.pnlPorts.ResumeLayout(false);
this.pnlPorts.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.portEnd)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.portStart)).EndInit();
this.pnlImport.ResumeLayout(false);
this.pnlImport.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
this.pnlImport.Controls.Add(this.btnImport);
this.pnlImport.Controls.Add(this.lblOnlyImport);
this.pnlImport.Controls.Add(this.cbProtocol);
this.pnlImport.Location = new System.Drawing.Point(12, 369);
this.pnlImport.Name = "pnlImport";
this.pnlImport.Size = new System.Drawing.Size(884, 40);
this.pnlImport.TabIndex = 102;
//
// PortScanWindow
//
this.AcceptButton = this.btnImport;
this.ClientSize = new System.Drawing.Size(908, 421);
this.Controls.Add(this.pnlImport);
this.Controls.Add(this.olvHosts);
this.Controls.Add(this.pnlPorts);
this.Controls.Add(this.prgBar);
this.Controls.Add(this.btnScan);
this.Controls.Add(this.lblEndIP);
this.Controls.Add(this.lblStartIP);
this.Controls.Add(this.ipEnd);
this.Controls.Add(this.ipStart);
this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "PortScanWindow";
this.TabText = "Port Scan";
this.Text = "Port Scan";
this.Load += new System.EventHandler(this.PortScan_Load);
((System.ComponentModel.ISupportInitialize)(this.olvHosts)).EndInit();
this.resultsMenuStrip.ResumeLayout(false);
this.pnlPorts.ResumeLayout(false);
this.pnlPorts.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numericSelectorTimeout)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.portEnd)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.portStart)).EndInit();
this.pnlImport.ResumeLayout(false);
this.pnlImport.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
internal System.Windows.Forms.Panel pnlImport;
@@ -431,5 +463,7 @@ namespace mRemoteNG.UI.Window
private System.Windows.Forms.ToolStripMenuItem importSSH2ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem importTelnetToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem importVNCToolStripMenuItem;
}
private System.Windows.Forms.Label lblTimeout;
private Controls.Base.NGNumericUpDown numericSelectorTimeout;
}
}

View File

@@ -90,6 +90,7 @@ namespace mRemoteNG.UI.Window
olvHosts.Columns.AddRange(new[]{clmHost, clmSSH, clmTelnet, clmHTTP, clmHTTPS, clmRlogin, clmRDP, clmVNC, clmOpenPorts, clmClosedPorts});
ShowImportControls(true);
cbProtocol.SelectedIndex = 0;
numericSelectorTimeout.Value = 5;
}
catch (Exception ex)
{
@@ -147,6 +148,7 @@ namespace mRemoteNG.UI.Window
clmClosedPorts.Text = Language.strClosedPorts;
Label2.Text = $"{Language.strEndPort}:";
Label1.Text = $"{Language.strStartPort}:";
lblTimeout.Text = $"{Language.TimeoutInSeconds}";
TabText = Language.strMenuPortScan;
Text = Language.strMenuPortScan;
}
@@ -176,7 +178,7 @@ namespace mRemoteNG.UI.Window
System.Net.IPAddress ipAddressStart = System.Net.IPAddress.Parse(ipStart.Text);
System.Net.IPAddress ipAddressEnd = System.Net.IPAddress.Parse(ipEnd.Text);
_portScanner = new PortScanner(ipAddressStart, ipAddressEnd, (int) portStart.Value, (int) portEnd.Value);
_portScanner = new PortScanner(ipAddressStart, ipAddressEnd, (int) portStart.Value, (int) portEnd.Value, ((int)numericSelectorTimeout.Value)*1000);
_portScanner.BeginHostScan += PortScanner_BeginHostScan;
_portScanner.HostScanned += PortScanner_HostScanned;

View File

@@ -167,15 +167,15 @@
<Compile Include="Config\Serializers\ISecureSerializer.cs" />
<Compile Include="Config\Serializers\MiscSerializers\ActiveDirectoryDeserializer.cs" />
<Compile Include="Config\Serializers\CredentialProviderSerializer\CredentialRepositoryListSerializer.cs" />
<Compile Include="Config\Serializers\MiscSerializers\CsvConnectionsDeserializerMremotengFormat.cs" />
<Compile Include="Config\Serializers\MiscSerializers\CsvConnectionsSerializerMremotengFormat.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\Csv\CsvConnectionsDeserializerMremotengFormat.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\Csv\CsvConnectionsSerializerMremotengFormat.cs" />
<Compile Include="Config\Serializers\DataTableDeserializer.cs" />
<Compile Include="Config\Serializers\DataTableSerializer.cs" />
<Compile Include="Config\Serializers\MiscSerializers\PortScanDeserializer.cs" />
<Compile Include="Config\Serializers\MiscSerializers\PuttyConnectionManagerDeserializer.cs" />
<Compile Include="Config\Serializers\MiscSerializers\RemoteDesktopConnectionDeserializer.cs" />
<Compile Include="Config\Serializers\MiscSerializers\RemoteDesktopConnectionManagerDeserializer.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\XmlConnectionNodeSerializer26.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\Xml\XmlConnectionNodeSerializer26.cs" />
<Compile Include="Config\Serializers\Versioning\SqlDatabaseVersionRetriever.cs" />
<Compile Include="Config\Serializers\Versioning\IVersionUpgrader.cs" />
<Compile Include="Config\Serializers\Versioning\SqlVersion22To23Upgrader.cs" />
@@ -188,17 +188,17 @@
<Compile Include="Config\Serializers\IDeserializer.cs" />
<Compile Include="Config\Import\IConnectionImporter.cs" />
<Compile Include="Config\Serializers\ISerializer.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\XmlConnectionsDocumentCompiler.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\XmlConnectionsDocumentEncryptor.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\XmlConnectionsSerializer.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\Xml\XmlConnectionsDocumentCompiler.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\Xml\XmlConnectionsDocumentEncryptor.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\Xml\XmlConnectionsSerializer.cs" />
<Compile Include="Config\DataProviders\FileDataProvider.cs" />
<Compile Include="Config\DataProviders\IDataProvider.cs" />
<Compile Include="Config\Connections\Multiuser\SqlConnectionsUpdateChecker.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\XmlConnectionsDeserializer.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\Xml\XmlConnectionsDeserializer.cs" />
<Compile Include="Config\Putty\PuttySessionChangedEventArgs.cs" />
<Compile Include="Config\Serializers\CredentialSerializer\XmlCredentialRecordDeserializer.cs" />
<Compile Include="Config\Serializers\CredentialSerializer\XmlCredentialRecordSerializer.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\XmlRootNodeSerializer.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\Xml\XmlRootNodeSerializer.cs" />
<Compile Include="Config\Serializers\ConfConsEnsureConnectionsHaveIds.cs" />
<Compile Include="Config\Settings\DockPanelLayoutSerializer.cs" />
<Compile Include="Config\Settings\ExternalAppsLoader.cs" />
@@ -321,7 +321,7 @@
<Compile Include="Tools\ExternalToolsService.cs" />
<Compile Include="Tools\ExternalToolsTypeConverter.cs" />
<Compile Include="Tools\CustomCollections\INotifyCollectionUpdated.cs" />
<Compile Include="Tools\Maybe.cs" />
<Compile Include="Tools\Optional.cs" />
<Compile Include="Tools\MultiSSHController.cs" />
<Compile Include="Tools\MouseClickSimulator.cs" />
<Compile Include="Tools\NotificationAreaIcon.cs" />
@@ -964,9 +964,10 @@
<None Include="Schemas\mremoteng_confcons_v2_7.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Schemas\mremoteng_confcons_v2_6.xsd">
<Content Include="Schemas\mremoteng_confcons_v2_6.xsd">
<SubType>Designer</SubType>
</None>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="Schemas\mremoteng_credrepo_list_v1_0.xsd">
<SubType>Designer</SubType>
</None>