Interaction logic for CharacterWindow.xaml
Ejemplo n.º 1
0
        private void CreateCharacterButton_Click(object sender, RoutedEventArgs e)
        {
            var newCharacter = new Character();

            var characterWindow = new CharacterWindow(newCharacter, _user, true) { Owner = this };
            characterWindow.ShowDialog();
            Execute(async () => await _mainVm.RefreshCharacters()); //reload character to pick up changes
        }
Ejemplo n.º 2
0
        private void CharactersDataGrid_Row_DoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (CharactersDataGrid.SelectedIndex != -1)
            {
                var character = CharactersDataGrid.SelectedItem as Character;
                if (character == null) return;

                // Load character into new window to update
                //var editWindow = new EditWindow(character);
                //editWindow.ShowDialog();

                var characterWindow = new CharacterWindow(character, _user) {Owner = this};
                characterWindow.ShowDialog();
            }
        }