public void Addvalue(int keyId, KeyStatusValue value)
 {
     if (Globals.ThisAddIn.Session.HardwareConfiguration.TakeOnlyKeypadsConfigurated)
     {
         if (Globals.ThisAddIn.Session.HardwareConfiguration.ExistKeypadConfigurated(keyId))
         {
             AddOrUpdateKayValue(keyId, value);
         }
     }
     else
     {
         AddOrUpdateKayValue(keyId, value);
     }
 }
 private void AddOrUpdateKayValue(int keyId, KeyStatusValue value)
 {
     if (Values.ContainsKey(keyId))
         Values[keyId] = value;
     else
         Values.Add(keyId, value);
 }