Esempio n. 1
0
        private void TreeViewWindowList_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                WindowNode selectedNode = (WindowNode)e.Node;
                if (selectedNode == null)
                {
                    return;
                }

                ContextMenu cm = new ContextMenu();
                cm.MenuItems.Add("Properties", (send, ev) => OpenProperties(send, ev, selectedNode.GetWindow()));
                cm.MenuItems.Add("Messages", (send, ev) => OpenMessages(send, ev, selectedNode.GetWindow()));
                //cm.MenuItems.Add("Highlight");
                treeViewWindowList.ContextMenu = cm;
            }
        }
Esempio n. 2
0
        private void TreeViewWindowList_DoubleClick(object sender, EventArgs e)
        {
            WindowNode    selectedNode   = (WindowNode)treeViewWindowList.SelectedNode;
            VirtualWindow selectedWindow = selectedNode.GetWindow();

            Console.WriteLine("double click " + selectedWindow.ToString());
            //selectedWindow.

            /*
             * switch (behavior) {
             *  case properties: openProperties
             *  case message: openMessage
             *  case show: highlight
             *  case pullforward: bringToFront and Focus
             * }
             */
        }