/// <summary> /// Initializes a new instance of the <see cref="KSPictureLoginLib.KSPictureLoginController"/> class. /// </summary> /// <param name="factory">Factory class used to create specific instances of objects. A default factory is used if this is NULL.</param> public KSPictureLoginController(IKSPictureLoginFactory factory = null) : base() { this.gestureCollection = new KSPictureLoginGestureCollection (); if(factory == null) { factory = new KSPictureLoginDefaultFactory (); } this.Factory = factory; }
public KSDemoVerifyGestureController(bool showGestureToVerify, IKSPictureLoginFactory factory = null) : base(factory) { this.VisualizeVerificationGestures = showGestureToVerify; this.Title = "Test Gesture"; // Add a callback if the gesture was verified. this.GestureVerified += (bool verified) => { if(verified) { new UIAlertView(String.Empty, "Gesture was verfied! Congratulations!", null, null, "OK").Show(); } }; }
/// <summary> /// Initializes a new instance of the <see cref="KSPictureLoginLib.KSPictureLoginController"/> class. /// </summary> /// <param name="image">Image to show. The user can paint his gestures on top of this.</param> /// <param name="factory">Factory class used to create specific instances of objects. A default factory is used if this is NULL.</param> public KSPictureLoginController(UIImage image, IKSPictureLoginFactory factory = null) : this(factory) { this.image = image; }
/// <summary> /// Initializes a new instance of the <see cref="KSPictureLoginLib.KSPictureLoginController"/> class. /// </summary> /// <param name="GesturesToVerify">the gesture collection to init the controller with. Use this constructor if you want to verify a recorded gesture.</param> /// <param name="image">Image to show</param> /// <param name="factory">Factory class used to create specific instances of objects. A default factory is used if this is NULL.</param> public KSPictureLoginController(KSPictureLoginGestureCollection GesturesToVerify, UIImage image, IKSPictureLoginFactory factory = null) : this(image, factory) { this.GesturesToVerify = GesturesToVerify; }