private void InitEditNotePopup(NoteEditorPageParameter param) { UnHookAllEvents(); noteEditorControl.NavigateToNoteEditor(param); noteEditorControl.ClosedEvent += NoteEditorClosed; noteEditorControl.Visibility = Visibility.Visible; }
private void AddNoteMenuFlyoutItemClickHandler(object sender, RoutedEventArgs e) { collection.Deck.Select(deckShowContextMenu.Id, false); NoteEditorPageParameter param = new NoteEditorPageParameter() { CurrentNote = null, Mainpage = mainPage }; Frame.Navigate(typeof(NoteEditor), param); }
private void NavigateToNoteEditorPage(long id) { collection.Deck.Select(id, false); NoteEditorPageParameter param = new NoteEditorPageParameter() { CurrentNote = null, Mainpage = mainPage }; Frame.Navigate(typeof(NoteEditor), param); }
private void SetupCurrentNote(NoteEditorPageParameter parameter) { if (parameter.CurrentNote == null) { SetupNewNoteView(); SetupDeckModel(); currentNote = collection.NewNote(); SetupAnkiModelView(); isNewNoteMode = true; } else { SetupEditNoteView(); currentNote = parameter.CurrentNote; isNewNoteMode = false; } }
private void EditMenuFlyoutItemClickHandler(object sender, RoutedEventArgs e) { if (cardInformationView.CardShowMenuFlyout == null) { return; } collection.Deck.Select(cardInformationView.CardShowMenuFlyout.DeckId, false); Note note = collection.GetNote(cardInformationView.CardShowMenuFlyout.NoteId); NoteEditorPageParameter param = new NoteEditorPageParameter() { CurrentNote = note, Mainpage = mainPage }; if (!noteEditorControl.IsNavigated) { InitEditNotePopup(param); } }