Esempio n. 1
0
 private void DisposeAnnotationView()
 {
     if (annotationView != null)
     {
         annotationView.RemoveFromSuperview();
         annotationView.Dispose();
         annotationView = null;
     }
 }
Esempio 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();
        }