mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 14:07:46 +08:00
Merge pull request #2125 from david-sway/v1.77.2-dev
Fixed string parsing logic for Quick Connect toolbar.
This commit is contained in:
@@ -80,17 +80,17 @@ namespace mRemoteNG.Connection
|
||||
{
|
||||
var x = connectionString.Split('@');
|
||||
uriBuilder.UserName = x[0];
|
||||
uriBuilder.Host = x[1];
|
||||
connectionString = x[1];
|
||||
}
|
||||
if (uriBuilder.Host.Contains(":"))
|
||||
if (connectionString.Contains(":"))
|
||||
{
|
||||
var x = uriBuilder.Host.Split(':');
|
||||
uriBuilder.Host = x[0];
|
||||
var x = connectionString.Split(':');
|
||||
connectionString = x[0];
|
||||
uriBuilder.Port = Convert.ToInt32(x[1]);
|
||||
}
|
||||
else
|
||||
uriBuilder.Host = connectionString;
|
||||
|
||||
|
||||
uriBuilder.Host = connectionString;
|
||||
|
||||
var newConnectionInfo = new ConnectionInfo();
|
||||
newConnectionInfo.CopyFrom(DefaultConnectionInfo.Instance);
|
||||
|
||||
@@ -99,12 +99,17 @@ namespace mRemoteNG.Connection
|
||||
: uriBuilder.Host;
|
||||
|
||||
newConnectionInfo.Protocol = protocol;
|
||||
newConnectionInfo.Hostname = uriBuilder.Host;
|
||||
newConnectionInfo.Username = uriBuilder.UserName;
|
||||
|
||||
if (uriBuilder.Port == -1)
|
||||
{
|
||||
newConnectionInfo.SetDefaultPort();
|
||||
}
|
||||
else
|
||||
{
|
||||
newConnectionInfo.Port = uriBuilder.Port;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(newConnectionInfo.Panel))
|
||||
newConnectionInfo.Panel = Language.General;
|
||||
|
||||
Reference in New Issue
Block a user