Пример #1
0
        public void TestUp()
        {
            Assert.AreEqual(h.SelectPreviuos(), "333");

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

            Assert.AreEqual(h.SelectPreviuos(), "11");

            Assert.AreEqual(h.SelectPreviuos(), 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);
        }