public NotesWindowVM() { IsEditing = false; NewNoteBookCommand = new NewNoteBookCommand(this); NewNoteCommand = new NewNoteCommand(this); CloseProgramCommand = new CloseProgramCommand(this); BeginEditCommand = new BeginEditCommand(this); HasEditedCommand = new HasEditedCommand(this); DeleteNoteBookCommand = new DeleteNoteBookCommand(this); DeleteNoteCommand = new DeleteNoteCommand(this); Notebooks = new ObservableCollection <NoteBook>(); Notes = new ObservableCollection <Note>(); SelectedNote = new Note(); ReadNoteBooks(); ReadNotes(); }
public MainViewModel() { ExitCommand = new ExitCommand(); NoteBookCommand = new NoteBookCommand(this); NoteCommand = new NoteCommand(this); NoteBookCollection = new ObservableCollection <NoteBook>(); NotesCollection = new ObservableCollection <Notes>(); //LoginVM loginvm = new LoginVM(); LoginVM.HasLoggedIn += Loginvm_HasLoggedIn; IsEditing = false; IsEditingNote = false; StartEditingCommand = new StartEditingCommand(this); HasEditedCommand = new HasEditedCommand(this); DeleteNoteCommand = new DeleteNoteCommand(this); DeleteNoteBookCommand = new DeleteNoteBookCommand(this); StartEditingNoteCommand = new StartEditingNoteCommand(this); HasEditedNoteCommand = new HasEditedNoteCommand(this); //getNotes(); }