public bool IsClientAllowedToSendKey(Keys pKey, HiveCommunicationServerClient pClient)
 {
     if (this.AllowInput == true)
     {
         if (pClient.AllowInput == true)
         {
             // Check if key is allowed in client.AllowedKeys list
             Keys foundKey = Keys.None;
             if ((foundKey = pClient.AllowedKeys.Find(pK => pK == pKey)) != Keys.None)
             {
                 if (pClient.MinimumTimeCountdown == 0)
                 {
                     if (this.Window.Title != "nowindowselectedinputhive" && !String.IsNullOrWhiteSpace(this.Window.Title))
                     {
                         return(true);
                     }
                     InputHiveServerForm.LoggingQueue.Enqueue(String.Format(
                                                                  "{0} A key was sent from {1} but no window was set.", DateTime.Now, pClient));
                 }
                 else
                 {
                     InputHiveServerForm.LoggingQueue.Enqueue(String.Format(
                                                                  "{0} Key {1} was sent from {2} but client is not allowed to send yet.",
                                                                  DateTime.Now, pKey, pClient));
                     pClient.SendMessage("sendnotallowedcooldown");
                 }
             }
             else
             {
                 InputHiveServerForm.LoggingQueue.Enqueue(String.Format(
                                                              "{0} Key {1} was sent from {2} but client is not allowed to send this key.",
                                                              DateTime.Now, pKey, pClient));
                 pClient.SendMessage("sendnotallowedkey");
             }
         }
         else
         {
             InputHiveServerForm.LoggingQueue.Enqueue(String.Format(
                                                          "{0} Key {1} was sent from {2} but client is not allowed to send.",
                                                          DateTime.Now, pKey, pClient));
             pClient.SendMessage("sendnotallowed");
         }
     }
     else
     {
         InputHiveServerForm.LoggingQueue.Enqueue(String.Format(
                                                      "{0} Key {1} was sent from {2} but server is not receiving keys.",
                                                      DateTime.Now, pKey, pClient));
         pClient.SendMessage("nosend");
     }
     return(false);
 }