public async Task <IFeedbackMessage> SubmitForm() { if (ValidateInput()) { ParentVM.ShowOverlay(); var returnedMsg = await FeedbackManager.Instance.SendFeedback(this.Message, this.Email, this.Subject, this.Username, this.Attachments.Select(a => a.FeedbackImage)); if (returnedMsg != null) { this.ClearFormAfterSubmit(); var imgReadOnlyVM = new FeedbackMessageReadOnlyVM(returnedMsg, this.ParentVM); ParentVM.Messages.Add(imgReadOnlyVM); ParentVM.SwitchToMessageList(); return(returnedMsg); } else { ParentVM.HideOverlay(); MessageBox.Show(LocalizedStrings.LocalizedResources.FeedbackSendError); } } return(null); }
public async Task<IFeedbackMessage> SubmitForm() { if (ValidateInput()) { ParentVM.ShowOverlay(); var returnedMsg = await FeedbackManager.Instance.SendFeedback(this.Message, this.Email, this.Subject, this.Username, this.Attachments.Select(a => a.FeedbackImage)); if (returnedMsg != null) { this.ClearFormAfterSubmit(); var imgReadOnlyVM = new FeedbackMessageReadOnlyVM(returnedMsg, this.ParentVM); ParentVM.Messages.Add(imgReadOnlyVM); ParentVM.SwitchToMessageList(); return returnedMsg; } else { ParentVM.HideOverlay(); MessageBox.Show(LocalizedStrings.LocalizedResources.FeedbackSendError); } } return null; }