示例#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();
        }
示例#3
0
 private void KeybindRemoved(object sender, KeybindEventArgs e)
 {
 }
示例#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);
 }
示例#5
0
 private void KeyPressed(object sender, KeybindEventArgs e)
 {
     player.PlayCachedSound(e.Keybind.Filename);
 }
示例#6
0
 private void KeybindStopButton(object sender, KeybindEventArgs e)
 {
     player.StopSounds();
 }