Exemplo n.º 1
0
        private void CommandBinding_ChangeAuthorExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            Author auth = this.authorsListView.SelectedItem as Author;

            auth.IsNew = false;
            var authWindow = new NewAuthor(auth);

            authWindow.ShowDialog();
            this.authorsListView.Items.Refresh();
        }
Exemplo n.º 2
0
        private void CommandBinding_NewAuthorExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            Author auth       = new Author();
            var    authWindow = new NewAuthor(auth);

            if ((bool)authWindow.ShowDialog())
            {
                this.AuthorCollection.Add(auth);
            }
        }