/// <summary>
 /// 启动键盘钩子。
 /// </summary>
 /// <returns>True如果没有例外。</returns>
 public static bool Enable()
 {
     if (Enabled == false)
     {
         try
         {
             using (Process curProcess = Process.GetCurrentProcess())
                 using (ProcessModule curModule = curProcess.MainModule)
                     hHook = Hooks.SetWindowsHookEx((int)Hooks.HookType.WH_KEYBOARD_LL, hookproc, Hooks.GetModuleHandle(curModule.ModuleName), 0);
             Enabled = true;
             return(true);
         }
         catch
         {
             Enabled = false;
             return(false);
         }
     }
     else
     {
         return(false);
     }
 }