Exemplo n.º 1
0
 //Checks numpad button and records to corresponing macro
 public static void RecordCheck(int vkCode)
 {
     if ((Keys)vkCode == Keys.NumPad0)
     {
         SoundSystem.StartRecording(0);
     }
     else if ((Keys)vkCode == Keys.NumPad1)
     {
         SoundSystem.StartRecording(1);
     }
     else if ((Keys)vkCode == Keys.NumPad2)
     {
         SoundSystem.StartRecording(2);
     }
     else if ((Keys)vkCode == Keys.NumPad3)
     {
         SoundSystem.StartRecording(3);
     }
     else if ((Keys)vkCode == Keys.NumPad4)
     {
         SoundSystem.StartRecording(4);
     }
     else if ((Keys)vkCode == Keys.NumPad5)
     {
         SoundSystem.StartRecording(5);
     }
     else if ((Keys)vkCode == Keys.NumPad6)
     {
         SoundSystem.StartRecording(6);
     }
     else if ((Keys)vkCode == Keys.NumPad7)
     {
         SoundSystem.StartRecording(7);
     }
     else if ((Keys)vkCode == Keys.NumPad8)
     {
         SoundSystem.StartRecording(8);
     }
     else if ((Keys)vkCode == Keys.NumPad9)
     {
         SoundSystem.StartRecording(9);
     }
 }
Exemplo n.º 2
0
 //Function for checking what key was pressed, plays corresponding macro
 public static void MacroCheck(int vkCode)
 {
     if ((Keys)vkCode == Keys.NumPad0)
     {
         SoundSystem.PlayMacro(0);
     }
     else if ((Keys)vkCode == Keys.NumPad1)
     {
         SoundSystem.PlayMacro(1);
     }
     else if ((Keys)vkCode == Keys.NumPad2)
     {
         SoundSystem.PlayMacro(2);
     }
     else if ((Keys)vkCode == Keys.NumPad3)
     {
         SoundSystem.PlayMacro(3);
     }
     else if ((Keys)vkCode == Keys.NumPad4)
     {
         SoundSystem.PlayMacro(4);
     }
     else if ((Keys)vkCode == Keys.NumPad5)
     {
         SoundSystem.PlayMacro(5);
     }
     else if ((Keys)vkCode == Keys.NumPad6)
     {
         SoundSystem.PlayMacro(6);
     }
     else if ((Keys)vkCode == Keys.NumPad7)
     {
         SoundSystem.PlayMacro(7);
     }
     else if ((Keys)vkCode == Keys.NumPad8)
     {
         SoundSystem.PlayMacro(8);
     }
     else if ((Keys)vkCode == Keys.NumPad9)
     {
         SoundSystem.PlayMacro(9);
     }
 }
Exemplo n.º 3
0
 //eventhandler to play the sound
 private void ButtonClick(object o, EventArgs e)
 {
     SoundSystem.PlayMacro(Convert.ToInt16(((Button)o).Name.Substring(3)));
 }