void ReleaseDesignerOutlets()
        {
            if (AuthButton != null)
            {
                AuthButton.Dispose();
                AuthButton = null;
            }

            if (BackgroundView != null)
            {
                BackgroundView.Dispose();
                BackgroundView = null;
            }

            if (CheckEnrollmentButton != null)
            {
                CheckEnrollmentButton.Dispose();
                CheckEnrollmentButton = null;
            }

            if (DeleteEnrollmentButton != null)
            {
                DeleteEnrollmentButton.Dispose();
                DeleteEnrollmentButton = null;
            }

            if (EnrollButton != null)
            {
                EnrollButton.Dispose();
                EnrollButton = null;
            }

            if (IdentityTextField != null)
            {
                IdentityTextField.Dispose();
                IdentityTextField = null;
            }

            if (VersionLabel != null)
            {
                VersionLabel.Dispose();
                VersionLabel = null;
            }
        }
示例#2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            SetStyles();

            // dismiss keyboard when done
            IdentityTextField.ShouldReturn = delegate {
                IdentityTextField.ResignFirstResponder();
                return(true);
            };

            EnrollButton.Enabled        = false;
            EnrollButton.TouchUpInside += delegate {
                if (IdentityTextField.Text.Length == 0)
                {
                    ShowZoomAlert("Empty Username", "Please enter a username.");
                    return;
                }

                latestZoomHybridRequestType = ZoomHybridRequestType.Enroll;
                StartVerification();
            };

            AuthButton.Enabled        = false;
            AuthButton.TouchUpInside += delegate {
                if (IdentityTextField.Text.Length == 0)
                {
                    ShowZoomAlert("Empty Username", "Please enter a username.");
                    return;
                }

                latestZoomHybridRequestType = ZoomHybridRequestType.Authenticate;
                StartVerification();
            };

            CheckEnrollmentButton.Enabled        = false;
            CheckEnrollmentButton.TouchUpInside += delegate {
                if (IdentityTextField.Text.Length == 0)
                {
                    ShowZoomAlert("Empty Username", "Please enter a username.");
                    return;
                }

                IsUserEnrolled(IdentityTextField.Text.Replace(" ", ""));
            };

            DeleteEnrollmentButton.Enabled        = false;
            DeleteEnrollmentButton.TouchUpInside += delegate {
                if (IdentityTextField.Text.Length == 0)
                {
                    ShowZoomAlert("Empty Username", "Please enter a username.");
                    return;
                }

                DeleteUser(IdentityTextField.Text.Replace(" ", ""));
            };

            VersionLabel.Text = "Zoom SDK v" + Zoom.Sdk.Version;

            // Set any customizations to ZoOm's default UI and behavior
            var customization = new ZoomCustomization();

            customization.ShowSuccessScreen = false;
            customization.ShowFailureScreen = false;
            Zoom.Sdk.SetCustomization(customization);

            // Initialize the SDK before trying to use it
            Zoom.Sdk.Initialize(appToken, OnInitializeResult);

            // Set your biometric encryption key if provided
            if (hybridEncryptionKey.Length > 0)
            {
                Zoom.Sdk.SetHybridEncryptionKey(hybridEncryptionKey);
            }
        }