public void ParseAllModifiers() { key = HotKey.Parse("Ctrl+Alt+Shift+Win+A"); Assert.IsTrue(key.Ctrl); Assert.IsTrue(key.Alt); Assert.IsTrue(key.Shift); Assert.IsTrue(key.Win); }
public void ParseCtrl() { key = HotKey.Parse("Ctrl+F11"); Assert.IsTrue(key.Ctrl); Assert.IsFalse(key.Alt); Assert.IsFalse(key.Shift); Assert.IsFalse(key.Win); }
public void ToStringWithNumKey() { key = HotKey.Parse("Ctrl+1"); Assert.AreEqual("Ctrl+1", key.ToString()); }
public void ToStringWithModifiers() { key = HotKey.Parse("Win+Ctrl+Alt+Shift+R"); Assert.AreEqual("Win+Ctrl+Alt+Shift+R", key.ToString()); }
public void ToStringSimple() { key = HotKey.Parse("F5"); Assert.AreEqual("F5", key.ToString()); }
public void KeyCode() { key = HotKey.Parse("5"); Assert.AreEqual((int)Keys.D5, key.Code); }
public void BadKey() { key = HotKey.Parse("BadKey"); Assert.AreEqual(Keys.F12, key.Key); }
public void ParseKey() { key = HotKey.Parse("Shift+1"); Assert.AreEqual(Keys.D1, key.Key); }
public void Register() { manager.Register(null, 1, HotKey.Parse("Ctrl+F12")); }