예제 #1
0
        public static void Main(string[] args)
        {
            var config = QcmdConfig.Create("config.json");

            if (config == null)
            {
                throw new Exception("Config null - create a config.json file");
            }

            var form = new QCmdHostForm(config);

            Application.Run(form);
        }
예제 #2
0
파일: QcmdHostForm.cs 프로젝트: aevv/qcmd
        public QCmdHostForm(QcmdConfig config)
        {
            _config = config;

            InitializeComponent();

            _hook = new KeyboardHook();
            _hook.KeyPressed += KeyPressed;

            _hook.RegisterHotKey(KeyboardHook.ModifierKeys.Win, Keys.Q);
            _hook.RegisterHotKey(KeyboardHook.ModifierKeys.Control | KeyboardHook.ModifierKeys.Alt, Keys.NumPad8);

            _browser = new BrowserWrapper(config.StartPage);
            _browser.HideCallback = ThreadedHide;
            Controls.Add(_browser.Control);

            Closed += (o, s) => CefSharp.Cef.Shutdown();

            CenterToScreen();
            Location = new Point(Location.X, 0);
        }
예제 #3
0
파일: QcmdHostForm.cs 프로젝트: aevv/qcmd
        public QCmdHostForm(QcmdConfig config)
        {
            _config = config;

            InitializeComponent();

            _hook             = new KeyboardHook();
            _hook.KeyPressed += KeyPressed;

            _hook.RegisterHotKey(KeyboardHook.ModifierKeys.Win, Keys.Q);
            _hook.RegisterHotKey(KeyboardHook.ModifierKeys.Control | KeyboardHook.ModifierKeys.Alt, Keys.NumPad8);

            _browser = new BrowserWrapper(config.StartPage);
            _browser.HideCallback = ThreadedHide;
            Controls.Add(_browser.Control);

            Closed += (o, s) => CefSharp.Cef.Shutdown();

            CenterToScreen();
            Location = new Point(Location.X, 0);
        }