Beispiel #1
0
        public void InitView()
        {
            EditText emailEditText    = FindViewById <EditText>(Resource.Id.mainActivityEmailET);
            EditText passwordEditText = FindViewById <EditText>(Resource.Id.mainActivityPasswordET);
            Button   loginButton      = FindViewById <Button>(Resource.Id.mainActivityLoginButton);

            loginButton.Click += (sender, e) =>
            {
                string userEmail    = emailEditText.Text;
                string userPassword = passwordEditText.Text;

                if (ValidateInputs(userEmail) && ValidateInputs(userPassword))
                {
                    if (userViewModel.CheckUserInDataBase(userEmail, userPassword))
                    {
                        OpenListActivity();
                    }
                    else
                    {
                        ShowUserLoginErrorDialog();
                    }
                }
                else
                {
                    ShowInvalidInputDialog();
                }
            };
        }