void hook_KeyPressed(object sender, KeyPressedEventArgs e) { if (txbSaveTo.Text == "") { showTip("请设置正确的保存地址!"); return; } string hotKey = ""; hotKey += ((e.Modifier & ModifierKeys_e.Control) == ModifierKeys_e.Control) ? "Ctrl+" : ""; hotKey += ((e.Modifier & ModifierKeys_e.Alt) == ModifierKeys_e.Alt) ? "Alt+" : ""; hotKey += ((e.Modifier & ModifierKeys_e.Shift) == ModifierKeys_e.Shift) ? "Shift+" : ""; hotKey += e.Key.ToString(); //showTip("已捕获所设置的快捷键:" + e.Modifier.ToString() + " + " + e.Key.ToString()); showTip("已捕获所设置的快捷键:" + hotKey); doDownload(); }