예제 #1
0
        private void AddISBN(NewBook obj)
        {
            if (obj != null && ISBNs.LastOrDefault() != obj)
            {
                return;
            }
            var isbn = new NewBook(_isbns);

            isbn.PropertyChanged += (sender, args) =>
            {
                if (args.PropertyName != nameof(IsValid))
                {
                    return;
                }
                OnPropertyChanged(nameof(IsValid));
            };
            ISBNs.Add(isbn);
        }
예제 #2
0
 public NewBookDialog()
 {
     InitializeComponent();
     DataContext = new NewBook();
 }