Beispiel #1
0
 private void DecreaseBookCount()
 {
     HighlightedEntry.BookCount--;
     HighlightedEntry.RemoveSuchBook();
     RaisePropertyChanged("HighlightedEntry");
     DecreaseBookCountCommand.RaiseCanExecuteChanged();
 }
Beispiel #2
0
        private void FetchData()
        {
            bool wasSalvatorOn;

            if (DataSalvator.switchedOn)
            {
                DataSalvator.switchedOn = false;
                wasSalvatorOn           = true;
            }
            else
            {
                wasSalvatorOn = false;
            }

            DataSalvator.FlushChanges();
            Model = new DataModel();
            AddEntryCommand.RaiseCanExecuteChanged();

            if (Entries.Count > 0)
            {
                HighlightedEntry = Entries[0];
                IncreaseBookCountCommand.RaiseCanExecuteChanged();
                DecreaseBookCountCommand.RaiseCanExecuteChanged();
                DeleteEntryCommand.RaiseCanExecuteChanged();
            }
            ;
            if (wasSalvatorOn)
            {
                DataSalvator.switchedOn = true;
            }
        }
Beispiel #3
0
 private void IncreaseBookCount()
 {
     HighlightedEntry.BookCount++;
     HighlightedEntry.AddSuchBook();
     RaisePropertyChanged("HighlightedEntry");
     DecreaseBookCountCommand.RaiseCanExecuteChanged();
 }
Beispiel #4
0
        private void AddEntry()
        {
            Entries.Add(DataSalvator.NewEntry());
            HighlightedEntry = Entries[Entries.Count - 1];

            RaisePropertyChanged("Entries");
            RaisePropertyChanged("HighlightedEntry");
            DecreaseBookCountCommand.RaiseCanExecuteChanged();
            DeleteEntryCommand.RaiseCanExecuteChanged();
            ProvideFeedback("An entry added");
        }