예제 #1
0
파일: Program.cs 프로젝트: peterrus/flint
 static void pebble_MediaControlReceived(object sender, MediaControlReceivedEventArgs e)
 {
     Console.WriteLine("Received " + e.Command.ToString());
 }
예제 #2
0
 private void pebble_MediaControlReceived(object sender, MediaControlReceivedEventArgs e)
 {
     if (Properties.Settings.Default.PPTControl
         && Process.GetProcessesByName("POWERPNT").Count() > 0)
     {
         switch (e.Command)
         {
             case Pebble.MediaControls.Forward:
                 SendKeys.SendWait(" ");
                 break;
             case Pebble.MediaControls.Previous:
                 SendKeys.SendWait("{LEFT}");
                 break;
         }
     }
     else if (Properties.Settings.Default.MediaControl)
     {
         switch (e.Command)
         {
             case Pebble.MediaControls.PlayPause:
                 MediaControl.PlayPause();
                 break;
             case Pebble.MediaControls.Forward:
                 MediaControl.Next();
                 break;
             case Pebble.MediaControls.Previous:
                 MediaControl.Prev();
                 break;
         }
     }
 }