示例#1
0
 private void HandleKeyPress(ButtonHandler.KeyCodes key)
 {
     if (key == ButtonHandler.KeyCodes.Clear)
     {
         Clear();
     }
     else if (key == ButtonHandler.KeyCodes.Key)
     {
         Enter();
     }
     else
     {
         NumberPressed((int)key);
     }
 }
 private void HandleKeyPress(ButtonHandler.KeyCodes key)
 {
     if (key == ButtonHandler.KeyCodes.Clear)
     {
         if (beepSound != null)
         {
             beepSound.Play();
         }
         Clear();
     }
     else if (key == ButtonHandler.KeyCodes.Key)
     {
         Enter();
     }
     else
     {
         if (beepSound != null)
         {
             beepSound.Play();
         }
         NumberPressed((int)key);
     }
 }