mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Extracted method for opening connections from last session
This commit is contained in:
@@ -80,20 +80,11 @@ namespace mRemoteNG.Config.Connections
|
||||
RootTreeNode.SelectedImageIndex = (int)TreeImageType.Root;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// SECTION 3. Populate the TreeView with the DOM nodes.
|
||||
PopulateTreeview();
|
||||
|
||||
//open connections from last mremote session
|
||||
if (mRemoteNG.Settings.Default.OpenConsFromLastSession && !mRemoteNG.Settings.Default.NoReconnect)
|
||||
{
|
||||
foreach (ConnectionInfo conI in ConnectionList)
|
||||
{
|
||||
if (conI.PleaseConnect)
|
||||
Runtime.OpenConnection(conI);
|
||||
}
|
||||
}
|
||||
OpenConnectionsFromLastSession();
|
||||
|
||||
RootTreeNode.EnsureVisible();
|
||||
if (!import)
|
||||
@@ -109,6 +100,18 @@ namespace mRemoteNG.Config.Connections
|
||||
}
|
||||
}
|
||||
|
||||
private void OpenConnectionsFromLastSession()
|
||||
{
|
||||
if (mRemoteNG.Settings.Default.OpenConsFromLastSession && !mRemoteNG.Settings.Default.NoReconnect)
|
||||
{
|
||||
foreach (ConnectionInfo conI in ConnectionList)
|
||||
{
|
||||
if (conI.PleaseConnect)
|
||||
Runtime.OpenConnection(conI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void PopulateTreeview()
|
||||
{
|
||||
Windows.treeForm.tvConnections.BeginUpdate();
|
||||
|
||||
Reference in New Issue
Block a user