Example #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);
        }
Example #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();
            }
        }
Example #3
0
 public void Login()
 {
     AuthenticationPassed?.Invoke();
 }