예제 #1
0
 private void CreateOwnedIfDoesntExist()
 {
     if (owned == null)
     {
         owned = new OwnerShipModel(false);
     }
 }
예제 #2
0
        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();
            }
        }
예제 #3
0
 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;
 }
예제 #4
0
 public AddBookDlg()
 {
     InitializeComponent();
     newBook = new BookModel(false);
     PopulateSeriesSelector();
     InitCategorySelection();
     InitStatusSelection();
     InitFormatSelection();
     InitConditionSelection();
     Loaded         += new RoutedEventHandler(bypassAuthorSelectionIfAuthorSelected);
     _formatSelected = false;
     _genreSelected  = false;
     owned           = null;
     options         = null;
 }