示例#1
0
 public WindowNode(VirtualWindow window)
 {
     this.window = window;
     isAlive     = true;
     UpdateText();
     UpdateIconKey();
 }
示例#2
0
        public PropertiesForm(VirtualWindow virtualWindow)
        {
            InitializeComponent();

            window = virtualWindow;
            UpdateTitle();
        }
示例#3
0
        private static void DrawPOC(VirtualWindow virtualWindow)
        {
            //proof of concept, draw on other windows
            var g = Graphics.FromHwnd(virtualWindow.handle);

            g.DrawRectangle(Pens.Red, 0, 0, 100, 100);

            g.Dispose();
        }
示例#4
0
        public MessageLogForm(VirtualWindow targetWindow)
        {
            InitializeComponent();

            window       = targetWindow;
            log          = new List <string>();
            messageCount = 0;
            alive        = true;

            UpdateTitle();
        }
示例#5
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
             * }
             */
        }
示例#6
0
        private void AddNewWindowNode(VirtualWindow window, bool mark)
        {
            WindowNode windowNode = new WindowNode(window, true);

            Icon icon = window.GetAppIcon();

            if (icon != null)
            {
                //Console.WriteLine("icon added for: " + window.ToString());
                imageListTreeIcons.Images.Add(window.handle.ToString(), icon);
            }

            if (mark)
            {
                windowNode.MarkNew();
            }

            treeViewWindowList.Nodes.Add(windowNode);
        }
 public SelfMessageLogForm() : base(null)
 {
     //ensure we have a handle, monitor our self
     CreateHandle();
     window = new VirtualWindow(Handle);
 }
示例#8
0
 private void OpenMessages(object sender, EventArgs e, VirtualWindow window)
 {
     Console.WriteLine("messages: " + window.ToString());
     window.OpenMessageLog();
 }
示例#9
0
 private void OpenProperties(object sender, EventArgs e, VirtualWindow window)
 {
     Console.WriteLine("properties: " + window.ToString());
     window.OpenPropertiesForm();
 }
示例#10
0
 public WindowNode(VirtualWindow window, bool populateChildren) : this(window) {
     if (populateChildren)
     {
         PopulateChildNodes();
     }
 }