예제 #1
0
        public ChildWindowFocusHelper(frmSuperPutty form)
        {
            this.MainForm = form;
            this.MainForm.ResizeEnd += HandleResizeEnd;

            foreach (IDockContent doc in this.MainForm.DockPanel.Contents)
            {
                ctlPuttyPanel pp = doc as ctlPuttyPanel;
                if (pp != null)
                {
                    this.childWindows.Add(pp.AppPanel.AppWindowHandle, pp);
                }
            }
            this.MainForm.DockPanel.ContentAdded += DockPanel_ContentAdded;
            this.MainForm.DockPanel.ContentRemoved += DockPanel_ContentRemoved;
        }
예제 #2
0
        public ChildWindowFocusHelper(frmSuperPutty form)
        {
            this.MainForm            = form;
            this.MainForm.ResizeEnd += HandleResizeEnd;

            foreach (IDockContent doc in this.MainForm.DockPanel.Contents)
            {
                ctlPuttyPanel pp = doc as ctlPuttyPanel;
                if (pp != null)
                {
                    this.childWindows.Add(pp.AppPanel.AppWindowHandle, pp);
                }
            }
            this.MainForm.DockPanel.ContentAdded   += DockPanel_ContentAdded;
            this.MainForm.DockPanel.ContentRemoved += DockPanel_ContentRemoved;
        }
예제 #3
0
        /// <summary>
        /// Creates global keyboard listener.
        /// </summary>
        public KeyboardListener(frmSuperPutty form, GlobalHotkeys hotkeys)
        {
            this.hotkeys = hotkeys;
            this.form    = form;

            // Dispatcher thread handling the KeyDown/KeyUp events.
            this.dispatcher = Dispatcher.CurrentDispatcher;

            // We have to store the LowLevelKeyboardProc, so that it is not garbage collected runtime
            hookedLowLevelKeyboardProc = (WinAPI.LowLevelKeyboardProc)LowLevelKeyboardProc;

            // Set the hook
            hookId = InterceptKeys.SetHook(hookedLowLevelKeyboardProc);

            // Assign the asynchronous callback event
            hookedKeyboardCallbackAsync = new KeyboardCallbackAsync(KeyboardListener_KeyboardCallbackAsync);
        }
예제 #4
0
        /// <summary>
        /// Creates global keyboard listener.
        /// </summary>
        public KeyboardListener(frmSuperPutty form, GlobalHotkeys hotkeys)
        {
            this.hotkeys = hotkeys;
            this.form = form;

            // Dispatcher thread handling the KeyDown/KeyUp events.
            this.dispatcher = Dispatcher.CurrentDispatcher;

            // We have to store the LowLevelKeyboardProc, so that it is not garbage collected runtime
            hookedLowLevelKeyboardProc = (WinAPI.LowLevelKeyboardProc)LowLevelKeyboardProc;

            // Set the hook
            hookId = InterceptKeys.SetHook(hookedLowLevelKeyboardProc);

            // Assign the asynchronous callback event
            hookedKeyboardCallbackAsync = new KeyboardCallbackAsync(KeyboardListener_KeyboardCallbackAsync);
        }
예제 #5
0
        // Constants from winuser.h

        public WindowTitleTracker(frmSuperPutty form) : base(form)
        {
            HookEvent(WinAPI.EVENT_OBJECT_NAMECHANGE);
        }
예제 #6
0
 public WindowEventHandler(frmSuperPutty form)
 {
     m_form = form;
 }
 public RestoreFromMinimizedTracker(frmSuperPutty form) : base(form)
 {
     HookEvent(EVENT_SYSTEM_MINIMIZEEND);
 }
예제 #8
0
        // Constants from winuser.h

        public WindowTitleTracker(frmSuperPutty form) : base(form)
        {
            HookEvent(WinAPI.EVENT_OBJECT_NAMECHANGE);
        }
예제 #9
0
 public WindowEventHandler(frmSuperPutty form)
 {
     m_form = form;
 }