ERP.LoginUI.RegistrationForm.LoginOperation_Completed C# (CSharp) Метод

LoginOperation_Completed() приватный Метод

Completion handler for the login operation that occurs after a successful registration and login attempt. This will close the window. On the unexpected event that this operation failed (the user was just added so why wouldn't it be authenticated successfully) an ErrorWindow is created and will display the error message.
private LoginOperation_Completed ( LoginOperation loginOperation ) : void
loginOperation LoginOperation The that has completed.
Результат void
        private void LoginOperation_Completed(LoginOperation loginOperation)
        {
            if (!loginOperation.IsCanceled)
            {
                this.parentWindow.Close();

                if (loginOperation.HasError)
                {
                    ErrorWindow.CreateNew(string.Format(System.Globalization.CultureInfo.CurrentUICulture, ErrorResources.ErrorLoginAfterRegistrationFailed, loginOperation.Error.Message));
                    loginOperation.MarkErrorAsHandled();
                }
                else if (loginOperation.LoginSuccess == false)
                {
                    // The operation was successful, but the actual login was not
                    ErrorWindow.CreateNew(string.Format(System.Globalization.CultureInfo.CurrentUICulture, ErrorResources.ErrorLoginAfterRegistrationFailed, ErrorResources.ErrorBadUserNameOrPassword));
                }
            }
        }