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(); }
public NotesVM() { IsEditing = false; IsNoteEditing = false; NewNotebookCommand = new NewNotebookCommand(this); NewNoteCommand = new NewNoteCommand(this); RenameNoteBookCommand = new RenameNoteBookCommand(this); HasNotebookRenamedCommand = new HasNotebookRenamedCommand(this); DeleteNotebookCommand = new DeleteNotebookCommand(this); RenameNoteCommand = new RenameNoteCommand(this); HasNoteRenamedCommand = new HasNoteRenamedCommand(this); DeleteNoteCommand = new DeleteNoteCommand(this); Notebooks = new ObservableCollection <NoteBook>(); Notes = new ObservableCollection <Note>(); ReadNoteBooks(); ReadNotes(); }
public MainVM() { if (DesignerProperties.GetIsInDesignMode(new System.Windows.DependencyObject())) { Notes = new ObservableCollection <Note>(); Notes.Add(new Note() { Name = "note1", DateTime = DateTime.Now.ToShortDateString() }); Notes.Add(new Note() { Name = "note2", DateTime = DateTime.Now.ToShortDateString() }); Notes.Add(new Note() { Name = "note3", DateTime = DateTime.Now.ToShortDateString() }); Pages = new ObservableCollection <Page>(); Pages.Add(new Page() { Name = "Screenshot", DateTime = DateTime.Now.ToShortDateString() }); Pages.Add(new Page() { Name = "Screenshot", DateTime = DateTime.Now.ToShortDateString() }); Pages.Add(new Page() { Name = "Screenshot", DateTime = DateTime.Now.ToShortDateString() }); IsEditingNoteName = false; IsEditingVocab = false; Vocabs = new ObservableCollection <Vocab>(); Vocabs.Add(new Vocab() { PageId = 1, Word = "123", Explaination = "321", Pronounciation = "aaa" }); Vocabs.Add(new Vocab() { PageId = 1, Word = "456", Explaination = "654", Pronounciation = "bbb" }); Vocabs.Add(new Vocab() { PageId = 1, Word = "789", Explaination = "987", Pronounciation = "ccc" }); } else { WindowState = System.Windows.WindowState.Normal; NewNoteCommand = new NewNoteCommand(this); DeleteNoteCommand = new DeleteNoteCommand(this); NewPageCommand = new NewPageCommand(this); DeletePageCommand = new DeletePageCommand(this); RenameNoteCommand = new RenameNoteCommand(this); ScreenCapCommand = new ScreenCapCommand(this); HasEditedNoteNameCommand = new HasEditedNoteNameCommand(this); UsePreviousSelectionCommand = new UsePreviousSelectionCommand(this); DoNotUsePreviousSelectionCommand = new DoNotUsePreviousSelectionCommand(this); CheckDictionaryCommand = new CheckDictionaryCommand(this); GoogleTranslateCommand = new GoogleTranslateCommand(this); DeleteVocabCommand = new DeleteVocabCommand(this); NewVocabCommand = new NewVocabCommand(this); StartUpdateVocabCommand = new StartUpdateVocabCommand(this); EndUpdateVocabCommand = new EndUpdateVocabCommand(this); CropOriginalScreenshotCommand = new CropOriginalScreenshotCommand(this); NewPageViaScreenshotCommand = new NewPageViaScreenshotCommand(this); CaptureMoreTextCommand = new CaptureMoreTextCommand(this); StartRenamePageCommand = new StartRenamePageCommand(this); EndRenamePageCommand = new EndRenamePageCommand(this); ToggleUpdateVocabCommand = new ToggleUpdateVocabCommand(this); CheckDictionaryLittleDCommand = new CheckDictionaryLittleDCommand(this); SyncVocabsCommand = new SyncVocabsCommand(this); Notes = new ObservableCollection <Note>(); Pages = new ObservableCollection <Page>(); Vocabs = new ObservableCollection <Vocab>(); ReadNotes(); ReadPages(); IsEditingNoteName = false; IsEditingVocab = false; DisplayIndex = 0; DoUsePreviousSelection = false; browserAddress = ""; DictionaryBaseUrl_JapanDict = "https://www.japandict.com/"; DictionaryBaseUrl_littleD = "http://dict.hjenglish.com/jp/jc/"; SelectedPageIndex = 0; NoPreviousCropButtonIsSelected = true; IsRenamingPage = false; } }