public NewOrEditViewModel() { NoteDemo = new Note(); Title = "新建记事"; SaveCommand = new DelegateCommand(Add); CancelCommand = new DelegateCommand(Cancel); }
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(); }
public async void DeleteNote(Note Note) { Notes.Remove(Note); await saveNoteDataAsync(); }
public async void AddNote(Note Note) { Notes.Add(Note); await saveNoteDataAsync(); }