Exemplo n.º 1
0
        private void NoteCommandAction(Object parameter)
        {
            var book    = parameter as Book;
            var dialog  = new SimpleInputTextDialog();
            var context = dialog.DataContext as SimpleInputTextDialogVM;

            context.InitDialog("Notatka", "Poniżej możesz wpisać treść notatki.", "Anuluj", "Zapisz", "Wpisz treść...");
            context.InputValue = book.Note;

            if (dialog.ShowDialog() == true)
            {
                var copy = new Book(book);
                copy.Note = context.InputValue;

                BooksDAO.AddBook(copy);

                book.Note = context.InputValue;
            }
        }
Exemplo n.º 2
0
 private void SaveBookCommandAction(Object parameter)
 {
     BooksDAO.AddBook(Book);
     OnCloseDialog(new DialogEventArgs(true));
 }