/// <summary> /// Triggered when continue is clicked; checks if the user has an account to recover password for /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private async void ButtonContinue_Clicked(object sender, EventArgs e) { this.ActivityIndicator.IsVisible = true; this.ActivityIndicator.IsRunning = true; this.LabelMessage.Text = ""; if (this.EntryUsername.Text != null) { this.username = this.EntryUsername.Text.Trim(); OperationReturnMessage message = await Task.Run(() => ServerOperations.ForgotPassword(this.username)); if (message == OperationReturnMessage.True) { this.StackLayoutResetPassword.IsVisible = true; } else if (message == OperationReturnMessage.FalseInvalidCredentials) { this.LabelMessage.Text = "Username was not found."; } else { this.LabelMessage.Text = "Could not connect to server. Please try again."; } } else { await this.DisplayAlert("Empty Field", "Username cannot be empty.", "Ok"); } this.ActivityIndicator.IsVisible = false; this.ActivityIndicator.IsRunning = false; }