void Example2() { var hotKey1 = new HotKey(); var hotKey2 = new HotKey(); hotKey1 = HotKeyMessageBox.Show("Title", "Hotkey 1"); hotKey2 = HotKeyMessageBox.Show("Title", "Hotkey 2"); label1.Text = "You have pressed the keys: " + hotKey1.ToString() + " and " + hotKey2.ToString() + ". Are they the same? " + (hotKey1 == hotKey2 ? "Yes" : "No"); }
void Example1() { HotKey hotkey = new HotKey(); if (HotKeyMessageBox.Show("Title", "Please press the key combination", out hotkey) == DialogResult.OK) { label1.Text = "You have pressed the keys: " + hotkey.ToString(); } else { label1.Text = "You have closed the dialog. There is no input"; } }