Esempio n. 1
0
 private void InitEditNotePopup(NoteEditorPageParameter param)
 {
     UnHookAllEvents();
     noteEditorControl.NavigateToNoteEditor(param);
     noteEditorControl.ClosedEvent += NoteEditorClosed;
     noteEditorControl.Visibility   = Visibility.Visible;
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        private void NavigateToNoteEditorPage(long id)
        {
            collection.Deck.Select(id, false);
            NoteEditorPageParameter param = new NoteEditorPageParameter()
            {
                CurrentNote = null, Mainpage = mainPage
            };

            Frame.Navigate(typeof(NoteEditor), param);
        }
Esempio n. 4
0
        private void SetupCurrentNote(NoteEditorPageParameter parameter)
        {
            if (parameter.CurrentNote == null)
            {
                SetupNewNoteView();
                SetupDeckModel();
                currentNote = collection.NewNote();
                SetupAnkiModelView();
                isNewNoteMode = true;
            }
            else
            {
                SetupEditNoteView();

                currentNote   = parameter.CurrentNote;
                isNewNoteMode = false;
            }
        }
Esempio n. 5
0
        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);
            }
        }