Ejemplo n.º 1
0
        private async void LoginControl_SubmitButtonPressed(object sender, EventArgs e)
        {
            var blnLoginIsValid = await VerifyLoginCredentials.Execute(ShipService, Model.Name,
                                                                       Model.Password);

            if (!blnLoginIsValid)
            {
                Model.Name             = "";
                Model.Password         = "";
                View.LoginErrorVisible = true;
                AuthenticationFailed?.Invoke(this, new EventArgs());
                return;
            }

            Model.Name             = "";
            Model.Password         = "";
            View.LoginErrorVisible = false;
            AuthenticationPassed?.Invoke(this, Model.Name);
        }
Ejemplo n.º 2
0
        public void AuthenticationQuery(string L, string P)
        {
            myLogin    = L;
            myPassword = P;
            string s = RequestIssues.AuthenticationQuery(L, P);

            if (s == "OK")
            {
                AuthenticationPassed.Invoke();
            }
            else if (s == "Ethernet error")
            {
                NoInternetConnection.Invoke();
            }
            else
            {
                AuthenticationFailed.Invoke();
            }
        }
Ejemplo n.º 3
0
 public void Login()
 {
     AuthenticationPassed?.Invoke();
 }