diff --git a/mRemoteV1/Config/Connections/XmlConnectionsDeserializer.cs b/mRemoteV1/Config/Connections/XmlConnectionsDeserializer.cs index 2a0076e8b..e9a910b8a 100644 --- a/mRemoteV1/Config/Connections/XmlConnectionsDeserializer.cs +++ b/mRemoteV1/Config/Connections/XmlConnectionsDeserializer.cs @@ -31,7 +31,6 @@ namespace mRemoteNG.Config.Connections //TODO find way to inject data source info private string ConnectionFileName = ""; - //public TreeNode RootTreeNode { get; set; } public ConnectionList ConnectionList { get; set; } public ContainerList ContainerList { get; set; } @@ -461,15 +460,6 @@ namespace mRemoteNG.Config.Connections return connectionInfo; } - private void ExpandPreviouslyOpenedFolders() - { - foreach (ContainerInfo contI in ContainerList) - { - if (contI.IsExpanded) - contI.TreeNode.Expand(); - } - } - private bool IsExportFile() { var isExportFile = false; diff --git a/mRemoteV1/UI/Forms/frmMain.cs b/mRemoteV1/UI/Forms/frmMain.cs index af0dab542..aed7faf13 100644 --- a/mRemoteV1/UI/Forms/frmMain.cs +++ b/mRemoteV1/UI/Forms/frmMain.cs @@ -153,6 +153,7 @@ namespace mRemoteNG.UI.Forms Windows.treePanel.Focus(); ConnectionTree.TreeView = Windows.treeForm.tvConnections; + Windows.treeForm.ExpandPreviouslyOpenedFolders(); Config.Putty.Sessions.StartWatcher(); if (Settings.Default.StartupComponentsCheck) diff --git a/mRemoteV1/UI/Window/ConnectionTreeWindow.cs b/mRemoteV1/UI/Window/ConnectionTreeWindow.cs index 91590f95a..8f0f20208 100644 --- a/mRemoteV1/UI/Window/ConnectionTreeWindow.cs +++ b/mRemoteV1/UI/Window/ConnectionTreeWindow.cs @@ -104,10 +104,19 @@ namespace mRemoteNG.UI.Window { tvConnections_AfterSelect(tvConnections, new TreeViewEventArgs(tvConnections.SelectedNode, TreeViewAction.ByMouse)); } + + public void ExpandPreviouslyOpenedFolders() + { + foreach (ContainerInfo contI in Runtime.ContainerList) + { + if (contI.IsExpanded) + contI.TreeNode.Expand(); + } + } #endregion - + #region Public Properties - public ToolTip DescriptionTooltip {get; set;} + public ToolTip DescriptionTooltip {get; set;} #endregion #region Private Methods