コード例 #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;
            }
        }