Beispiel #1
0
        protected override void OnHandleCreated(EventArgs e)
        {
            base.OnHandleCreated(e);

            Native.SetParent(this.Handle, Native.HWND_MESSAGE);
            KeyboardShortcutsManager.Create(this.Handle);
            KeyboardShortcutsManager.Instance.KeyboardShortcutPressed += KeyboardShortcutsManager_KeyboardShortcutPressed;

            if (!_startup)
            {
                CreateNewTabbedAnything(Point.Empty);
            }
        }
Beispiel #2
0
        public static KeyboardShortcutsManager Create(IntPtr windowHandle)
        {
            LOG.DebugFormat("Create - Window Handle: {0}", windowHandle);

            if (_instance != null)
            {
                LOG.Fatal("Create - Attempted to re-call Create().");
                throw new InvalidOperationException("KeyboardShortcutsManager.Create() can only be called once.");
            }

            _instance = new KeyboardShortcutsManager(windowHandle);

            return(Instance);
        }