コード例 #1
0
        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();
        }
コード例 #2
0
        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();
        }