private void CreateOwnedIfDoesntExist() { if (owned == null) { owned = new OwnerShipModel(false); } }
private void LoadPreviousValues(object sender, RoutedEventArgs e) { TB_BookTitle.Text = ThisBook.Title; SetAuthorNameValues(); TBXBL_SelectedGenre.Text = ThisBook.Genre; TXTBL_SelectedFormat.Text = ThisBook.Format; owned = ThisBook.Owned; if (owned != null) { LoadPreviousOwnedValues(); } options = ThisBook.ConditionsAndOptions; if (options != null) { LoadPreviousOptionValues(); } volumeInSeries = ThisBook.VolumeNumber; if (volumeInSeries != null) { TXTBX_VolumeInSeries.Text = volumeInSeries.VolumeNumber.ToString(); } }
public EditBookDlg() { InitializeComponent(); Loaded += new RoutedEventHandler(LoadPreviousValues); // The owned, options and volumeinseries data is edited in the main editor and requires // different handling from the other data that is edited in it's own popup editor. owned = null; options = null; volumeInSeries = null; }
public AddBookDlg() { InitializeComponent(); newBook = new BookModel(false); PopulateSeriesSelector(); InitCategorySelection(); InitStatusSelection(); InitFormatSelection(); InitConditionSelection(); Loaded += new RoutedEventHandler(bypassAuthorSelectionIfAuthorSelected); _formatSelected = false; _genreSelected = false; owned = null; options = null; }