mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Re-enable expanding previously expanded folders. Implementation is still not ideal, but it's better
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user