private void DetailSettingsBtn_OnClick(object sender, RoutedEventArgs e) { int id = Int32.Parse(((Button)sender).Tag.ToString()); DetailsCommandSettingsWindow settingsWindow = new DetailsCommandSettingsWindow(); CustomBotCommand xCommand = CommandsController.CustomCommandsList.FirstOrDefault(command => command.Id == id); settingsWindow.DataContext = new DetailsCommandSettingsViewModel <CustomBotCommand>(xCommand); settingsWindow.ShowDialog(); }
private void ButtonBase_OnClick(object sender, System.Windows.RoutedEventArgs e) { int id = Int32.Parse(((Button)sender).Tag.ToString()); DetailsCommandSettingsWindow settingsWindow = new DetailsCommandSettingsWindow(); PlayerBotCommand xCommand = CommandsController.PlayerCommandsList.FirstOrDefault(command => command.Id == id); settingsWindow.DataContext = new DetailsCommandSettingsViewModel <PlayerBotCommand>(xCommand); settingsWindow.ShowDialog(); }