示例#1
0
        public void TestDown()
        {
            h.SelectPrevious();
            h.SelectPrevious();
            h.SelectPrevious();
            h.SelectPrevious();

            Assert.AreEqual(h.SelectNext(), "222");

            Assert.AreEqual(h.SelectNext(), "333");

            Assert.AreEqual(h.SelectNext(), null);
        }
示例#2
0
        private bool IsControlKeys(KeyEventArgs e)
        {
            switch (e.Key)
            {
            case Key.Up:
                SetInput(historyCommand.SelectPreviuos());
                break;

            case Key.Down:
                SetInput(historyCommand.SelectNext());
                break;

            case Key.Home:
                FocusEnd();
                break;

            case Key.Return:
                RunCmd();
                break;

            default:
                return(false);
            }

            return(true);
        }