Files
mRemoteNG/mRemoteV1/Tree/SwitchToConnectionClickHandler.cs
David Sparer 4c792308bb moved all click-actions for the tree to separate classes to make them easily composable
this has the nice effect of also pushing any calls to the settings class outside the classes that are actualy doing work, making them much easier to test in isolation
2017-01-12 12:47:23 -07:00

15 lines
479 B
C#

using mRemoteNG.Connection;
namespace mRemoteNG.Tree
{
public class SwitchToConnectionClickHandler : ITreeNodeClickHandler
{
public void Execute(ConnectionInfo clickedNode)
{
if (clickedNode == null) return;
if (clickedNode.GetTreeNodeType() != TreeNodeType.Connection && clickedNode.GetTreeNodeType() != TreeNodeType.PuttySession) return;
ConnectionInitiator.SwitchToOpenConnection(clickedNode);
}
}
}