mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
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
15 lines
479 B
C#
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);
|
|
}
|
|
}
|
|
} |