Ejemplo n.º 1
0
 private void DisposeAnnotationView()
 {
     if (annotationView != null)
     {
         annotationView.RemoveFromSuperview();
         annotationView.Dispose();
         annotationView = null;
     }
 }
Ejemplo n.º 2
0
        void HandleAnnButtonTouchUpInside()
        {
            HidePopover();

            if (annotationView == null)
            {
                annotationView                           = new AnnotationToolBar(new CGRect(63, this.View.Center.Y - 170, 110, 354), this.View);
                annotationView.Alpha                     = 0f;
                annotationView.UpdateFrameEvent         += HandleUpdateFrameEvent;
                annotationView.PenSelectedEvent         += HandlePenSelectedEvent;
                annotationView.HighlighterSelectedEvent += HandleHighlighterSelectedEvent;
                annotationView.ColorSelectedEvent       += HandleColorSelectedEvent;
                annotationView.UndoEvent                += HandleUndoEvent;
                annotationView.RedoEvent                += HandleRedoEvent;
                annotationView.CancelEvent              += HandleCancelEvent;
                annotationView.DoneEvent                += HandleDoneEvent;
                this.View.AddSubview(annotationView);
            }

            ShowAnnotationView();

            // Select pen mode as default
            annotationView.SelectPen();
        }