public NewOrEditViewModel()
 {
     NoteDemo = new Note();
     Title = "新建记事";
     SaveCommand = new DelegateCommand(Add);
     CancelCommand = new DelegateCommand(Cancel);
  
  }
Beispiel #2
0
 public async void UpdateNote(Note Note)
 {
     var oldNote = from n in Notes
                   where n.ID == Note.ID
                   select n;
     Note note = oldNote.FirstOrDefault();
     Notes.Remove(note);
     Notes.Add(Note);
     await saveNoteDataAsync();
 }
Beispiel #3
0
 public async void DeleteNote(Note Note)
 {
     Notes.Remove(Note);
     await saveNoteDataAsync();
 }
Beispiel #4
0
 public async void AddNote(Note Note)
 {
     Notes.Add(Note);
     await saveNoteDataAsync();
 }