示例#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();
 }