Example #1
0
 /// <summary>
 /// Tries to send a Skip Back command
 /// </summary>
 /// <returns>returns true if the keypress was sent, false if there was an error</returns>
 public bool SkipBack()
 {
     try
     {
         KeyboardInteraction.SendKey(KeyboardInteraction.KeyCode.MEDIA_PREV_TRACK);
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Example #2
0
 /// <summary>
 /// Tries to send a Play/Pause command
 /// </summary>
 /// <returns>returns true if the keypress was sent, false if there was an error</returns>
 public bool PlayPause()
 {
     try
     {
         KeyboardInteraction.SendKey(KeyboardInteraction.KeyCode.MEDIA_PLAY_PAUSE);
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Example #3
0
 /// <summary>
 /// Tries to decrease the volume
 /// </summary>
 /// <returns>returns true if the keypress was sent, false if there was an error</returns>
 public bool DecreaseVolume()
 {
     try
     {
         KeyboardInteraction.SendKey(KeyboardInteraction.KeyCode.VOLUME_DOWN);
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Example #4
0
 /// <summary>
 /// Tries to send a mute command
 /// </summary>
 /// <returns>returns true if the keypress was sent, false if there was an error</returns>
 public bool Mute()
 {
     try
     {
         KeyboardInteraction.SendKey(KeyboardInteraction.KeyCode.VOLUME_MUTE);
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Example #5
0
 /// <summary>
 /// Tries to send a stop command
 /// </summary>
 /// <returns>returns true if the keypress was sent, false if there was an error</returns>
 public bool Stop()
 {
     try
     {
         KeyboardInteraction.SendKey(KeyboardInteraction.KeyCode.MEDIA_STOP);
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }