/// <summary> /// Unassign keyboard key or joystick button when double clicked a Datagrid cell. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DataGrid_MouseButtonDoubleClick(object sender, MouseButtonEventArgs e) { KeyMappingTimer.Stop(); KeyAssgn selectedItem = (KeyAssgn)KeyMappingGrid.SelectedItem; if (selectedItem == null) { return; } if (KeyMappingGrid.CurrentColumn == null) { return; } if (selectedItem.GetVisibility() != "White") { return; } if (selectedItem.GetCallback() == "SimDoNothing") { return; } KeyMappingWindow.ShowKeyMappingWindow(selectedItem, keyFile, deviceControl, sender); KeyMappingGrid.Items.Refresh(); KeyMappingGrid.UnselectAllCells(); KeyMappingTimer.Start(); }
public static void ShowKeyMappingWindow(KeyAssgn SelectedCallback, KeyFile keyFile, DeviceControl deviceControl, object sender) { KeyMappingWindow ownWindow = new KeyMappingWindow(SelectedCallback, keyFile, deviceControl); ownWindow.ShowDialog(); }