Esempio n. 1
0
        void HandleCancelEvent()
        {
            AnnotationStateManager.CancelDrawing(true);
            AnnotationStateManager.State = new NSString(String.Empty);

            // Hide annotationView
            HideAnnotationView();
        }
Esempio n. 2
0
        void HandleDoneEvent()
        {
            AnnotationStateManager.FinishDrawing(false, true);
            AnnotationStateManager.State = new NSString(String.Empty);

            // Hide annotationView
            HideAnnotationView();

            // Save annotations
            SaveAnnotations();
        }
Esempio n. 3
0
        private void EnterDrawingMode(UIColor color)
        {
            if (AnnotationStateManager.State != PSPDFAnnotationString.Ink)
            {
                AnnotationStateManager.ToggleState(PSPDFAnnotationString.Ink);
            }

            AnnotationStateManager.DrawColor = color;

            if (AnnotationStateManager.DrawColor.CGColor.Alpha < 1)
            {
                AnnotationStateManager.LineWidth = 20f;
            }
            else
            {
                AnnotationStateManager.LineWidth = 3f;
            }
        }
Esempio n. 4
0
 void HandleRedoEvent()
 {
     AnnotationStateManager.Redo();
 }
Esempio n. 5
0
 void HandleUndoEvent()
 {
     AnnotationStateManager.Undo();
 }
 void HandleTouchUpInside(object sender, EventArgs e)
 {
     AnnotationStateManager.DrawColor = UIColor.Red;
     AnnotationStateManager.ToggleState(PSPDFAnnotationString.Ink);
     UpdateDrawButtonAppearance();
 }