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(); }
private void KeybindRemoved(object sender, KeybindEventArgs e) { }
private void KeybindAdded(object sender, KeybindEventArgs e) { Ids.Add(e.Keybind.Id); dataGridView1.Rows.Add(e.Keybind.Id, e.Keybind.Filename, e.Keybind.Key); }
private void KeyPressed(object sender, KeybindEventArgs e) { player.PlayCachedSound(e.Keybind.Filename); }
private void KeybindStopButton(object sender, KeybindEventArgs e) { player.StopSounds(); }