Ejemplo n.º 1
0
        public void initLoginScreenView()
        {
            loginScreenView=new LoginScreenView ();
            if (Global.DatabaseManager.GetUsername() != null) {
                loginScreenView.userNameTextField.Text=Global.DatabaseManager.GetUsername ().Username;
            }

            loginScreenView.loginBtn.TouchUpInside += (s, e) =>
            {
                LoginClick();
            };
            loginScreenView.signUpBtn.TouchUpInside += (s, e) =>
            {
                SignUpClick();
            };
            loginScreenView.forgetPassWordBtn.TouchUpInside += (s, e) =>
            {
                ForgetPassWordClick();
            };

            loginScreenView.termsAndPrivacyLabel2.AddGestureRecognizer(new UITapGestureRecognizer(() => {
                TermsofServiceClick();
            }));

            loginScreenView.termsAndPrivacyLabel4.AddGestureRecognizer(new UITapGestureRecognizer(() => {
                PrivacyPolicyClick();
            }));

            View.Add (loginScreenView);
        }
Ejemplo n.º 2
0
        public void initLoginScreenView()
        {
            loginScreenView=new LoginScreenView ();
            if (Global.DatabaseManager.GetUsername() != null) {
                loginScreenView.userNameTextField.Text=Global.DatabaseManager.GetUsername ().Username;
            }
            loginScreenView.loginBtn.TouchUpInside += (s, e) =>
            {
                LoginClick();
            };
            if (Device.HaveBiometricsLogin()&&
                Global.DatabaseManager.GetUsername()!= null&&
                !String.IsNullOrEmpty(Global.DatabaseManager.GetUsername().PWD))
            {
                loginScreenView.userNameTextField.Hidden = true;
                loginScreenView.passwordTextField.Hidden = true;
                loginScreenView.loginBtn.Hidden = true;
                loginScreenView.fingerPrintView.Hidden = false;
                BiometricsLogin();
            }
            else {
                loginScreenView.userNameTextField.Hidden = false;
                loginScreenView.passwordTextField.Hidden = false;
                loginScreenView.loginBtn.Hidden = false;
                loginScreenView.fingerPrintView.Hidden = true;
            }

            loginScreenView.signUpBtn.TouchUpInside += (s, e) =>
            {
                SignUpClick();
            };
            loginScreenView.forgetPassWordBtn.TouchUpInside += (s, e) =>
            {
                ForgetPassWordClick();
            };
            loginScreenView.termsAndPrivacyLabel2.AddGestureRecognizer(new UITapGestureRecognizer(() => {
                TermsofServiceClick();
            }));

            loginScreenView.termsAndPrivacyLabel4.AddGestureRecognizer(new UITapGestureRecognizer(() => {
                PrivacyPolicyClick();
            }));
            View.Add (loginScreenView);
        }