Exemple #1
0
        public void PostLoad(RdcMan.IPluginContext context)
        {
            var nodeDClickEvent = context.Tree.GetType().GetEvent("NodeMouseDoubleClick");

            nodeDClickEvent.AddEventHandler(context.Tree, new TreeNodeMouseClickEventHandler((s, ee) =>
            {
                var server = (ee.Node as RdcMan.Server);
                if (server != null && server.IsConnected)
                {
                    server.GetType().InvokeMember("GoFullScreen", BindingFlags.InvokeMethod | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public, null, server, null);
                }
            }));

            var nodeClickEvent = context.Tree.GetType().GetEvent("NodeMouseClick");

            nodeClickEvent.AddEventHandler(context.Tree, new TreeNodeMouseClickEventHandler((s, ee) =>
            {
                var server = (ee.Node as RdcMan.Server);
                if (server != null)
                {
                    var hit = (s as TreeView).HitTest(ee.Location);
                    if (ee.Button == MouseButtons.Left && hit.Location == TreeViewHitTestLocations.Image)
                    {
                        if (server.IsConnected)
                        {
                            server.Disconnect();
                        }
                        else
                        {
                            server.Reconnect();
                        }
                    }
                }
            }));
        }
Exemple #2
0
 public void PreLoad(RdcMan.IPluginContext context, System.Xml.XmlNode xmlNode)
 {
 }