Fix bug when run ExternalApp with multifolder structure

This commit is contained in:
Kirill Trifonov
2019-03-08 14:49:22 +03:00
parent 7c4df9b1c4
commit 149778000a
2 changed files with 10 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
@@ -7,6 +7,7 @@ using System.IO;
using mRemoteNG.App;
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Container;
using mRemoteNG.Messages;
// ReSharper disable ArrangeAccessorOwnerBody
@@ -126,6 +127,11 @@ namespace mRemoteNG.Tools
}
ConnectionInfo = startConnectionInfo;
if (ConnectionInfo.IsContainer)
{
(ConnectionInfo as ContainerInfo).Children.ForEach(child => Start(child));
return;
}
if (TryIntegrate)
StartIntegrated();

View File

@@ -835,12 +835,9 @@ namespace mRemoteNG.UI.Controls
{
try
{
if (_connectionTree.SelectedNode.GetTreeNodeType() == TreeNodeType.Container)
(_connectionTree.SelectedNode as ContainerInfo).Children.ForEach(
child => externalTool.Start(child));
else if (_connectionTree.SelectedNode.GetTreeNodeType() == TreeNodeType.Connection |
_connectionTree.SelectedNode.GetTreeNodeType() == TreeNodeType.PuttySession)
if (_connectionTree.SelectedNode.GetTreeNodeType() == TreeNodeType.Connection |
_connectionTree.SelectedNode.GetTreeNodeType() == TreeNodeType.PuttySession |
_connectionTree.SelectedNode.GetTreeNodeType() == TreeNodeType.Container)
externalTool.Start(_connectionTree.SelectedNode);
}
catch (Exception ex)