mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Removed another OpenConnection overload that didnt take a connectioninfo object
This commit is contained in:
@@ -15,38 +15,6 @@ namespace mRemoteNG.Connection
|
||||
{
|
||||
public static class ConnectionInitiator
|
||||
{
|
||||
//TODO Fix for TreeListView
|
||||
public static void OpenConnection(ConnectionInfo.Force Force)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Windows.treeForm.tvConnections.SelectedNode.Tag == null)
|
||||
return;
|
||||
|
||||
if (ConnectionTreeNode.GetNodeType(ConnectionTree.SelectedNode) == TreeNodeType.Connection | ConnectionTreeNode.GetNodeType(ConnectionTree.SelectedNode) == TreeNodeType.PuttySession)
|
||||
{
|
||||
OpenConnection((ConnectionInfo)Windows.treeForm.tvConnections.SelectedNode.Tag, Force);
|
||||
}
|
||||
else if (ConnectionTreeNode.GetNodeType(ConnectionTree.SelectedNode) == TreeNodeType.Container)
|
||||
{
|
||||
foreach (TreeNode tNode in ConnectionTree.SelectedNode.Nodes)
|
||||
{
|
||||
if (ConnectionTreeNode.GetNodeType(tNode) == TreeNodeType.Connection | ConnectionTreeNode.GetNodeType(ConnectionTree.SelectedNode) == TreeNodeType.PuttySession)
|
||||
{
|
||||
if (tNode.Tag != null)
|
||||
{
|
||||
OpenConnection((ConnectionInfo)tNode.Tag, Force);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, Language.strConnectionOpenFailed + Environment.NewLine + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
//TODO Fix for TreeListView
|
||||
public static void OpenConnection(ConnectionInfo ConnectionInfo)
|
||||
{
|
||||
|
||||
@@ -455,32 +455,32 @@ namespace mRemoteNG.UI.Window
|
||||
|
||||
private void cMenTreeConnect_Click(object sender, EventArgs e)
|
||||
{
|
||||
ConnectionInitiator.OpenConnection(ConnectionInfo.Force.DoNotJump);
|
||||
ConnectionInitiator.OpenConnection(SelectedNode, ConnectionInfo.Force.DoNotJump);
|
||||
}
|
||||
|
||||
private void cMenTreeConnectWithOptionsConnectToConsoleSession_Click(object sender, EventArgs e)
|
||||
{
|
||||
ConnectionInitiator.OpenConnection(ConnectionInfo.Force.UseConsoleSession | ConnectionInfo.Force.DoNotJump);
|
||||
ConnectionInitiator.OpenConnection(SelectedNode, ConnectionInfo.Force.UseConsoleSession | ConnectionInfo.Force.DoNotJump);
|
||||
}
|
||||
|
||||
private void cMenTreeConnectWithOptionsNoCredentials_Click(object sender, EventArgs e)
|
||||
{
|
||||
ConnectionInitiator.OpenConnection(ConnectionInfo.Force.NoCredentials);
|
||||
ConnectionInitiator.OpenConnection(SelectedNode, ConnectionInfo.Force.NoCredentials);
|
||||
}
|
||||
|
||||
private void cMenTreeConnectWithOptionsDontConnectToConsoleSession_Click(object sender, EventArgs e)
|
||||
{
|
||||
ConnectionInitiator.OpenConnection(ConnectionInfo.Force.DontUseConsoleSession | ConnectionInfo.Force.DoNotJump);
|
||||
ConnectionInitiator.OpenConnection(SelectedNode, ConnectionInfo.Force.DontUseConsoleSession | ConnectionInfo.Force.DoNotJump);
|
||||
}
|
||||
|
||||
private void cMenTreeConnectWithOptionsConnectInFullscreen_Click(object sender, EventArgs e)
|
||||
{
|
||||
ConnectionInitiator.OpenConnection(ConnectionInfo.Force.Fullscreen | ConnectionInfo.Force.DoNotJump);
|
||||
ConnectionInitiator.OpenConnection(SelectedNode, ConnectionInfo.Force.Fullscreen | ConnectionInfo.Force.DoNotJump);
|
||||
}
|
||||
|
||||
private void cMenTreeConnectWithOptionsChoosePanelBeforeConnecting_Click(object sender, EventArgs e)
|
||||
{
|
||||
ConnectionInitiator.OpenConnection(ConnectionInfo.Force.OverridePanel | ConnectionInfo.Force.DoNotJump);
|
||||
ConnectionInitiator.OpenConnection(SelectedNode, ConnectionInfo.Force.OverridePanel | ConnectionInfo.Force.DoNotJump);
|
||||
}
|
||||
|
||||
private void cMenTreeDisconnect_Click(object sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user