예제 #1
0
        public MainWindow()
        {
            InitializeComponent();

            SettingWindow = new SettingWindow(this)
            {
                Visibility = Visibility.Hidden
            };

            Hotkey = new LauncherHotkey(this);

            RegisterHotkey();

            Keyword.Focus();

            ReservedKey = new ReservedKey(this);
        }
예제 #2
0
        private void Keyword_KeyDown(object sender, KeyEventArgs e)
        {
            var key = Keyword.Text.Trim();

            switch (e.Key)
            {
            case Key.F1:
                ShowSetting(key: key);
                break;

            case Key.Enter:

                if (ReservedKey.IsMatch(key))
                {
                    ReservedKey.Do(key);
                    return;
                }

                Decide();
                break;
            }
        }