private void EditButton_Click(object sender, RoutedEventArgs e) { if (keybindsList.SelectedItem != null) { int index = KeybindList.IndexOf(keybindsList.SelectedItem as string); KeyBindingDialog kb = new KeyBindingDialog(); KeybindList[index] = kb.ShowInputDialog(KeybindList[index]); RefreshDataSource(); } }
private void AddButton_Click(object sender, RoutedEventArgs e) { KeyBindingDialog kb = new KeyBindingDialog(); string newKeybind = kb.ShowInputDialog("NONE"); if (newKeybind != "NONE") { KeybindList.Add(newKeybind); RefreshDataSource(); } }