public NotesVM() { // create tables in db as first task DatabaseHelper.CreateTables <Notebook>(); DatabaseHelper.CreateTables <Note>(); NewNotebookCommand = new NewNotebookCommand(this); NewNoteCommand = new NewNoteCommand(this); BeginEditCommand = new BeginEditCommand(this); HasEditedCommand = new HasEditedCommand(this); CancelNotebookEditCommand = new CancelNotebookEditCommand(); HasEditedNoteCommand = new HasEditedNoteCommand(this); CancelNoteEditCommand = new CancelNoteEditCommand(); Notebooks = new ObservableCollection <Notebook>(); Notes = new ObservableCollection <Note>(); }
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(); }