Beispiel #1
0
        public override void OnKeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            base.OnKeyDown(sender, e);
            if (e.Handled)
            {
                return;
            }

            if (e.KeyCode == System.Windows.Forms.Keys.Escape)
            {
                SingletonSoundCache.Instance.PlaySound(DefaultSoundList.Cancel);
                RaiseExitEvent();
                e.Handled = true;
                return;
            }

            // Go to and from Library Button
            if (e.KeyCode == System.Windows.Forms.Keys.Right)
            {
                if (_library.Focus())
                {
                    _view.Focus();
                }
                else
                {
                    _library.Focus();
                }
            }

            if (e.KeyCode == System.Windows.Forms.Keys.Left)
            {
                if (_view.Focus())
                {
                    _library.Focus();
                }
                else
                {
                    _trailerlist.Focus();
                }
            }

            if (e.KeyCode == System.Windows.Forms.Keys.Down)
            {
                _trailerlist.Focus();
            }

            return;
        }