Esempio n. 1
0
 private void KeybindUpdated(object sender, KeybindEventArgs e)
 {
     for (var i = 0; i < dataGridView1.Rows.Count; ++i)
     {
         string id = (string)dataGridView1.Rows[i].Cells[0].Value;
         if (id == e.Keybind.Id)
         {
             dataGridView1.Rows[i].Cells[1].Value = e.Keybind.Filename;
         }
     }
 }
        public void SetKeybind(KeypadButton whichButton, KeybindEventArgs e)
        {
            switch (whichButton)
            {
            case KeypadButton.Left:
                Keybinds.LeftButtonScanCode = e.ScanCode;
                break;

            case KeypadButton.Right:
                Keybinds.RightButtonScanCode = e.ScanCode;
                break;

            case KeypadButton.Side:
                Keybinds.SideButtonScanCode = e.ScanCode;
                break;
            }
            if (!Keybinds.PushAllValues())
            {
                Console.WriteLine("Readback failed");
            }
            NotifyAllProperties();
        }
Esempio n. 3
0
 private void KeybindRemoved(object sender, KeybindEventArgs e)
 {
 }
Esempio n. 4
0
 private void KeybindAdded(object sender, KeybindEventArgs e)
 {
     Ids.Add(e.Keybind.Id);
     dataGridView1.Rows.Add(e.Keybind.Id, e.Keybind.Filename, e.Keybind.Key);
 }
Esempio n. 5
0
 private void KeyPressed(object sender, KeybindEventArgs e)
 {
     player.PlayCachedSound(e.Keybind.Filename);
 }
Esempio n. 6
0
 private void KeybindStopButton(object sender, KeybindEventArgs e)
 {
     player.StopSounds();
 }