Beispiel #1
0
        public void LoadNoteListView(String pageID)
        {
            Reinitialize();

            noteListView = new NoteListView(book, pageID, new CGRect(0, 44, this.Frame.Width, this.Frame.Height - 44));
            noteListView.EditNoteEvent += (Note note) =>
            {
                NoteViewController nvc = null;
                if (note == null)
                {
                    nvc = new NoteViewController(book, pageID);
                }
                else
                {
                    nvc = new NoteViewController(book, pageID, note);
                }
                nvc.SetPopinTransitionStyle(BKTPopinTransitionStyle.SpringySlide);
                nvc.SetPopinOptions(BKTPopinOption.DisableAutoDismiss);
                nvc.SetPopinTransitionDirection(BKTPopinTransitionDirection.Top);
                nvc.CancelEvent += delegate
                {
                    parentVC.DismissCurrentPopinControllerAnimated(true);

                    noteListView.FlipBack();
                };
                nvc.AddNoteEvent += delegate(Note nt)
                {
                    parentVC.DismissCurrentPopinControllerAnimated(true);

                    noteListView.LoadNoteViews();
                };
                parentVC.PresentPopinController(nvc, true, null);
            };
            this.AddSubview(noteListView);
        }
Beispiel #2
0
 private void Reinitialize()
 {
     if (noteListView != null)
     {
         noteListView.RemoveFromSuperview();
         noteListView.Dispose();
         noteListView = null;
     }
 }