Пример #1
0
 public void CanGetDisplayText3()
 {
     Assert.AreEqual("ALT+A",
                     KeyboardUtils.GetDisplayText(
                         KeyboardUtils.CreateShortcut(Keys.A, false, false,
                                                      true)));
 }
Пример #2
0
        public void CanGetDisplayTextNumericKeys()
        {
            var numericKeys = new[]
            {
                Keys.D1, Keys.D2, Keys.D3,
                Keys.D4, Keys.D5, Keys.D6,
                Keys.D7, Keys.D8, Keys.D9
            };

            int keyValue = 1;

            foreach (Keys numericKey in numericKeys)
            {
                Assert.AreEqual("CTRL+" + keyValue,
                                KeyboardUtils.GetDisplayText(
                                    KeyboardUtils.CreateShortcut(numericKey, true)));
                keyValue++;
            }
        }
Пример #3
0
 private void RenderShortcut()
 {
     base.Text = _shortcut != null
                                     ? KeyboardUtils.GetDisplayText(_shortcut)
                                     : string.Empty;
 }
Пример #4
0
 public void CanGetDisplayText4()
 {
     Assert.AreEqual("F6",
                     KeyboardUtils.GetDisplayText(
                         KeyboardUtils.CreateShortcut(Keys.F6)));
 }
Пример #5
0
 public void CanGetDisplayText2()
 {
     Assert.AreEqual("CTRL+SHIFT+S",
                     KeyboardUtils.GetDisplayText(
                         KeyboardUtils.CreateShortcut(Keys.S, true, true)));
 }
Пример #6
0
 public void CanGetDisplayText1()
 {
     Assert.AreEqual("Escape",
                     KeyboardUtils.GetDisplayText(
                         KeyboardUtils.CreateShortcut(Keys.Escape)));
 }