Наследование: System.Windows.Forms.NativeWindow, IDisposable
Пример #1
0
        public Main()
        {
            HotKeys = new GlobalHotKeys();
            HotKeys.Register(Keys.Oemtilde, Modifiers.Ctrl, this.Toggle, true);
            var ctrlShift = Modifiers.Ctrl | Modifiers.Shift;
            TerminalHotKeys = new GlobalHotKey[] {
                HotKeys.Register(Keys.E, ctrlShift, SplitTerminalHorizontally),
                HotKeys.Register(Keys.O, ctrlShift, SplitTerminalVertically),
                HotKeys.Register(Keys.W, ctrlShift, CloseTerminal)
            };

            InitializeComponent();
            Height = Properties.Settings.Default.Height;
            Opacity = Properties.Settings.Default.Opacity;
            Width = Screen.PrimaryScreen.Bounds.Width;
            var terminal = CreateNewTerminal();
            Controls.Add(terminal);
            ControlRemoved += new ControlEventHandler(TerminalRemoved);

            Padding = new Padding(0, 0, 0, 4);
        }
Пример #2
0
        public Main()
        {
            HotKeys = new GlobalHotKeys();
            HotKeys.Register(Keys.Oemtilde, Modifiers.Ctrl, this.Toggle, true);
            var ctrlShift = Modifiers.Ctrl | Modifiers.Shift;
            TerminalHotKeys = new GlobalHotKey[] { 
                HotKeys.Register(Keys.E, ctrlShift, SplitTerminalHorizontally),
                HotKeys.Register(Keys.O, ctrlShift, SplitTerminalVertically),
                HotKeys.Register(Keys.W, ctrlShift, CloseTerminal)
            };
    
            InitializeComponent();
            Height = Properties.Settings.Default.Height;
            Opacity = Properties.Settings.Default.Opacity;
            Width = Screen.PrimaryScreen.Bounds.Width;
            var terminal = CreateNewTerminal();
            Controls.Add(terminal);
            ControlRemoved += new ControlEventHandler(TerminalRemoved);

            Padding = new Padding(0, 0, 0, 4);
        }