Esempio n. 1
0
        public NotesVM()
        {
            NewNoteCommand         = new NewNoteCommand(this);
            NewNotebookCommand     = new NewNotebookCommand(this);
            ExitCommand            = new ExitCommand(this);
            DeleteNoteCommand      = new DeleteNoteCommand(this);
            DeleteNotebookCommand  = new DeleteNotebookCommand(this);
            RenameNoteCommand      = new RenameNoteCommand(this);
            RenameNotebookCommand  = new RenameNotebookCommand(this);
            SaveNoteContentCommand = new SaveNoteContentCommand(this);

            Notes     = new ObservableCollection <Note>();
            Notebooks = new ObservableCollection <Notebook>();

            //TODO: Implement genuine login functionality.
            CurrentUser = new User()
            {
                Id        = 1,
                FirstName = "Alex",
                LastName  = "Barker",
                Username  = "******",
                Email     = "*****@*****.**",
                Password  = "******"
            };

            ReadNotebooks();
        }
Esempio n. 2
0
        public NotesVM()
        {
            IsNotebookEditing = false;

            NewNotebookCommand    = new NewNotebookCommand(this);
            NewNoteCommand        = new NewNoteCommand(this);
            BeginEditCommand      = new BeginEditCommand(this);
            RenameNotebookCommand = new RenameNotebookCommand(this);

            Notebooks = new ObservableCollection <Notebook>();
            Notes     = new ObservableCollection <Note>();

            CreateTables();
            ReadNotebooks();
            ReadNotes();
        }