XmlConnectionDeserializer now creates a connectiontreemodel which is turned into a treeview by ConnectionTreeViewBuilder

This commit is contained in:
David Sparer
2016-08-19 15:28:12 -06:00
parent 003793b082
commit ccaa70c1a4
9 changed files with 405 additions and 100 deletions

View File

@@ -0,0 +1,101 @@
using System.Collections.Generic;
using System.Linq;
using mRemoteNG.Config.Connections;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Tree;
using mRemoteNGTests.Properties;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Connections
{
public class XmlConnectionsDeserializerTests
{
private XmlConnectionsDeserializer _xmlConnectionsDeserializer;
private ConnectionTreeModel _connectionTreeModel;
[SetUp]
public void Setup()
{
_xmlConnectionsDeserializer = new XmlConnectionsDeserializer(Resources.TestConfCons);
_connectionTreeModel = _xmlConnectionsDeserializer.Deserialize();
}
[TearDown]
public void Teardown()
{
_xmlConnectionsDeserializer = null;
_connectionTreeModel = null;
}
[Test]
public void DeserializingCreatesRootNode()
{
Assert.That(_connectionTreeModel.RootNodes, Is.Not.Empty);
}
[Test]
public void RootNodeHasThreeChildren()
{
var connectionRoot = _connectionTreeModel.RootNodes[0];
Assert.That(connectionRoot.Children.Count, Is.EqualTo(3));
}
[Test]
public void RootContainsFolder1()
{
var connectionRoot = _connectionTreeModel.RootNodes[0];
Assert.That(ContainsNodeNamed("Folder1", connectionRoot.Children), Is.True);
}
[Test]
public void Folder1ContainsThreeConnections()
{
var connectionRoot = _connectionTreeModel.RootNodes[0];
var folder1 = GetFolderNamed("Folder1", connectionRoot.Children);
var folder1ConnectionCount = folder1?.Children.Count(node => !(node is ContainerInfo));
Assert.That(folder1ConnectionCount, Is.EqualTo(3));
}
[Test]
public void Folder2ContainsThreeNodes()
{
var connectionRoot = _connectionTreeModel.RootNodes[0];
var folder2 = GetFolderNamed("Folder2", connectionRoot.Children);
var folder1Count = folder2?.Children.Count();
Assert.That(folder1Count, Is.EqualTo(3));
}
[Test]
public void Folder21HasTwoNodes()
{
var connectionRoot = _connectionTreeModel.RootNodes[0];
var folder2 = GetFolderNamed("Folder2", connectionRoot.Children);
var folder21 = GetFolderNamed("Folder2.1", folder2.Children);
Assert.That(folder21.Children.Count, Is.EqualTo(2));
}
[Test]
public void Folder211HasOneConnection()
{
var connectionRoot = _connectionTreeModel.RootNodes[0];
var folder2 = GetFolderNamed("Folder2", connectionRoot.Children);
var folder21 = GetFolderNamed("Folder2.1", folder2.Children);
var folder211 = GetFolderNamed("Folder2.1.1", folder21.Children);
var connectionCount = folder211.Children.Count(node => !(node is ContainerInfo));
Assert.That(connectionCount, Is.EqualTo(1));
}
private bool ContainsNodeNamed(string name, IEnumerable<ConnectionInfo> list)
{
return list.Any(node => node.Name == name);
}
private ContainerInfo GetFolderNamed(string name, IEnumerable<ConnectionInfo> list)
{
var folder = list.First(node => (node is ContainerInfo && node.Name == name)) as ContainerInfo;
return folder;
}
}
}

View File

@@ -0,0 +1,74 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace mRemoteNGTests.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("mRemoteNGTests.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
///&lt;Connections Name=&quot;Connections&quot; Export=&quot;False&quot; Protected=&quot;95syzRuZ4mRxpNkZQzoyX8SDpQXLyMq3GncO8o4SyTBoYvn3TAWgn05ZEU2DrjkM&quot; ConfVersion=&quot;2.5&quot;&gt;
/// &lt;Node Name=&quot;Folder1&quot; Type=&quot;Container&quot; Expanded=&quot;True&quot; Descr=&quot;&quot; Icon=&quot;mRemoteNG&quot; Panel=&quot;General&quot; Username=&quot;&quot; Domain=&quot;&quot; Password=&quot;&quot; Hostname=&quot;&quot; Protocol=&quot;ICA&quot; PuttySession=&quot;Default Settings&quot; Port=&quot;1494&quot; ConnectToConsole=&quot;False&quot; UseCredSsp=&quot;True&quot; RenderingEngine=&quot;IE&quot; ICAEncryptionStrength=&quot;Encr128Bit&quot; RDPAuthenticationLevel=&quot; [rest of string was truncated]&quot;;.
/// </summary>
internal static string TestConfCons {
get {
return ResourceManager.GetString("TestConfCons", resourceCulture);
}
}
}
}

View File

@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="TestConfCons" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TestConfCons.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
</root>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<Connections Name="Connections" Export="False" Protected="95syzRuZ4mRxpNkZQzoyX8SDpQXLyMq3GncO8o4SyTBoYvn3TAWgn05ZEU2DrjkM" ConfVersion="2.5">
<Node Name="Folder1" Type="Container" Expanded="True" Descr="" Icon="mRemoteNG" Panel="General" Username="" Domain="" Password="" Hostname="" Protocol="ICA" PuttySession="Default Settings" Port="1494" ConnectToConsole="False" UseCredSsp="True" RenderingEngine="IE" ICAEncryptionStrength="Encr128Bit" RDPAuthenticationLevel="NoAuth" LoadBalanceInfo="" Colors="Colors16Bit" Resolution="FitToWindow" AutomaticResize="True" DisplayWallpaper="False" DisplayThemes="False" EnableFontSmoothing="False" EnableDesktopComposition="False" CacheBitmaps="False" RedirectDiskDrives="False" RedirectPorts="False" RedirectPrinters="False" RedirectSmartCards="False" RedirectSound="DoNotPlay" RedirectKeys="False" Connected="False" PreExtApp="" PostExtApp="" MacAddress="" UserField="" ExtApp="" VNCCompression="CompNone" VNCEncoding="EncHextile" VNCAuthMode="AuthVNC" VNCProxyType="ProxyNone" VNCProxyIP="" VNCProxyPort="0" VNCProxyUsername="" VNCProxyPassword="" VNCColors="ColNormal" VNCSmartSizeMode="SmartSAspect" VNCViewOnly="False" RDGatewayUsageMethod="Never" RDGatewayHostname="" RDGatewayUseConnectionCredentials="Yes" RDGatewayUsername="" RDGatewayPassword="" RDGatewayDomain="" InheritCacheBitmaps="False" InheritColors="False" InheritDescription="False" InheritDisplayThemes="False" InheritDisplayWallpaper="False" InheritEnableFontSmoothing="False" InheritEnableDesktopComposition="False" InheritDomain="False" InheritIcon="False" InheritPanel="False" InheritPassword="False" InheritPort="False" InheritProtocol="False" InheritPuttySession="False" InheritRedirectDiskDrives="False" InheritRedirectKeys="False" InheritRedirectPorts="False" InheritRedirectPrinters="False" InheritRedirectSmartCards="False" InheritRedirectSound="False" InheritResolution="False" InheritAutomaticResize="False" InheritUseConsoleSession="False" InheritUseCredSsp="False" InheritRenderingEngine="False" InheritUsername="False" InheritICAEncryptionStrength="False" InheritRDPAuthenticationLevel="False" InheritLoadBalanceInfo="False" InheritPreExtApp="False" InheritPostExtApp="False" InheritMacAddress="False" InheritUserField="False" InheritExtApp="False" InheritVNCCompression="False" InheritVNCEncoding="False" InheritVNCAuthMode="False" InheritVNCProxyType="False" InheritVNCProxyIP="False" InheritVNCProxyPort="False" InheritVNCProxyUsername="False" InheritVNCProxyPassword="False" InheritVNCColors="False" InheritVNCSmartSizeMode="False" InheritVNCViewOnly="False" InheritRDGatewayUsageMethod="False" InheritRDGatewayHostname="False" InheritRDGatewayUseConnectionCredentials="False" InheritRDGatewayUsername="False" InheritRDGatewayPassword="False" InheritRDGatewayDomain="False">
<Node Name="Connection1.1" Type="Connection" Descr="" Icon="mRemoteNG" Panel="General" Username="userFolder1" Domain="domainFolder1" Password="u1cFYiN+39rnIjT9JOVgqzF0LwDD08ON/32tXV6aMw8=" Hostname="" Protocol="RDP" PuttySession="Default Settings" Port="3389" ConnectToConsole="False" UseCredSsp="True" RenderingEngine="IE" ICAEncryptionStrength="EncrBasic" RDPAuthenticationLevel="NoAuth" LoadBalanceInfo="" Colors="Colors16Bit" Resolution="FitToWindow" AutomaticResize="True" DisplayWallpaper="False" DisplayThemes="False" EnableFontSmoothing="False" EnableDesktopComposition="False" CacheBitmaps="False" RedirectDiskDrives="False" RedirectPorts="False" RedirectPrinters="False" RedirectSmartCards="False" RedirectSound="DoNotPlay" RedirectKeys="False" Connected="False" PreExtApp="" PostExtApp="" MacAddress="" UserField="" ExtApp="" VNCCompression="CompNone" VNCEncoding="EncHextile" VNCAuthMode="AuthVNC" VNCProxyType="ProxyNone" VNCProxyIP="" VNCProxyPort="0" VNCProxyUsername="" VNCProxyPassword="" VNCColors="ColNormal" VNCSmartSizeMode="SmartSAspect" VNCViewOnly="False" RDGatewayUsageMethod="Never" RDGatewayHostname="" RDGatewayUseConnectionCredentials="Yes" RDGatewayUsername="" RDGatewayPassword="" RDGatewayDomain="" InheritCacheBitmaps="False" InheritColors="False" InheritDescription="False" InheritDisplayThemes="False" InheritDisplayWallpaper="False" InheritEnableFontSmoothing="False" InheritEnableDesktopComposition="False" InheritDomain="False" InheritIcon="False" InheritPanel="False" InheritPassword="False" InheritPort="False" InheritProtocol="False" InheritPuttySession="False" InheritRedirectDiskDrives="False" InheritRedirectKeys="False" InheritRedirectPorts="False" InheritRedirectPrinters="False" InheritRedirectSmartCards="False" InheritRedirectSound="False" InheritResolution="False" InheritAutomaticResize="False" InheritUseConsoleSession="False" InheritUseCredSsp="False" InheritRenderingEngine="False" InheritUsername="False" InheritICAEncryptionStrength="False" InheritRDPAuthenticationLevel="False" InheritLoadBalanceInfo="False" InheritPreExtApp="False" InheritPostExtApp="False" InheritMacAddress="False" InheritUserField="False" InheritExtApp="False" InheritVNCCompression="False" InheritVNCEncoding="False" InheritVNCAuthMode="False" InheritVNCProxyType="False" InheritVNCProxyIP="False" InheritVNCProxyPort="False" InheritVNCProxyUsername="False" InheritVNCProxyPassword="False" InheritVNCColors="False" InheritVNCSmartSizeMode="False" InheritVNCViewOnly="False" InheritRDGatewayUsageMethod="False" InheritRDGatewayHostname="False" InheritRDGatewayUseConnectionCredentials="False" InheritRDGatewayUsername="False" InheritRDGatewayPassword="False" InheritRDGatewayDomain="False" />
<Node Name="Connection1.2" Type="Connection" Descr="" Icon="mRemoteNG" Panel="General" Username="userFolder1" Domain="domainFolder1" Password="UVhIa8sJMvLGX56d8ZG4PMZak6lwURlkN4UYOksjeqw=" Hostname="" Protocol="RDP" PuttySession="Default Settings" Port="3389" ConnectToConsole="False" UseCredSsp="True" RenderingEngine="IE" ICAEncryptionStrength="EncrBasic" RDPAuthenticationLevel="NoAuth" LoadBalanceInfo="" Colors="Colors16Bit" Resolution="FitToWindow" AutomaticResize="True" DisplayWallpaper="False" DisplayThemes="False" EnableFontSmoothing="False" EnableDesktopComposition="False" CacheBitmaps="False" RedirectDiskDrives="False" RedirectPorts="False" RedirectPrinters="False" RedirectSmartCards="False" RedirectSound="DoNotPlay" RedirectKeys="False" Connected="False" PreExtApp="" PostExtApp="" MacAddress="" UserField="" ExtApp="" VNCCompression="CompNone" VNCEncoding="EncHextile" VNCAuthMode="AuthVNC" VNCProxyType="ProxyNone" VNCProxyIP="" VNCProxyPort="0" VNCProxyUsername="" VNCProxyPassword="" VNCColors="ColNormal" VNCSmartSizeMode="SmartSAspect" VNCViewOnly="False" RDGatewayUsageMethod="Never" RDGatewayHostname="" RDGatewayUseConnectionCredentials="Yes" RDGatewayUsername="" RDGatewayPassword="" RDGatewayDomain="" InheritCacheBitmaps="False" InheritColors="False" InheritDescription="False" InheritDisplayThemes="False" InheritDisplayWallpaper="False" InheritEnableFontSmoothing="False" InheritEnableDesktopComposition="False" InheritDomain="False" InheritIcon="False" InheritPanel="False" InheritPassword="False" InheritPort="False" InheritProtocol="False" InheritPuttySession="False" InheritRedirectDiskDrives="False" InheritRedirectKeys="False" InheritRedirectPorts="False" InheritRedirectPrinters="False" InheritRedirectSmartCards="False" InheritRedirectSound="False" InheritResolution="False" InheritAutomaticResize="False" InheritUseConsoleSession="False" InheritUseCredSsp="False" InheritRenderingEngine="False" InheritUsername="False" InheritICAEncryptionStrength="False" InheritRDPAuthenticationLevel="False" InheritLoadBalanceInfo="False" InheritPreExtApp="False" InheritPostExtApp="False" InheritMacAddress="False" InheritUserField="False" InheritExtApp="False" InheritVNCCompression="False" InheritVNCEncoding="False" InheritVNCAuthMode="False" InheritVNCProxyType="False" InheritVNCProxyIP="False" InheritVNCProxyPort="False" InheritVNCProxyUsername="False" InheritVNCProxyPassword="False" InheritVNCColors="False" InheritVNCSmartSizeMode="False" InheritVNCViewOnly="False" InheritRDGatewayUsageMethod="False" InheritRDGatewayHostname="False" InheritRDGatewayUseConnectionCredentials="False" InheritRDGatewayUsername="False" InheritRDGatewayPassword="False" InheritRDGatewayDomain="False" />
<Node Name="Connection1.3" Type="Connection" Descr="" Icon="mRemoteNG" Panel="General" Username="userFolder1" Domain="domainFolder1" Password="xxViioYX/CaoWnXsE1bZdE21Jj2qsz7Du3KbONMB2LU=" Hostname="" Protocol="SSH2" PuttySession="Default Settings" Port="22" ConnectToConsole="False" UseCredSsp="True" RenderingEngine="IE" ICAEncryptionStrength="EncrBasic" RDPAuthenticationLevel="NoAuth" LoadBalanceInfo="" Colors="Colors16Bit" Resolution="FitToWindow" AutomaticResize="True" DisplayWallpaper="False" DisplayThemes="False" EnableFontSmoothing="False" EnableDesktopComposition="False" CacheBitmaps="False" RedirectDiskDrives="False" RedirectPorts="False" RedirectPrinters="False" RedirectSmartCards="False" RedirectSound="DoNotPlay" RedirectKeys="False" Connected="False" PreExtApp="" PostExtApp="" MacAddress="" UserField="" ExtApp="" VNCCompression="CompNone" VNCEncoding="EncHextile" VNCAuthMode="AuthVNC" VNCProxyType="ProxyNone" VNCProxyIP="" VNCProxyPort="0" VNCProxyUsername="" VNCProxyPassword="" VNCColors="ColNormal" VNCSmartSizeMode="SmartSAspect" VNCViewOnly="False" RDGatewayUsageMethod="Never" RDGatewayHostname="" RDGatewayUseConnectionCredentials="Yes" RDGatewayUsername="" RDGatewayPassword="" RDGatewayDomain="" InheritCacheBitmaps="False" InheritColors="False" InheritDescription="False" InheritDisplayThemes="False" InheritDisplayWallpaper="False" InheritEnableFontSmoothing="False" InheritEnableDesktopComposition="False" InheritDomain="False" InheritIcon="False" InheritPanel="False" InheritPassword="False" InheritPort="False" InheritProtocol="False" InheritPuttySession="False" InheritRedirectDiskDrives="False" InheritRedirectKeys="False" InheritRedirectPorts="False" InheritRedirectPrinters="False" InheritRedirectSmartCards="False" InheritRedirectSound="False" InheritResolution="False" InheritAutomaticResize="False" InheritUseConsoleSession="False" InheritUseCredSsp="False" InheritRenderingEngine="False" InheritUsername="False" InheritICAEncryptionStrength="False" InheritRDPAuthenticationLevel="False" InheritLoadBalanceInfo="False" InheritPreExtApp="False" InheritPostExtApp="False" InheritMacAddress="False" InheritUserField="False" InheritExtApp="False" InheritVNCCompression="False" InheritVNCEncoding="False" InheritVNCAuthMode="False" InheritVNCProxyType="False" InheritVNCProxyIP="False" InheritVNCProxyPort="False" InheritVNCProxyUsername="False" InheritVNCProxyPassword="False" InheritVNCColors="False" InheritVNCSmartSizeMode="False" InheritVNCViewOnly="False" InheritRDGatewayUsageMethod="False" InheritRDGatewayHostname="False" InheritRDGatewayUseConnectionCredentials="False" InheritRDGatewayUsername="False" InheritRDGatewayPassword="False" InheritRDGatewayDomain="False" />
</Node>
<Node Name="Folder2" Type="Container" Expanded="True" Descr="" Icon="mRemoteNG" Panel="General" Username="userFolder2" Domain="folder2domain" Password="OG1YqC5B612X2z8mT8ujrcwjLB83TPEwzxpcAUfq8QI=" Hostname="" Protocol="RDP" PuttySession="Default Settings" Port="3389" ConnectToConsole="False" UseCredSsp="True" RenderingEngine="IE" ICAEncryptionStrength="EncrBasic" RDPAuthenticationLevel="NoAuth" LoadBalanceInfo="" Colors="Colors16Bit" Resolution="FitToWindow" AutomaticResize="True" DisplayWallpaper="False" DisplayThemes="False" EnableFontSmoothing="False" EnableDesktopComposition="False" CacheBitmaps="False" RedirectDiskDrives="False" RedirectPorts="False" RedirectPrinters="False" RedirectSmartCards="False" RedirectSound="DoNotPlay" RedirectKeys="False" Connected="False" PreExtApp="" PostExtApp="" MacAddress="" UserField="" ExtApp="" VNCCompression="CompNone" VNCEncoding="EncHextile" VNCAuthMode="AuthVNC" VNCProxyType="ProxyNone" VNCProxyIP="" VNCProxyPort="0" VNCProxyUsername="" VNCProxyPassword="" VNCColors="ColNormal" VNCSmartSizeMode="SmartSAspect" VNCViewOnly="False" RDGatewayUsageMethod="Never" RDGatewayHostname="" RDGatewayUseConnectionCredentials="Yes" RDGatewayUsername="" RDGatewayPassword="" RDGatewayDomain="" InheritCacheBitmaps="False" InheritColors="False" InheritDescription="False" InheritDisplayThemes="False" InheritDisplayWallpaper="False" InheritEnableFontSmoothing="False" InheritEnableDesktopComposition="False" InheritDomain="False" InheritIcon="False" InheritPanel="False" InheritPassword="False" InheritPort="False" InheritProtocol="False" InheritPuttySession="False" InheritRedirectDiskDrives="False" InheritRedirectKeys="False" InheritRedirectPorts="False" InheritRedirectPrinters="False" InheritRedirectSmartCards="False" InheritRedirectSound="False" InheritResolution="False" InheritAutomaticResize="False" InheritUseConsoleSession="False" InheritUseCredSsp="False" InheritRenderingEngine="False" InheritUsername="False" InheritICAEncryptionStrength="False" InheritRDPAuthenticationLevel="False" InheritLoadBalanceInfo="False" InheritPreExtApp="False" InheritPostExtApp="False" InheritMacAddress="False" InheritUserField="False" InheritExtApp="False" InheritVNCCompression="False" InheritVNCEncoding="False" InheritVNCAuthMode="False" InheritVNCProxyType="False" InheritVNCProxyIP="False" InheritVNCProxyPort="False" InheritVNCProxyUsername="False" InheritVNCProxyPassword="False" InheritVNCColors="False" InheritVNCSmartSizeMode="False" InheritVNCViewOnly="False" InheritRDGatewayUsageMethod="False" InheritRDGatewayHostname="False" InheritRDGatewayUseConnectionCredentials="False" InheritRDGatewayUsername="False" InheritRDGatewayPassword="False" InheritRDGatewayDomain="False">
<Node Name="Connection2.1" Type="Connection" Descr="" Icon="mRemoteNG" Panel="General" Username="usernameC21" Domain="domainC21" Password="4k/KraVW2VBeMzDDP3DXCBpAnhTK8NfsLWAiWkoBSF8=" Hostname="" Protocol="RDP" PuttySession="Default Settings" Port="3389" ConnectToConsole="False" UseCredSsp="True" RenderingEngine="IE" ICAEncryptionStrength="EncrBasic" RDPAuthenticationLevel="NoAuth" LoadBalanceInfo="" Colors="Colors16Bit" Resolution="FitToWindow" AutomaticResize="True" DisplayWallpaper="False" DisplayThemes="False" EnableFontSmoothing="False" EnableDesktopComposition="False" CacheBitmaps="False" RedirectDiskDrives="False" RedirectPorts="False" RedirectPrinters="False" RedirectSmartCards="False" RedirectSound="DoNotPlay" RedirectKeys="False" Connected="False" PreExtApp="" PostExtApp="" MacAddress="" UserField="" ExtApp="" VNCCompression="CompNone" VNCEncoding="EncHextile" VNCAuthMode="AuthVNC" VNCProxyType="ProxyNone" VNCProxyIP="" VNCProxyPort="0" VNCProxyUsername="" VNCProxyPassword="" VNCColors="ColNormal" VNCSmartSizeMode="SmartSAspect" VNCViewOnly="False" RDGatewayUsageMethod="Never" RDGatewayHostname="" RDGatewayUseConnectionCredentials="Yes" RDGatewayUsername="" RDGatewayPassword="" RDGatewayDomain="" InheritCacheBitmaps="False" InheritColors="False" InheritDescription="False" InheritDisplayThemes="False" InheritDisplayWallpaper="False" InheritEnableFontSmoothing="False" InheritEnableDesktopComposition="False" InheritDomain="False" InheritIcon="False" InheritPanel="False" InheritPassword="False" InheritPort="False" InheritProtocol="False" InheritPuttySession="False" InheritRedirectDiskDrives="False" InheritRedirectKeys="False" InheritRedirectPorts="False" InheritRedirectPrinters="False" InheritRedirectSmartCards="False" InheritRedirectSound="False" InheritResolution="False" InheritAutomaticResize="False" InheritUseConsoleSession="False" InheritUseCredSsp="False" InheritRenderingEngine="False" InheritUsername="False" InheritICAEncryptionStrength="False" InheritRDPAuthenticationLevel="False" InheritLoadBalanceInfo="False" InheritPreExtApp="False" InheritPostExtApp="False" InheritMacAddress="False" InheritUserField="False" InheritExtApp="False" InheritVNCCompression="False" InheritVNCEncoding="False" InheritVNCAuthMode="False" InheritVNCProxyType="False" InheritVNCProxyIP="False" InheritVNCProxyPort="False" InheritVNCProxyUsername="False" InheritVNCProxyPassword="False" InheritVNCColors="False" InheritVNCSmartSizeMode="False" InheritVNCViewOnly="False" InheritRDGatewayUsageMethod="False" InheritRDGatewayHostname="False" InheritRDGatewayUseConnectionCredentials="False" InheritRDGatewayUsername="False" InheritRDGatewayPassword="False" InheritRDGatewayDomain="False" />
<Node Name="Folder2.1" Type="Container" Expanded="True" Descr="" Icon="mRemoteNG" Panel="General" Username="" Domain="" Password="" Hostname="" Protocol="RDP" PuttySession="Default Settings" Port="3389" ConnectToConsole="False" UseCredSsp="True" RenderingEngine="IE" ICAEncryptionStrength="EncrBasic" RDPAuthenticationLevel="NoAuth" LoadBalanceInfo="" Colors="Colors16Bit" Resolution="FitToWindow" AutomaticResize="True" DisplayWallpaper="False" DisplayThemes="False" EnableFontSmoothing="False" EnableDesktopComposition="False" CacheBitmaps="False" RedirectDiskDrives="False" RedirectPorts="False" RedirectPrinters="False" RedirectSmartCards="False" RedirectSound="DoNotPlay" RedirectKeys="False" Connected="False" PreExtApp="" PostExtApp="" MacAddress="" UserField="" ExtApp="" VNCCompression="CompNone" VNCEncoding="EncHextile" VNCAuthMode="AuthVNC" VNCProxyType="ProxyNone" VNCProxyIP="" VNCProxyPort="0" VNCProxyUsername="" VNCProxyPassword="" VNCColors="ColNormal" VNCSmartSizeMode="SmartSAspect" VNCViewOnly="False" RDGatewayUsageMethod="Never" RDGatewayHostname="" RDGatewayUseConnectionCredentials="Yes" RDGatewayUsername="" RDGatewayPassword="" RDGatewayDomain="" InheritCacheBitmaps="False" InheritColors="False" InheritDescription="False" InheritDisplayThemes="False" InheritDisplayWallpaper="False" InheritEnableFontSmoothing="False" InheritEnableDesktopComposition="False" InheritDomain="False" InheritIcon="False" InheritPanel="False" InheritPassword="False" InheritPort="False" InheritProtocol="False" InheritPuttySession="False" InheritRedirectDiskDrives="False" InheritRedirectKeys="False" InheritRedirectPorts="False" InheritRedirectPrinters="False" InheritRedirectSmartCards="False" InheritRedirectSound="False" InheritResolution="False" InheritAutomaticResize="False" InheritUseConsoleSession="False" InheritUseCredSsp="False" InheritRenderingEngine="False" InheritUsername="False" InheritICAEncryptionStrength="False" InheritRDPAuthenticationLevel="False" InheritLoadBalanceInfo="False" InheritPreExtApp="False" InheritPostExtApp="False" InheritMacAddress="False" InheritUserField="False" InheritExtApp="False" InheritVNCCompression="False" InheritVNCEncoding="False" InheritVNCAuthMode="False" InheritVNCProxyType="False" InheritVNCProxyIP="False" InheritVNCProxyPort="False" InheritVNCProxyUsername="False" InheritVNCProxyPassword="False" InheritVNCColors="False" InheritVNCSmartSizeMode="False" InheritVNCViewOnly="False" InheritRDGatewayUsageMethod="False" InheritRDGatewayHostname="False" InheritRDGatewayUseConnectionCredentials="False" InheritRDGatewayUsername="False" InheritRDGatewayPassword="False" InheritRDGatewayDomain="False">
<Node Name="Connection2.1.1" Type="Connection" Descr="" Icon="mRemoteNG" Panel="General" Username="usernameC211" Domain="domainC2111" Password="RnaM2Pe9Ksgiwudg5fnAr3Fc7oGLKq6rEpBVfzLgouE=" Hostname="" Protocol="RDP" PuttySession="Default Settings" Port="3389" ConnectToConsole="False" UseCredSsp="True" RenderingEngine="IE" ICAEncryptionStrength="EncrBasic" RDPAuthenticationLevel="NoAuth" LoadBalanceInfo="" Colors="Colors16Bit" Resolution="FitToWindow" AutomaticResize="True" DisplayWallpaper="False" DisplayThemes="False" EnableFontSmoothing="False" EnableDesktopComposition="False" CacheBitmaps="False" RedirectDiskDrives="False" RedirectPorts="False" RedirectPrinters="False" RedirectSmartCards="False" RedirectSound="DoNotPlay" RedirectKeys="False" Connected="False" PreExtApp="" PostExtApp="" MacAddress="" UserField="" ExtApp="" VNCCompression="CompNone" VNCEncoding="EncHextile" VNCAuthMode="AuthVNC" VNCProxyType="ProxyNone" VNCProxyIP="" VNCProxyPort="0" VNCProxyUsername="" VNCProxyPassword="" VNCColors="ColNormal" VNCSmartSizeMode="SmartSAspect" VNCViewOnly="False" RDGatewayUsageMethod="Never" RDGatewayHostname="" RDGatewayUseConnectionCredentials="Yes" RDGatewayUsername="" RDGatewayPassword="" RDGatewayDomain="" InheritCacheBitmaps="False" InheritColors="False" InheritDescription="False" InheritDisplayThemes="False" InheritDisplayWallpaper="False" InheritEnableFontSmoothing="False" InheritEnableDesktopComposition="False" InheritDomain="False" InheritIcon="False" InheritPanel="False" InheritPassword="False" InheritPort="False" InheritProtocol="False" InheritPuttySession="False" InheritRedirectDiskDrives="False" InheritRedirectKeys="False" InheritRedirectPorts="False" InheritRedirectPrinters="False" InheritRedirectSmartCards="False" InheritRedirectSound="False" InheritResolution="False" InheritAutomaticResize="False" InheritUseConsoleSession="False" InheritUseCredSsp="False" InheritRenderingEngine="False" InheritUsername="False" InheritICAEncryptionStrength="False" InheritRDPAuthenticationLevel="False" InheritLoadBalanceInfo="False" InheritPreExtApp="False" InheritPostExtApp="False" InheritMacAddress="False" InheritUserField="False" InheritExtApp="False" InheritVNCCompression="False" InheritVNCEncoding="False" InheritVNCAuthMode="False" InheritVNCProxyType="False" InheritVNCProxyIP="False" InheritVNCProxyPort="False" InheritVNCProxyUsername="False" InheritVNCProxyPassword="False" InheritVNCColors="False" InheritVNCSmartSizeMode="False" InheritVNCViewOnly="False" InheritRDGatewayUsageMethod="False" InheritRDGatewayHostname="False" InheritRDGatewayUseConnectionCredentials="False" InheritRDGatewayUsername="False" InheritRDGatewayPassword="False" InheritRDGatewayDomain="False" />
<Node Name="Folder2.1.1" Type="Container" Expanded="True" Descr="" Icon="mRemoteNG" Panel="General" Username="" Domain="" Password="" Hostname="" Protocol="RDP" PuttySession="Default Settings" Port="3389" ConnectToConsole="False" UseCredSsp="True" RenderingEngine="IE" ICAEncryptionStrength="EncrBasic" RDPAuthenticationLevel="NoAuth" LoadBalanceInfo="" Colors="Colors16Bit" Resolution="FitToWindow" AutomaticResize="True" DisplayWallpaper="False" DisplayThemes="False" EnableFontSmoothing="False" EnableDesktopComposition="False" CacheBitmaps="False" RedirectDiskDrives="False" RedirectPorts="False" RedirectPrinters="False" RedirectSmartCards="False" RedirectSound="DoNotPlay" RedirectKeys="False" Connected="False" PreExtApp="" PostExtApp="" MacAddress="" UserField="" ExtApp="" VNCCompression="CompNone" VNCEncoding="EncHextile" VNCAuthMode="AuthVNC" VNCProxyType="ProxyNone" VNCProxyIP="" VNCProxyPort="0" VNCProxyUsername="" VNCProxyPassword="" VNCColors="ColNormal" VNCSmartSizeMode="SmartSAspect" VNCViewOnly="False" RDGatewayUsageMethod="Never" RDGatewayHostname="" RDGatewayUseConnectionCredentials="Yes" RDGatewayUsername="" RDGatewayPassword="" RDGatewayDomain="" InheritCacheBitmaps="False" InheritColors="False" InheritDescription="False" InheritDisplayThemes="False" InheritDisplayWallpaper="False" InheritEnableFontSmoothing="False" InheritEnableDesktopComposition="False" InheritDomain="False" InheritIcon="False" InheritPanel="False" InheritPassword="False" InheritPort="False" InheritProtocol="False" InheritPuttySession="False" InheritRedirectDiskDrives="False" InheritRedirectKeys="False" InheritRedirectPorts="False" InheritRedirectPrinters="False" InheritRedirectSmartCards="False" InheritRedirectSound="False" InheritResolution="False" InheritAutomaticResize="False" InheritUseConsoleSession="False" InheritUseCredSsp="False" InheritRenderingEngine="False" InheritUsername="False" InheritICAEncryptionStrength="False" InheritRDPAuthenticationLevel="False" InheritLoadBalanceInfo="False" InheritPreExtApp="False" InheritPostExtApp="False" InheritMacAddress="False" InheritUserField="False" InheritExtApp="False" InheritVNCCompression="False" InheritVNCEncoding="False" InheritVNCAuthMode="False" InheritVNCProxyType="False" InheritVNCProxyIP="False" InheritVNCProxyPort="False" InheritVNCProxyUsername="False" InheritVNCProxyPassword="False" InheritVNCColors="False" InheritVNCSmartSizeMode="False" InheritVNCViewOnly="False" InheritRDGatewayUsageMethod="False" InheritRDGatewayHostname="False" InheritRDGatewayUseConnectionCredentials="False" InheritRDGatewayUsername="False" InheritRDGatewayPassword="False" InheritRDGatewayDomain="False">
<Node Name="Connection2.1.1.1" Type="Connection" Descr="" Icon="mRemoteNG" Panel="General" Username="usernameforC2111" Domain="domainC2111" Password="+CCNb8oURT36EdVuDshvgW4Y42U1OwvoKwZCvQ+Mwwo=" Hostname="" Protocol="RDP" PuttySession="Default Settings" Port="3389" ConnectToConsole="False" UseCredSsp="True" RenderingEngine="IE" ICAEncryptionStrength="EncrBasic" RDPAuthenticationLevel="NoAuth" LoadBalanceInfo="" Colors="Colors16Bit" Resolution="FitToWindow" AutomaticResize="True" DisplayWallpaper="False" DisplayThemes="False" EnableFontSmoothing="False" EnableDesktopComposition="False" CacheBitmaps="False" RedirectDiskDrives="False" RedirectPorts="False" RedirectPrinters="False" RedirectSmartCards="False" RedirectSound="DoNotPlay" RedirectKeys="False" Connected="False" PreExtApp="" PostExtApp="" MacAddress="" UserField="" ExtApp="" VNCCompression="CompNone" VNCEncoding="EncHextile" VNCAuthMode="AuthVNC" VNCProxyType="ProxyNone" VNCProxyIP="" VNCProxyPort="0" VNCProxyUsername="" VNCProxyPassword="" VNCColors="ColNormal" VNCSmartSizeMode="SmartSAspect" VNCViewOnly="False" RDGatewayUsageMethod="Never" RDGatewayHostname="" RDGatewayUseConnectionCredentials="Yes" RDGatewayUsername="" RDGatewayPassword="" RDGatewayDomain="" InheritCacheBitmaps="False" InheritColors="False" InheritDescription="False" InheritDisplayThemes="False" InheritDisplayWallpaper="False" InheritEnableFontSmoothing="False" InheritEnableDesktopComposition="False" InheritDomain="False" InheritIcon="False" InheritPanel="False" InheritPassword="False" InheritPort="False" InheritProtocol="False" InheritPuttySession="False" InheritRedirectDiskDrives="False" InheritRedirectKeys="False" InheritRedirectPorts="False" InheritRedirectPrinters="False" InheritRedirectSmartCards="False" InheritRedirectSound="False" InheritResolution="False" InheritAutomaticResize="False" InheritUseConsoleSession="False" InheritUseCredSsp="False" InheritRenderingEngine="False" InheritUsername="False" InheritICAEncryptionStrength="False" InheritRDPAuthenticationLevel="False" InheritLoadBalanceInfo="False" InheritPreExtApp="False" InheritPostExtApp="False" InheritMacAddress="False" InheritUserField="False" InheritExtApp="False" InheritVNCCompression="False" InheritVNCEncoding="False" InheritVNCAuthMode="False" InheritVNCProxyType="False" InheritVNCProxyIP="False" InheritVNCProxyPort="False" InheritVNCProxyUsername="False" InheritVNCProxyPassword="False" InheritVNCColors="False" InheritVNCSmartSizeMode="False" InheritVNCViewOnly="False" InheritRDGatewayUsageMethod="False" InheritRDGatewayHostname="False" InheritRDGatewayUseConnectionCredentials="False" InheritRDGatewayUsername="False" InheritRDGatewayPassword="False" InheritRDGatewayDomain="False" />
</Node>
</Node>
<Node Name="Folder2.2" Type="Container" Expanded="True" Descr="" Icon="mRemoteNG" Panel="General" Username="userFolder2" Domain="folder2domain" Password="ZPh3lumDECS6zgJFeXtWYScn4WCPPJahMkfkAoKdkC4=" Hostname="" Protocol="RDP" PuttySession="Default Settings" Port="3389" ConnectToConsole="False" UseCredSsp="True" RenderingEngine="IE" ICAEncryptionStrength="EncrBasic" RDPAuthenticationLevel="NoAuth" LoadBalanceInfo="" Colors="Colors16Bit" Resolution="FitToWindow" AutomaticResize="True" DisplayWallpaper="False" DisplayThemes="False" EnableFontSmoothing="False" EnableDesktopComposition="False" CacheBitmaps="False" RedirectDiskDrives="False" RedirectPorts="False" RedirectPrinters="False" RedirectSmartCards="False" RedirectSound="DoNotPlay" RedirectKeys="False" Connected="False" PreExtApp="" PostExtApp="" MacAddress="" UserField="" ExtApp="" VNCCompression="CompNone" VNCEncoding="EncHextile" VNCAuthMode="AuthVNC" VNCProxyType="ProxyNone" VNCProxyIP="" VNCProxyPort="0" VNCProxyUsername="" VNCProxyPassword="" VNCColors="ColNormal" VNCSmartSizeMode="SmartSAspect" VNCViewOnly="False" RDGatewayUsageMethod="Never" RDGatewayHostname="" RDGatewayUseConnectionCredentials="Yes" RDGatewayUsername="" RDGatewayPassword="" RDGatewayDomain="" InheritCacheBitmaps="False" InheritColors="False" InheritDescription="False" InheritDisplayThemes="False" InheritDisplayWallpaper="False" InheritEnableFontSmoothing="False" InheritEnableDesktopComposition="False" InheritDomain="True" InheritIcon="False" InheritPanel="False" InheritPassword="True" InheritPort="False" InheritProtocol="False" InheritPuttySession="False" InheritRedirectDiskDrives="False" InheritRedirectKeys="False" InheritRedirectPorts="False" InheritRedirectPrinters="False" InheritRedirectSmartCards="False" InheritRedirectSound="False" InheritResolution="False" InheritAutomaticResize="False" InheritUseConsoleSession="False" InheritUseCredSsp="False" InheritRenderingEngine="False" InheritUsername="True" InheritICAEncryptionStrength="False" InheritRDPAuthenticationLevel="False" InheritLoadBalanceInfo="False" InheritPreExtApp="False" InheritPostExtApp="False" InheritMacAddress="False" InheritUserField="False" InheritExtApp="False" InheritVNCCompression="False" InheritVNCEncoding="False" InheritVNCAuthMode="False" InheritVNCProxyType="False" InheritVNCProxyIP="False" InheritVNCProxyPort="False" InheritVNCProxyUsername="False" InheritVNCProxyPassword="False" InheritVNCColors="False" InheritVNCSmartSizeMode="False" InheritVNCViewOnly="False" InheritRDGatewayUsageMethod="False" InheritRDGatewayHostname="False" InheritRDGatewayUseConnectionCredentials="False" InheritRDGatewayUsername="False" InheritRDGatewayPassword="False" InheritRDGatewayDomain="False">
<Node Name="InheritalAllConnection" Type="Connection" Descr="" Icon="mRemoteNG" Panel="General" Username="userFolder2" Domain="folder2domain" Password="0RS1CG8gyibBDcj1LgOuUYR+BXtWkIvuwonoGZ1f9/0=" Hostname="" Protocol="RDP" PuttySession="Default Settings" Port="3389" ConnectToConsole="False" UseCredSsp="True" RenderingEngine="IE" ICAEncryptionStrength="EncrBasic" RDPAuthenticationLevel="NoAuth" LoadBalanceInfo="" Colors="Colors16Bit" Resolution="FitToWindow" AutomaticResize="True" DisplayWallpaper="False" DisplayThemes="False" EnableFontSmoothing="False" EnableDesktopComposition="False" CacheBitmaps="False" RedirectDiskDrives="False" RedirectPorts="False" RedirectPrinters="False" RedirectSmartCards="False" RedirectSound="DoNotPlay" RedirectKeys="False" Connected="False" PreExtApp="" PostExtApp="" MacAddress="" UserField="" ExtApp="" VNCCompression="CompNone" VNCEncoding="EncHextile" VNCAuthMode="AuthVNC" VNCProxyType="ProxyNone" VNCProxyIP="" VNCProxyPort="0" VNCProxyUsername="" VNCProxyPassword="" VNCColors="ColNormal" VNCSmartSizeMode="SmartSAspect" VNCViewOnly="False" RDGatewayUsageMethod="Never" RDGatewayHostname="" RDGatewayUseConnectionCredentials="Yes" RDGatewayUsername="" RDGatewayPassword="" RDGatewayDomain="" InheritCacheBitmaps="True" InheritColors="True" InheritDescription="True" InheritDisplayThemes="True" InheritDisplayWallpaper="True" InheritEnableFontSmoothing="True" InheritEnableDesktopComposition="True" InheritDomain="True" InheritIcon="True" InheritPanel="True" InheritPassword="True" InheritPort="True" InheritProtocol="True" InheritPuttySession="True" InheritRedirectDiskDrives="True" InheritRedirectKeys="True" InheritRedirectPorts="True" InheritRedirectPrinters="True" InheritRedirectSmartCards="True" InheritRedirectSound="True" InheritResolution="True" InheritAutomaticResize="True" InheritUseConsoleSession="True" InheritUseCredSsp="True" InheritRenderingEngine="True" InheritUsername="True" InheritICAEncryptionStrength="True" InheritRDPAuthenticationLevel="True" InheritLoadBalanceInfo="True" InheritPreExtApp="True" InheritPostExtApp="True" InheritMacAddress="True" InheritUserField="True" InheritExtApp="True" InheritVNCCompression="True" InheritVNCEncoding="True" InheritVNCAuthMode="True" InheritVNCProxyType="True" InheritVNCProxyIP="True" InheritVNCProxyPort="True" InheritVNCProxyUsername="True" InheritVNCProxyPassword="True" InheritVNCColors="True" InheritVNCSmartSizeMode="True" InheritVNCViewOnly="True" InheritRDGatewayUsageMethod="True" InheritRDGatewayHostname="True" InheritRDGatewayUseConnectionCredentials="True" InheritRDGatewayUsername="True" InheritRDGatewayPassword="True" InheritRDGatewayDomain="True" />
<Node Name="Folder2.2.1 InheritAll" Type="Container" Expanded="True" Descr="" Icon="mRemoteNG" Panel="General" Username="userFolder2" Domain="folder2domain" Password="XfhhpQnL1lp34KZITCKTgDD3+7C7t8VW6y26rERXG+A=" Hostname="" Protocol="RDP" PuttySession="Default Settings" Port="3389" ConnectToConsole="False" UseCredSsp="True" RenderingEngine="IE" ICAEncryptionStrength="EncrBasic" RDPAuthenticationLevel="NoAuth" LoadBalanceInfo="" Colors="Colors16Bit" Resolution="FitToWindow" AutomaticResize="True" DisplayWallpaper="False" DisplayThemes="False" EnableFontSmoothing="False" EnableDesktopComposition="False" CacheBitmaps="False" RedirectDiskDrives="False" RedirectPorts="False" RedirectPrinters="False" RedirectSmartCards="False" RedirectSound="DoNotPlay" RedirectKeys="False" Connected="False" PreExtApp="" PostExtApp="" MacAddress="" UserField="" ExtApp="" VNCCompression="CompNone" VNCEncoding="EncHextile" VNCAuthMode="AuthVNC" VNCProxyType="ProxyNone" VNCProxyIP="" VNCProxyPort="0" VNCProxyUsername="" VNCProxyPassword="" VNCColors="ColNormal" VNCSmartSizeMode="SmartSAspect" VNCViewOnly="False" RDGatewayUsageMethod="Never" RDGatewayHostname="" RDGatewayUseConnectionCredentials="Yes" RDGatewayUsername="" RDGatewayPassword="" RDGatewayDomain="" InheritCacheBitmaps="True" InheritColors="True" InheritDescription="True" InheritDisplayThemes="True" InheritDisplayWallpaper="True" InheritEnableFontSmoothing="True" InheritEnableDesktopComposition="True" InheritDomain="True" InheritIcon="True" InheritPanel="True" InheritPassword="True" InheritPort="True" InheritProtocol="True" InheritPuttySession="True" InheritRedirectDiskDrives="True" InheritRedirectKeys="True" InheritRedirectPorts="True" InheritRedirectPrinters="True" InheritRedirectSmartCards="True" InheritRedirectSound="True" InheritResolution="True" InheritAutomaticResize="True" InheritUseConsoleSession="True" InheritUseCredSsp="True" InheritRenderingEngine="True" InheritUsername="True" InheritICAEncryptionStrength="True" InheritRDPAuthenticationLevel="True" InheritLoadBalanceInfo="True" InheritPreExtApp="True" InheritPostExtApp="True" InheritMacAddress="True" InheritUserField="True" InheritExtApp="True" InheritVNCCompression="True" InheritVNCEncoding="True" InheritVNCAuthMode="True" InheritVNCProxyType="True" InheritVNCProxyIP="True" InheritVNCProxyPort="True" InheritVNCProxyUsername="True" InheritVNCProxyPassword="True" InheritVNCColors="True" InheritVNCSmartSizeMode="True" InheritVNCViewOnly="True" InheritRDGatewayUsageMethod="True" InheritRDGatewayHostname="True" InheritRDGatewayUseConnectionCredentials="True" InheritRDGatewayUsername="True" InheritRDGatewayPassword="True" InheritRDGatewayDomain="True">
<Node Name="Connection2.2.1.1 InheritAll" Type="Connection" Descr="" Icon="mRemoteNG" Panel="General" Username="userFolder2" Domain="folder2domain" Password="i4LCsy8+QgJ7xsDHh8ckf1h4Kno3sQYN9QhGD7vaTTc=" Hostname="" Protocol="RDP" PuttySession="Default Settings" Port="3389" ConnectToConsole="False" UseCredSsp="True" RenderingEngine="IE" ICAEncryptionStrength="EncrBasic" RDPAuthenticationLevel="NoAuth" LoadBalanceInfo="" Colors="Colors16Bit" Resolution="FitToWindow" AutomaticResize="True" DisplayWallpaper="False" DisplayThemes="False" EnableFontSmoothing="False" EnableDesktopComposition="False" CacheBitmaps="False" RedirectDiskDrives="False" RedirectPorts="False" RedirectPrinters="False" RedirectSmartCards="False" RedirectSound="DoNotPlay" RedirectKeys="False" Connected="False" PreExtApp="" PostExtApp="" MacAddress="" UserField="" ExtApp="" VNCCompression="CompNone" VNCEncoding="EncHextile" VNCAuthMode="AuthVNC" VNCProxyType="ProxyNone" VNCProxyIP="" VNCProxyPort="0" VNCProxyUsername="" VNCProxyPassword="" VNCColors="ColNormal" VNCSmartSizeMode="SmartSAspect" VNCViewOnly="False" RDGatewayUsageMethod="Never" RDGatewayHostname="" RDGatewayUseConnectionCredentials="Yes" RDGatewayUsername="" RDGatewayPassword="" RDGatewayDomain="" InheritCacheBitmaps="True" InheritColors="True" InheritDescription="True" InheritDisplayThemes="True" InheritDisplayWallpaper="True" InheritEnableFontSmoothing="True" InheritEnableDesktopComposition="True" InheritDomain="True" InheritIcon="True" InheritPanel="True" InheritPassword="True" InheritPort="True" InheritProtocol="True" InheritPuttySession="True" InheritRedirectDiskDrives="True" InheritRedirectKeys="True" InheritRedirectPorts="True" InheritRedirectPrinters="True" InheritRedirectSmartCards="True" InheritRedirectSound="True" InheritResolution="True" InheritAutomaticResize="True" InheritUseConsoleSession="True" InheritUseCredSsp="True" InheritRenderingEngine="True" InheritUsername="True" InheritICAEncryptionStrength="True" InheritRDPAuthenticationLevel="True" InheritLoadBalanceInfo="True" InheritPreExtApp="True" InheritPostExtApp="True" InheritMacAddress="True" InheritUserField="True" InheritExtApp="True" InheritVNCCompression="True" InheritVNCEncoding="True" InheritVNCAuthMode="True" InheritVNCProxyType="True" InheritVNCProxyIP="True" InheritVNCProxyPort="True" InheritVNCProxyUsername="True" InheritVNCProxyPassword="True" InheritVNCColors="True" InheritVNCSmartSizeMode="True" InheritVNCViewOnly="True" InheritRDGatewayUsageMethod="True" InheritRDGatewayHostname="True" InheritRDGatewayUseConnectionCredentials="True" InheritRDGatewayUsername="True" InheritRDGatewayPassword="True" InheritRDGatewayDomain="True" />
</Node>
<Node Name="InheritUsernameConnection" Type="Connection" Descr="" Icon="mRemoteNG" Panel="General" Username="userFolder2" Domain="inheritUsernameDomain" Password="IaLl8+z9y4uk7hYIvgwpQzrSuo7MFvfTGPNzT19I1n4zDkZJwwLO6ba4UcFECDe8" Hostname="" Protocol="RDP" PuttySession="Default Settings" Port="3389" ConnectToConsole="False" UseCredSsp="True" RenderingEngine="IE" ICAEncryptionStrength="EncrBasic" RDPAuthenticationLevel="NoAuth" LoadBalanceInfo="" Colors="Colors16Bit" Resolution="FitToWindow" AutomaticResize="True" DisplayWallpaper="False" DisplayThemes="False" EnableFontSmoothing="False" EnableDesktopComposition="False" CacheBitmaps="False" RedirectDiskDrives="False" RedirectPorts="False" RedirectPrinters="False" RedirectSmartCards="False" RedirectSound="DoNotPlay" RedirectKeys="False" Connected="False" PreExtApp="" PostExtApp="" MacAddress="" UserField="" ExtApp="" VNCCompression="CompNone" VNCEncoding="EncHextile" VNCAuthMode="AuthVNC" VNCProxyType="ProxyNone" VNCProxyIP="" VNCProxyPort="0" VNCProxyUsername="" VNCProxyPassword="" VNCColors="ColNormal" VNCSmartSizeMode="SmartSAspect" VNCViewOnly="False" RDGatewayUsageMethod="Never" RDGatewayHostname="" RDGatewayUseConnectionCredentials="Yes" RDGatewayUsername="" RDGatewayPassword="" RDGatewayDomain="" InheritCacheBitmaps="False" InheritColors="False" InheritDescription="False" InheritDisplayThemes="False" InheritDisplayWallpaper="False" InheritEnableFontSmoothing="False" InheritEnableDesktopComposition="False" InheritDomain="False" InheritIcon="False" InheritPanel="False" InheritPassword="False" InheritPort="False" InheritProtocol="False" InheritPuttySession="False" InheritRedirectDiskDrives="False" InheritRedirectKeys="False" InheritRedirectPorts="False" InheritRedirectPrinters="False" InheritRedirectSmartCards="False" InheritRedirectSound="False" InheritResolution="False" InheritAutomaticResize="False" InheritUseConsoleSession="False" InheritUseCredSsp="False" InheritRenderingEngine="False" InheritUsername="True" InheritICAEncryptionStrength="False" InheritRDPAuthenticationLevel="False" InheritLoadBalanceInfo="False" InheritPreExtApp="False" InheritPostExtApp="False" InheritMacAddress="False" InheritUserField="False" InheritExtApp="False" InheritVNCCompression="False" InheritVNCEncoding="False" InheritVNCAuthMode="False" InheritVNCProxyType="False" InheritVNCProxyIP="False" InheritVNCProxyPort="False" InheritVNCProxyUsername="False" InheritVNCProxyPassword="False" InheritVNCColors="False" InheritVNCSmartSizeMode="False" InheritVNCViewOnly="False" InheritRDGatewayUsageMethod="False" InheritRDGatewayHostname="False" InheritRDGatewayUseConnectionCredentials="False" InheritRDGatewayUsername="False" InheritRDGatewayPassword="False" InheritRDGatewayDomain="False" />
<Node Name="InheritDomainConnection" Type="Connection" Descr="" Icon="mRemoteNG" Panel="General" Username="inheritDomainUsername" Domain="folder2domain" Password="DH57coImERkLQr0VIhReTRlBEatv45F3Dtz0hfzqzv9Hbhx48maiZx4XOFn4ZYvS" Hostname="" Protocol="RDP" PuttySession="Default Settings" Port="3389" ConnectToConsole="False" UseCredSsp="True" RenderingEngine="IE" ICAEncryptionStrength="EncrBasic" RDPAuthenticationLevel="NoAuth" LoadBalanceInfo="" Colors="Colors16Bit" Resolution="FitToWindow" AutomaticResize="True" DisplayWallpaper="False" DisplayThemes="False" EnableFontSmoothing="False" EnableDesktopComposition="False" CacheBitmaps="False" RedirectDiskDrives="False" RedirectPorts="False" RedirectPrinters="False" RedirectSmartCards="False" RedirectSound="DoNotPlay" RedirectKeys="False" Connected="False" PreExtApp="" PostExtApp="" MacAddress="" UserField="" ExtApp="" VNCCompression="CompNone" VNCEncoding="EncHextile" VNCAuthMode="AuthVNC" VNCProxyType="ProxyNone" VNCProxyIP="" VNCProxyPort="0" VNCProxyUsername="" VNCProxyPassword="" VNCColors="ColNormal" VNCSmartSizeMode="SmartSAspect" VNCViewOnly="False" RDGatewayUsageMethod="Never" RDGatewayHostname="" RDGatewayUseConnectionCredentials="Yes" RDGatewayUsername="" RDGatewayPassword="" RDGatewayDomain="" InheritCacheBitmaps="False" InheritColors="False" InheritDescription="False" InheritDisplayThemes="False" InheritDisplayWallpaper="False" InheritEnableFontSmoothing="False" InheritEnableDesktopComposition="False" InheritDomain="True" InheritIcon="False" InheritPanel="False" InheritPassword="False" InheritPort="False" InheritProtocol="False" InheritPuttySession="False" InheritRedirectDiskDrives="False" InheritRedirectKeys="False" InheritRedirectPorts="False" InheritRedirectPrinters="False" InheritRedirectSmartCards="False" InheritRedirectSound="False" InheritResolution="False" InheritAutomaticResize="False" InheritUseConsoleSession="False" InheritUseCredSsp="False" InheritRenderingEngine="False" InheritUsername="False" InheritICAEncryptionStrength="False" InheritRDPAuthenticationLevel="False" InheritLoadBalanceInfo="False" InheritPreExtApp="False" InheritPostExtApp="False" InheritMacAddress="False" InheritUserField="False" InheritExtApp="False" InheritVNCCompression="False" InheritVNCEncoding="False" InheritVNCAuthMode="False" InheritVNCProxyType="False" InheritVNCProxyIP="False" InheritVNCProxyPort="False" InheritVNCProxyUsername="False" InheritVNCProxyPassword="False" InheritVNCColors="False" InheritVNCSmartSizeMode="False" InheritVNCViewOnly="False" InheritRDGatewayUsageMethod="False" InheritRDGatewayHostname="False" InheritRDGatewayUseConnectionCredentials="False" InheritRDGatewayUsername="False" InheritRDGatewayPassword="False" InheritRDGatewayDomain="False" />
<Node Name="InheritPasswordConnection" Type="Connection" Descr="" Icon="mRemoteNG" Panel="General" Username="inheritDomainUsername" Domain="inheritUsernameDomain" Password="8Whb2isHSTBVrMSMDFCeSnNOA6l5n6GUmf1+9be0HUI=" Hostname="" Protocol="RDP" PuttySession="Default Settings" Port="3389" ConnectToConsole="False" UseCredSsp="True" RenderingEngine="IE" ICAEncryptionStrength="EncrBasic" RDPAuthenticationLevel="NoAuth" LoadBalanceInfo="" Colors="Colors16Bit" Resolution="FitToWindow" AutomaticResize="True" DisplayWallpaper="False" DisplayThemes="False" EnableFontSmoothing="False" EnableDesktopComposition="False" CacheBitmaps="False" RedirectDiskDrives="False" RedirectPorts="False" RedirectPrinters="False" RedirectSmartCards="False" RedirectSound="DoNotPlay" RedirectKeys="False" Connected="False" PreExtApp="" PostExtApp="" MacAddress="" UserField="" ExtApp="" VNCCompression="CompNone" VNCEncoding="EncHextile" VNCAuthMode="AuthVNC" VNCProxyType="ProxyNone" VNCProxyIP="" VNCProxyPort="0" VNCProxyUsername="" VNCProxyPassword="" VNCColors="ColNormal" VNCSmartSizeMode="SmartSAspect" VNCViewOnly="False" RDGatewayUsageMethod="Never" RDGatewayHostname="" RDGatewayUseConnectionCredentials="Yes" RDGatewayUsername="" RDGatewayPassword="" RDGatewayDomain="" InheritCacheBitmaps="False" InheritColors="False" InheritDescription="False" InheritDisplayThemes="False" InheritDisplayWallpaper="False" InheritEnableFontSmoothing="False" InheritEnableDesktopComposition="False" InheritDomain="False" InheritIcon="False" InheritPanel="False" InheritPassword="True" InheritPort="False" InheritProtocol="False" InheritPuttySession="False" InheritRedirectDiskDrives="False" InheritRedirectKeys="False" InheritRedirectPorts="False" InheritRedirectPrinters="False" InheritRedirectSmartCards="False" InheritRedirectSound="False" InheritResolution="False" InheritAutomaticResize="False" InheritUseConsoleSession="False" InheritUseCredSsp="False" InheritRenderingEngine="False" InheritUsername="False" InheritICAEncryptionStrength="False" InheritRDPAuthenticationLevel="False" InheritLoadBalanceInfo="False" InheritPreExtApp="False" InheritPostExtApp="False" InheritMacAddress="False" InheritUserField="False" InheritExtApp="False" InheritVNCCompression="False" InheritVNCEncoding="False" InheritVNCAuthMode="False" InheritVNCProxyType="False" InheritVNCProxyIP="False" InheritVNCProxyPort="False" InheritVNCProxyUsername="False" InheritVNCProxyPassword="False" InheritVNCColors="False" InheritVNCSmartSizeMode="False" InheritVNCViewOnly="False" InheritRDGatewayUsageMethod="False" InheritRDGatewayHostname="False" InheritRDGatewayUseConnectionCredentials="False" InheritRDGatewayUsername="False" InheritRDGatewayPassword="False" InheritRDGatewayDomain="False" />
</Node>
</Node>
<Node Name="rootConnection" Type="Connection" Descr="" Icon="mRemoteNG" Panel="General" Username="root" Domain="rootdomain" Password="W2KSje/AD81hhjqdZeg8gkVvLozkd++94zH5hjOSWc0=" Hostname="" Protocol="RDP" PuttySession="Default Settings" Port="3389" ConnectToConsole="False" UseCredSsp="True" RenderingEngine="IE" ICAEncryptionStrength="EncrBasic" RDPAuthenticationLevel="NoAuth" LoadBalanceInfo="" Colors="Colors16Bit" Resolution="FitToWindow" AutomaticResize="True" DisplayWallpaper="False" DisplayThemes="False" EnableFontSmoothing="False" EnableDesktopComposition="False" CacheBitmaps="False" RedirectDiskDrives="False" RedirectPorts="False" RedirectPrinters="False" RedirectSmartCards="False" RedirectSound="DoNotPlay" RedirectKeys="False" Connected="False" PreExtApp="" PostExtApp="" MacAddress="" UserField="" ExtApp="" VNCCompression="CompNone" VNCEncoding="EncHextile" VNCAuthMode="AuthVNC" VNCProxyType="ProxyNone" VNCProxyIP="" VNCProxyPort="0" VNCProxyUsername="" VNCProxyPassword="" VNCColors="ColNormal" VNCSmartSizeMode="SmartSAspect" VNCViewOnly="False" RDGatewayUsageMethod="Never" RDGatewayHostname="" RDGatewayUseConnectionCredentials="Yes" RDGatewayUsername="" RDGatewayPassword="" RDGatewayDomain="" InheritCacheBitmaps="False" InheritColors="False" InheritDescription="False" InheritDisplayThemes="False" InheritDisplayWallpaper="False" InheritEnableFontSmoothing="False" InheritEnableDesktopComposition="False" InheritDomain="False" InheritIcon="False" InheritPanel="False" InheritPassword="False" InheritPort="False" InheritProtocol="False" InheritPuttySession="False" InheritRedirectDiskDrives="False" InheritRedirectKeys="False" InheritRedirectPorts="False" InheritRedirectPrinters="False" InheritRedirectSmartCards="False" InheritRedirectSound="False" InheritResolution="False" InheritAutomaticResize="False" InheritUseConsoleSession="False" InheritUseCredSsp="False" InheritRenderingEngine="False" InheritUsername="False" InheritICAEncryptionStrength="False" InheritRDPAuthenticationLevel="False" InheritLoadBalanceInfo="False" InheritPreExtApp="False" InheritPostExtApp="False" InheritMacAddress="False" InheritUserField="False" InheritExtApp="False" InheritVNCCompression="False" InheritVNCEncoding="False" InheritVNCAuthMode="False" InheritVNCProxyType="False" InheritVNCProxyIP="False" InheritVNCProxyPort="False" InheritVNCProxyUsername="False" InheritVNCProxyPassword="False" InheritVNCColors="False" InheritVNCSmartSizeMode="False" InheritVNCViewOnly="False" InheritRDGatewayUsageMethod="False" InheritRDGatewayHostname="False" InheritRDGatewayUseConnectionCredentials="False" InheritRDGatewayUsername="False" InheritRDGatewayPassword="False" InheritRDGatewayDomain="False" />
</Connections>

View File

@@ -102,6 +102,7 @@
<ItemGroup>
<Compile Include="App\LoggerTests.cs" />
<Compile Include="BinaryFileTests.cs" />
<Compile Include="Config\Connections\XmlConnectionsDeserializerTests.cs" />
<Compile Include="Connection\ConnectionInfoInheritanceTests.cs" />
<Compile Include="Connection\ConnectionInfoTests.cs" />
<Compile Include="Connection\DefaultConnectionInfoTests.cs" />
@@ -113,6 +114,11 @@
<Compile Include="Config\Connections\SqlUpdateQueryBuilderTest.cs" />
<Compile Include="Config\Connections\SqlUpdateTimerTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Security\AeadCryptographyProviderTests.cs" />
<Compile Include="Security\CryptographyProviderFactoryTests.cs" />
<Compile Include="Security\EncryptedSecureStringTests.cs" />
@@ -139,10 +145,17 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="UI\Controls\TestForm.resx">
<DependentUpon>TestForm.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Content Include="Resources\TestConfCons.xml" />
</ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
<ItemGroup>

View File

@@ -1,6 +1,9 @@
using System.Linq;
using System.Windows.Forms;
using mRemoteNG.App;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.UI;
using mRemoteNG.UI.Forms;
@@ -50,11 +53,16 @@ namespace mRemoteNG.Config.Connections
var xmlConnectionsDeserializer = new XmlConnectionsDeserializer(xmlString)
{
ConnectionList = ConnectionList,
ContainerList = ContainerList,
RootTreeNode = RootTreeNode,
ContainerList = ContainerList
};
xmlConnectionsDeserializer.Deserialize(import);
}
var connectionTreeModel = xmlConnectionsDeserializer.Deserialize(import);
var connectionTreeViewBuilder = new ConnectionTreeViewBuilder(connectionTreeModel);
connectionTreeViewBuilder.Build();
var treeNodes = new TreeNode[connectionTreeViewBuilder.TreeView.Nodes.Count];
connectionTreeViewBuilder.TreeView.Nodes.CopyTo(treeNodes, 0);
Windows.treeForm.tvConnections.Nodes.AddRange(treeNodes);
//Windows.treeForm.InitialRefresh();
}
frmMain.Default.AreWeUsingSqlServerForSavingConnections = UseDatabase;
frmMain.Default.ConnectionsFileName = ConnectionFileName;

View File

@@ -4,7 +4,6 @@ using System.Security;
using System.Windows.Forms;
using System.Xml;
using mRemoteNG.App;
using mRemoteNG.App.Info;
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Connection.Protocol.Http;
@@ -13,6 +12,7 @@ using mRemoteNG.Connection.Protocol.RDP;
using mRemoteNG.Connection.Protocol.VNC;
using mRemoteNG.Container;
using mRemoteNG.Messages;
using mRemoteNG.Security;
using mRemoteNG.Security.SymmetricEncryption;
using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
@@ -26,13 +26,12 @@ namespace mRemoteNG.Config.Connections
{
private XmlDocument _xmlDocument;
private double _confVersion;
private SecureString _pW = GeneralAppInfo.EncryptionKey;
private ContainerInfo _previousContainer;
private ConnectionsDecryptor _decryptor = new ConnectionsDecryptor();
private readonly SecureString _pW = "mR3m".ConvertToSecureString();
private readonly ConnectionsDecryptor _decryptor = new ConnectionsDecryptor();
//TODO find way to inject data source info
private string ConnectionFileName = "";
public TreeNode RootTreeNode { get; set; }
//public TreeNode RootTreeNode { get; set; }
public ConnectionList ConnectionList { get; set; }
public ContainerList ContainerList { get; set; }
@@ -40,6 +39,8 @@ namespace mRemoteNG.Config.Connections
{
LoadXmlConnectionData(xml);
ValidateConnectionFileVersion();
ConnectionList = new ConnectionList();
ContainerList = new ContainerList();
}
private void LoadXmlConnectionData(string connections)
@@ -78,7 +79,7 @@ namespace mRemoteNG.Config.Connections
throw (new Exception($"Incompatible connection file format (file format version {_confVersion})."));
}
public void Deserialize(bool import)
public ConnectionTreeModel Deserialize(bool import = false)
{
try
{
@@ -87,6 +88,8 @@ namespace mRemoteNG.Config.Connections
// SECTION 2. Initialize the treeview control.
var rootInfo = InitializeRootNode();
var connectionTreeModel = new ConnectionTreeModel();
connectionTreeModel.AddRootNode(rootInfo);
if (_confVersion > 1.3)
{
@@ -95,34 +98,36 @@ namespace mRemoteNG.Config.Connections
{
mRemoteNG.Settings.Default.LoadConsFromCustomLocation = false;
mRemoteNG.Settings.Default.CustomConsPath = "";
RootTreeNode.Remove();
return;
return null;
}
}
if (import && !IsExportFile())
{
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, Language.strCannotImportNormalSessionFile);
return;
return null;
}
if (!IsExportFile())
{
RootTreeNode.ImageIndex = (int)TreeImageType.Root;
RootTreeNode.SelectedImageIndex = (int)TreeImageType.Root;
}
//if (!IsExportFile())
//{
// RootTreeNode.ImageIndex = (int)TreeImageType.Root;
// RootTreeNode.SelectedImageIndex = (int)TreeImageType.Root;
//}
// SECTION 3. Populate the TreeView with the DOM nodes.
PopulateTreeview();
RootTreeNode.EnsureVisible();
Windows.treeForm.InitialRefresh();
SetSelectedNode(RootTreeNode);
//PopulateTreeview();
AddNodesFromXmlRecursive(_xmlDocument.DocumentElement, rootInfo);
//RootTreeNode.EnsureVisible();
//Windows.treeForm.InitialRefresh();
//SetSelectedNode(RootTreeNode);
//open connections from last mremote session
OpenConnectionsFromLastSession();
//OpenConnectionsFromLastSession();
if (!import)
Runtime.IsConnectionsFileLoaded = true;
return connectionTreeModel;
}
catch (Exception ex)
{
@@ -132,42 +137,34 @@ namespace mRemoteNG.Config.Connections
}
}
private void PopulateTreeview()
{
Windows.treeForm.tvConnections.BeginUpdate();
AddNodesFromXmlRecursive(_xmlDocument.DocumentElement, RootTreeNode);
RootTreeNode.Expand();
ExpandPreviouslyOpenedFolders();
Windows.treeForm.tvConnections.EndUpdate();
}
private void AddNodesFromXmlRecursive(XmlNode parentXmlNode, TreeNode parentTreeNode)
private void AddNodesFromXmlRecursive(XmlNode parentXmlNode, ContainerInfo parentContainer)
{
try
{
// Loop through the XML nodes until the leaf is reached.
// Add the nodes to the TreeView during the looping process.
if (parentXmlNode.HasChildNodes)
if (!parentXmlNode.HasChildNodes) return;
foreach (XmlNode xmlNode in parentXmlNode.ChildNodes)
{
foreach (XmlNode xmlNode in parentXmlNode.ChildNodes)
var nodeType = ConnectionTreeNode.GetNodeTypeFromString(xmlNode.Attributes?["Type"].Value);
if (nodeType == TreeNodeType.Connection)
{
var treeNode = new TreeNode(xmlNode.Attributes?["Name"].Value);
parentTreeNode.Nodes.Add(treeNode);
var nodeType = ConnectionTreeNode.GetNodeTypeFromString(xmlNode.Attributes?["Type"].Value);
if (nodeType == TreeNodeType.Connection)
AddConnectionToList(xmlNode, treeNode);
else if (nodeType == TreeNodeType.Container)
AddContainerToList(xmlNode, treeNode);
AddNodesFromXmlRecursive(xmlNode, treeNode);
var connectionInfo = GetConnectionInfoFromXml(xmlNode);
parentContainer.Add(connectionInfo);
ConnectionList.Add(connectionInfo);
}
else if (nodeType == TreeNodeType.Container)
{
var containerInfo = new ContainerInfo();
if (_confVersion >= 0.9)
containerInfo.CopyFrom(GetConnectionInfoFromXml(xmlNode));
if (_confVersion >= 0.8)
containerInfo.IsExpanded = xmlNode.Attributes?["Expanded"].Value == "True";
parentContainer.Add(containerInfo);
ContainerList.Add(containerInfo);
AddNodesFromXmlRecursive(xmlNode, containerInfo);
}
}
else
{
var nameAttribute = parentXmlNode.Attributes?["Name"];
var nodeName = nameAttribute?.Value.Trim();
parentTreeNode.Text = !string.IsNullOrEmpty(nodeName) ? nodeName : parentXmlNode.Name;
}
}
catch (Exception ex)
@@ -177,39 +174,6 @@ namespace mRemoteNG.Config.Connections
}
}
private void AddConnectionToList(XmlNode xmlNode, TreeNode treeNode)
{
var connectionInfo = GetConnectionInfoFromXml(xmlNode);
connectionInfo.TreeNode = treeNode;
connectionInfo.Parent = _previousContainer;
ConnectionList.Add(connectionInfo);
treeNode.Tag = connectionInfo;
treeNode.ImageIndex = (int)TreeImageType.ConnectionClosed;
treeNode.SelectedImageIndex = (int)TreeImageType.ConnectionClosed;
}
private void AddContainerToList(XmlNode xmlNode, TreeNode treeNode)
{
var containerInfo = new ContainerInfo();
if (_confVersion >= 0.8)
containerInfo.IsExpanded = xmlNode.Attributes?["Expanded"].Value == "True";
if (_confVersion >= 0.9)
containerInfo.CopyFrom(GetConnectionInfoFromXml(xmlNode));
if (treeNode.Parent?.Tag is ContainerInfo)
containerInfo.Parent = (ContainerInfo) treeNode.Parent.Tag;
containerInfo.TreeNode = treeNode;
containerInfo.Name = xmlNode.Attributes?["Name"].Value;
_previousContainer = containerInfo;
ContainerList.Add(containerInfo);
treeNode.Tag = containerInfo;
treeNode.ImageIndex = (int) TreeImageType.Container;
treeNode.SelectedImageIndex = (int) TreeImageType.Container;
}
private ConnectionInfo GetConnectionInfoFromXml(XmlNode xxNode)
{
var connectionInfo = new ConnectionInfo();
@@ -517,18 +481,12 @@ namespace mRemoteNG.Config.Connections
private RootNodeInfo InitializeRootNode()
{
var rootNodeName = "";
if (_xmlDocument.DocumentElement.HasAttribute("Name"))
rootNodeName = Convert.ToString(_xmlDocument.DocumentElement.Attributes["Name"].Value.Trim());
RootTreeNode.Name = !string.IsNullOrEmpty(rootNodeName) ? rootNodeName : _xmlDocument.DocumentElement.Name;
RootTreeNode.Text = RootTreeNode.Name;
var rootNodeName = _xmlDocument.DocumentElement?.Attributes["Name"].Value.Trim();
var rootInfo = new RootNodeInfo(RootNodeType.Connection)
{
Name = RootTreeNode.Name,
TreeNode = RootTreeNode
Name = rootNodeName
};
RootTreeNode.Tag = rootInfo;
return rootInfo;
}

View File

@@ -33,6 +33,7 @@ namespace mRemoteNG.UI
private TreeNode InitRootNode(RootNodeInfo rootNodeInfo)
{
var rootNode = new TreeNode(rootNodeInfo.Name);
rootNode.Expand();
TreeView.Nodes.Add(rootNode);
return rootNode;
}

View File

@@ -125,8 +125,6 @@ namespace mRemoteNG.UI.Forms
private void frmMain_Load(object sender, EventArgs e)
{
// Create gui config load and save objects
var settingsLoader = new SettingsLoader(this);
settingsLoader.LoadSettings();
@@ -141,9 +139,6 @@ namespace mRemoteNG.UI.Forms
Runtime.MessageCollector = new MessageCollector(Windows.errorsForm);
Runtime.WindowList = new WindowList();
Windows.treePanel.Focus();
ConnectionTree.TreeView = Windows.treeForm.tvConnections;
if (Settings.Default.FirstStart && !Settings.Default.LoadConsFromCustomLocation && !File.Exists(Runtime.GetStartupConnectionFileName()))
{
Runtime.NewConnections(Runtime.GetStartupConnectionFileName());
@@ -155,7 +150,11 @@ namespace mRemoteNG.UI.Forms
Application.Exit();
return ;
}
Config.Putty.Sessions.StartWatcher();
Windows.treePanel.Focus();
ConnectionTree.TreeView = Windows.treeForm.tvConnections;
Config.Putty.Sessions.StartWatcher();
if (Settings.Default.StartupComponentsCheck)
{
Windows.Show(WindowType.ComponentsCheck);