mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Merge branch '1.75.7012'
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
1.75.7012 (2017-12-01):
|
||||
|
||||
Fixes:
|
||||
------
|
||||
#814: Fixed bug that prevented reordering connections by dragging
|
||||
#810: Official mRemoteNG builds will now be signed with a DigiCert certificate
|
||||
#803: File path command line argument not working with network path
|
||||
|
||||
|
||||
1.75.7011 (2017-11-07):
|
||||
|
||||
Fixes:
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
using mRemoteNG.Connection;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Connection.Protocol.SSH;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Tree.Root;
|
||||
using NUnit.Framework;
|
||||
|
||||
|
||||
namespace mRemoteNGTests.Connection
|
||||
{
|
||||
public class ConnectionInfoTests
|
||||
public class ConnectionInfoTests
|
||||
{
|
||||
private ConnectionInfo _connectionInfo;
|
||||
private const string TestDomain = "somedomain";
|
||||
@@ -91,7 +94,29 @@ namespace mRemoteNGTests.Connection
|
||||
Assert.That(nameOfModifiedProperty, Is.EqualTo("OpenConnections"));
|
||||
}
|
||||
|
||||
[TestCase(ProtocolType.HTTP, ExpectedResult = 80)]
|
||||
[TestCaseSource(typeof(InheritancePropertyProvider), nameof(InheritancePropertyProvider.GetProperties))]
|
||||
public void MovingAConnectionUnderRootNodeDisablesInheritance(PropertyInfo property)
|
||||
{
|
||||
var rootNode = new RootNodeInfo(RootNodeType.Connection);
|
||||
_connectionInfo.Inheritance.EverythingInherited = true;
|
||||
_connectionInfo.SetParent(rootNode);
|
||||
var propertyValue = property.GetValue(_connectionInfo.Inheritance);
|
||||
Assert.That(propertyValue, Is.False);
|
||||
}
|
||||
|
||||
[TestCaseSource(typeof(InheritancePropertyProvider), nameof(InheritancePropertyProvider.GetProperties))]
|
||||
public void MovingAConnectionFromUnderRootNodeToUnderADifferentNodeEnablesInheritance(PropertyInfo property)
|
||||
{
|
||||
var rootNode = new RootNodeInfo(RootNodeType.Connection);
|
||||
var otherContainer = new ContainerInfo();
|
||||
_connectionInfo.Inheritance.EverythingInherited = true;
|
||||
_connectionInfo.SetParent(rootNode);
|
||||
_connectionInfo.SetParent(otherContainer);
|
||||
var propertyValue = property.GetValue(_connectionInfo.Inheritance);
|
||||
Assert.That(propertyValue, Is.True);
|
||||
}
|
||||
|
||||
[TestCase(ProtocolType.HTTP, ExpectedResult = 80)]
|
||||
[TestCase(ProtocolType.HTTPS, ExpectedResult = 443)]
|
||||
[TestCase(ProtocolType.ICA, ExpectedResult = 1494)]
|
||||
[TestCase(ProtocolType.IntApp, ExpectedResult = 0)]
|
||||
@@ -107,5 +132,13 @@ namespace mRemoteNGTests.Connection
|
||||
_connectionInfo.Protocol = protocolType;
|
||||
return _connectionInfo.GetDefaultPort();
|
||||
}
|
||||
|
||||
private class InheritancePropertyProvider
|
||||
{
|
||||
public static IEnumerable<PropertyInfo> GetProperties()
|
||||
{
|
||||
return new ConnectionInfoInheritance(new object()).GetProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -227,13 +227,13 @@ namespace mRemoteNG.App
|
||||
if (string.IsNullOrEmpty(ConsParam))
|
||||
return null;
|
||||
|
||||
if (File.Exists(ConsParam))
|
||||
return ConsParam;
|
||||
|
||||
// trim invalid characters for the Combine method (see: https://msdn.microsoft.com/en-us/library/fyy7a5kt.aspx#Anchor_2)
|
||||
ConsParam = ConsParam.Trim().TrimStart('\\').Trim();
|
||||
|
||||
// fallback paths
|
||||
if (File.Exists(ConsParam))
|
||||
return ConsParam;
|
||||
|
||||
if (File.Exists(Path.Combine(GeneralAppInfo.HomePath, ConsParam)))
|
||||
return GeneralAppInfo.HomePath + Path.DirectorySeparatorChar + ConsParam;
|
||||
|
||||
|
||||
@@ -3,19 +3,20 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Connection.Protocol.VNC;
|
||||
using mRemoteNG.Connection.Protocol.SSH;
|
||||
using mRemoteNG.Connection.Protocol.Http;
|
||||
using mRemoteNG.Connection.Protocol.RAW;
|
||||
using mRemoteNG.Connection.Protocol.ICA;
|
||||
using mRemoteNG.Connection.Protocol.RDP;
|
||||
using mRemoteNG.Connection.Protocol.Telnet;
|
||||
using mRemoteNG.Connection.Protocol.Rlogin;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Connection.Protocol.Http;
|
||||
using mRemoteNG.Connection.Protocol.ICA;
|
||||
using mRemoteNG.Connection.Protocol.RAW;
|
||||
using mRemoteNG.Connection.Protocol.RDP;
|
||||
using mRemoteNG.Connection.Protocol.Rlogin;
|
||||
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;
|
||||
|
||||
|
||||
namespace mRemoteNG.Connection
|
||||
@@ -125,14 +126,19 @@ namespace mRemoteNG.Connection
|
||||
return filteredProperties;
|
||||
}
|
||||
|
||||
public virtual void SetParent(ContainerInfo parent)
|
||||
public virtual void SetParent(ContainerInfo newParent)
|
||||
{
|
||||
RemoveParent();
|
||||
parent?.AddChild(this);
|
||||
newParent?.AddChild(this);
|
||||
if (newParent is RootNodeInfo)
|
||||
Inheritance.DisableInheritance();
|
||||
}
|
||||
|
||||
public void RemoveParent()
|
||||
{
|
||||
if (Parent is RootNodeInfo)
|
||||
Inheritance.EnableInheritance();
|
||||
|
||||
Parent?.RemoveChild(this);
|
||||
}
|
||||
#endregion
|
||||
|
||||
Binary file not shown.
@@ -56,7 +56,6 @@ namespace mRemoteNG.UI.Window
|
||||
this.olvConnections.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
|
||||
this.olvConnections.HideSelection = false;
|
||||
this.olvConnections.IsSimpleDragSource = true;
|
||||
this.olvConnections.IsSimpleDropSink = true;
|
||||
this.olvConnections.LabelEdit = true;
|
||||
this.olvConnections.Location = new System.Drawing.Point(0, 0);
|
||||
this.olvConnections.MultiSelect = false;
|
||||
|
||||
Reference in New Issue
Block a user