private void GenerateAndSendWcmCustomDisclosures(WCMDisclosurePackage package) { var waitDialog = new PleaseWaitDialog(); new TaskFactory().StartNew(() => { waitDialog.Progress.Report($"Generating Disclosures for {package.PackageType} Package."); try { GenerateWcmDisclosurePackage(package); var packageResponses = SendWCMDisclosurePackage(package, waitDialog); EncompassApplication.CurrentLoan.Commit(); waitDialog.PleaseWaitForm.Close(); MessageBox.Show($"Disclosure Package Sent Successfully."); } catch (WCMException ex) { UIHelper.DisplayWCMException(ex); } catch (Exception ex) { Macro.Alert($"Unhandled Exception ERROR: {ex.ToString()}"); } }).ContinueWith((x) => { waitDialog.PleaseWaitForm.Close(); }); return; }
static public void PleaseWaitJob(object data) { PleaseWaitMsg pleaseWaitMsg = (PleaseWaitMsg)data; PleaseWait.PleaseWaitDialog pleaseWaitDialog = new PleaseWaitDialog(); pleaseWaitDialog.Display(pleaseWaitMsg); }
private void btnThingListSaveImages_Click(object sender, EventArgs e) { this.PrepareFolderBrowser(I18N.GetText("Description:BrowseImageExportFolder")); if (this.dlgBrowseFolder.ShowDialog() == DialogResult.OK) { PleaseWaitDialog PWD = new PleaseWaitDialog(I18N.GetText("Dialog:SaveAllImages")); Thread T = new Thread(new ThreadStart(delegate() { Application.DoEvents(); foreach (IThing X in this.LoadedThings_) { Image I = X.GetIcon(); // FIXME: Assumes no IThing has more than one image if (I != null) { string ImageFileName = X.ToString() + ".png"; foreach (char C in Path.GetInvalidFileNameChars()) { ImageFileName = ImageFileName.Replace(C, '_'); } I.Save(Path.Combine(this.dlgBrowseFolder.SelectedPath, ImageFileName), ImageFormat.Png); } Application.DoEvents(); } PWD.Invoke(new AnonymousMethod(delegate() { PWD.Close(); })); })); T.CurrentUICulture = Thread.CurrentThread.CurrentUICulture; T.Start(); PWD.ShowDialog(this); this.Activate(); PWD.Dispose(); PWD = null; } }
/// <summary> /// Handles the Click event of the btnRegister control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param> private void btnRegister_Click(object sender, System.Windows.RoutedEventArgs e) { vwRegisterNewUser.TxtError.Text = ""; bool valid = vwRegisterNewUser.Validate(); var it = (UserRegistrationInfo)DataContext; if (valid) { //Check UserName for duplicate var result = AuthenticationPortal .Authentication .UserNameExists(it.UserName); if (!result.Id) { vwRegisterNewUser.UnbindPasswords(); it.UserName = vwRegisterNewUser.EdEmailAddr.Text; it.Email = it.UserName; if (!it.HasErrors) { PleaseWaitDialog.Show("Registering New User: {0} {1}.", it.FirstName, it.LastName); AuthenticationPortal .Authentication .RegisterNewUserAsync(it, RegisterNewUserCompleted); } } else { vwRegisterNewUser.TxtError.Text = "User name is already in use!"; } } }
/// <summary> /// Runs this instance. /// </summary> /// <remarks></remarks> public virtual void Run(RunMode mode) { if (_form == null) { _form = CreatePluginForm(); } if (_form is Window) { if (mode == RunMode.Normal) { ((Window)_form).Show(); } else { ((Window)_form).ShowDialog(); } ((Window)_form).Activate(); } if ((_form is Form)) { if (mode == RunMode.Normal) { ((Form)_form).Show(); } else { ((Form)_form).ShowDialog(); } ((Form)_form).Activate(); } PleaseWaitDialog.Close(); }
/// <summary> /// Registers the new user completed. /// </summary> /// <param name="item">The item.</param> private void RegisterNewUserCompleted(UserRegistrationInfo item) { PleaseWaitDialog.Close(); DataContext = item; DialogResult = !item.HasErrors; if (Convert.ToBoolean(DialogResult)) { Close(); } }
/// <summary> /// Called when [login completed]. /// </summary> /// <remarks></remarks> public void OnLoginCompleted() { PleaseWaitDialog.Show("User [{0}] authenticated.\nWelcome, {1}.", WulkaSession.Current.Username, WulkaSession.Current.FirstName); Thread.Sleep(1500); PleaseWaitDialog.Close(); IsAuthenticated = true; IsBusy = false; InitializeInternal(InitializationParams); }
private void AnalyzeDisclosuresBtn_Click(object sender, EventArgs e) { PleaseWaitDialog waitDialog = null; try { DisclosuresUtilityConfig = DisclosuresHelper.PopulateDisclosuresUtilityConfig(); var encompassDisclosuresList = GetEncompassDisclosuresList(); if (encompassDisclosuresList == null) { return; } waitDialog = new PleaseWaitDialog(emSendDisclosuresDialogForm); waitDialog.PleaseWaitForm.Hide(); var disclosuresService = InitDisclosuresManager(encompassDisclosuresList, waitDialog); var sanitizeDisclosures = disclosuresService.SanitizeDisclosures(false); var disclosuresAnalyzer = new DisclosuresAnalyzer(sanitizeDisclosures); var results = disclosuresAnalyzer.AnalyzeDisclosures(); waitDialog.PleaseWaitForm.Close(); if (!Directory.Exists(@"c:\temp\DisclosureAnalyzer")) { Directory.CreateDirectory(@"c:\temp\DisclosureAnalyzer"); } string loanType = EncompassApplication.CurrentLoan.Fields["1172"].UnformattedValue; string propertyState = EncompassApplication.CurrentLoan.Fields["14"].UnformattedValue; string output = JsonConvert.SerializeObject(results, Formatting.Indented); string fileName = $"C:\\temp\\DisclosureAnalysis_{EncompassApplication.CurrentLoan.LoanNumber}" + $"_{propertyState}_{loanType}-{DateTime.Now:MM-dd-yyyy_hh-mm-tt}.json"; File.WriteAllText(fileName, output); MessageBox.Show($"File saved!{Environment.NewLine + fileName}"); } catch (Exception exception) { MessageBox.Show(exception.ToString()); } finally { waitDialog.PleaseWaitForm.Close(); } }
private void LoadExternalSoures() { var waitDialog = new PleaseWaitDialog(this); new TaskFactory().StartNew(async() => { waitDialog.Progress.Report("Loading Mapper Sources..."); await GetExternalSourcesAsync(); }).ContinueWith((x) => { LoadExternalSourcesInDropDown(); waitDialog.PleaseWaitForm.Close(); }); }
private void LoadItems(string FileName, ItemEditor IE) { this.PWD = new PleaseWaitDialog(I18N.GetText("Dialog:LoadItems")); Thread T = new Thread(new ThreadStart(delegate() { this.LoadItemsWorker(FileName, IE); })); T.CurrentUICulture = Thread.CurrentThread.CurrentUICulture; T.Start(); PWD.ShowDialog(this); this.Activate(); this.PWD.Dispose(); this.PWD = null; this.EnableNavigation(); this.MarkItemChanges(); }
private void RemoveUnchangedItems() { this.btnRemoveUnchanged.Enabled = false; this.PWD = new PleaseWaitDialog(I18N.GetText("Dialog:RemoveUnchanged")); Thread T = new Thread(new ThreadStart(delegate() { this.RemoveUnchangedItemsWorker(); })); T.CurrentUICulture = Thread.CurrentThread.CurrentUICulture; T.Start(); PWD.ShowDialog(this); this.Activate(); this.PWD.Dispose(); this.PWD = null; this.EnableNavigation(); this.MarkItemChanges(); }
private void ExternalSourcesComboBox_SelectedIndexChanged(object sender, EventArgs e) { var waitDialog = new PleaseWaitDialog(this); ExternalDocumentSource selectedSource = GetExternalSourceSelected(); waitDialog.Progress.Report($"Retrieving docs for '{selectedSource.SourceName}'..."); List <Document> docs = WcmHelpers.GetMapperDocuments(selectedSource.Id, WcmSettings); _mapperDocuments = docs; UpdateDocsGridview(docs); EnableControls(); waitDialog.PleaseWaitForm.Close(); }
private async void Button_CreateAppraisalCreditCardTask_Click(object sender, EventArgs e) { GenericIsLoanEligibleForTask loanReadyForAppraisalTaskCheck = _passFailUtility.IsLoanReadyForAppraisalTaskCheck(); if (loanReadyForAppraisalTaskCheck.IsLoanEligible == false) { Macro.Alert($"{string.Join(Environment.NewLine, loanReadyForAppraisalTaskCheck.ReasonsWhyLoanIsNotEliglbe)}"); return; } var pleaseWaitForm = new PleaseWaitDialog(); PostAppraisalTaskResponse postCcTask = null; await new TaskFactory().StartNew(() => { pleaseWaitForm.Progress.Report("Generating payment link, appraisal doc, and task in borrower portal..."); postCcTask = BlendUtility.CreateAppraisalCreditCardCaptureTaskToBorrowerPortal(EncompassApplication.CurrentLoan, WcmSettings.BlendSettings.CreateOrderAppraisalTaskUri); }).ContinueWith((x) => { pleaseWaitForm.PleaseWaitForm.Close(); if (postCcTask.WasSuccessful == false) { Macro.Alert($"Error creating Appraisal Credit Card Payment Task: '{postCcTask.ErrorMessage}'"); } else if (postCcTask.DidAppraisalTaskPost == false) { Macro.Alert($"Appraisal task did not post: '{postCcTask.ReasonTaskDidNotPost}'"); } else { if (postCcTask.DidAppraisalTaskPost) { Macro.Alert($"Order Appraisal Task Posted Succesfully!"); } else { Macro.Alert($"Hit unintended else statemnt. Pleae send screenshot to dev team. " + $"DidAppraisalTaskPost '{postCcTask.DidAppraisalTaskPost}'..WasSuccessful '{postCcTask.WasSuccessful}'. " + $"ErrorMessage' {postCcTask.ErrorMessage}'"); } } }); }
private void DoExport(ThingList <Item> Items) { if (this.dlgExportFile.ShowDialog() == DialogResult.OK) { this.PWD = new PleaseWaitDialog(I18N.GetText("Dialog:ExportItems")); Thread T = new Thread(new ThreadStart(delegate() { Application.DoEvents(); Items.Save(this.dlgExportFile.FileName); Application.DoEvents(); this.PWD.Invoke(new AnonymousMethod(delegate() { this.PWD.Close(); })); })); T.CurrentUICulture = Thread.CurrentThread.CurrentUICulture; T.Start(); this.PWD.ShowDialog(this); this.Activate(); this.PWD.Dispose(); this.PWD = null; } }
private void PostPrelimConditionsAsync() { var config = DisclosuresHelper.PopulateDisclosuresUtilityConfig(); var blendManager = new BlendManager(config.BlendUtilitySettings, EncompassApplication.CurrentLoan); var waitDialog = new PleaseWaitDialog(); var ConditionsManager = new ConditionsManager(blendManager, EncompassApplication.CurrentLoan, waitDialog.Progress); new TaskFactory().StartNew(() => { ConditionsManager.PostPrelimConditionsToPortal(); }).ContinueWith(x => { waitDialog.PleaseWaitForm.Close(); Refresh(); }); }
public async void SendDisclosures(PdfDocumentList encompassDisclosuresList) { SendDisclosuresButton.Enabled = false; var waitDialog = new PleaseWaitDialog(emSendDisclosuresDialogForm); await new TaskFactory().StartNew(() => { try { DisclosuresService = InitDisclosuresManager(encompassDisclosuresList, waitDialog); var packageResponse = DisclosuresService.SendDisclosurePackageToBorrower(); waitDialog.Progress.Report($"Disclosures sent successfully. {Environment.NewLine + Environment.NewLine}Saving Loan..."); EncompassApplication.CurrentLoan.Commit(); waitDialog.PleaseWaitForm.Close(); // SP - close EM disclosure dialog emSendDisclosuresDialogForm.Close(); Macro.Alert($"Disclosure Package Sent Successfully."); } catch (WCMException e) { waitDialog.PleaseWaitForm.Close(); UIHelper.DisplayWCMException(e); SendDisclosuresButton.Enabled = true; } catch (Exception e) { waitDialog.PleaseWaitForm.Close(); Macro.Alert($"Unhandled Exception ERROR: {e.ToString()}"); SendDisclosuresButton.Enabled = true; } }); }
private void LoadExtractedDataFieldsForm() { var waitDialog = new PleaseWaitDialog(); waitDialog.Progress.Report($"Loading Field Extraction Data for '{EncompassApplication.CurrentLoan.LoanNumber}'..."); new TaskFactory().StartNew(GetLoanExtractedDataFieldsAsync).ContinueWith((x) => { waitDialog.PleaseWaitForm.Close(); var th = new Thread(() => { _displayDocsform = new DataExtractionLoanAllDocsForm(_fieldExtractedDocs.ToList(), _dataExtractionDocumentMaps); _displayDocsform.FormClosing += (s, e) => Application.ExitThread(); _displayDocsform.Show(); Application.Run(); }); th.SetApartmentState(ApartmentState.STA); th.Start(); }); }
private void btnThingListSaveImages_Click(object sender, EventArgs e) { this.PrepareFolderBrowser(I18N.GetText("Description:BrowseImageExportFolder")); if (this.dlgBrowseFolder.ShowDialog() == DialogResult.OK) { PleaseWaitDialog PWD = new PleaseWaitDialog(I18N.GetText("Dialog:SaveAllImages")); Thread T = new Thread(new ThreadStart(delegate () { Application.DoEvents(); foreach (IThing X in this.LoadedThings_) { Image I = X.GetIcon(); // FIXME: Assumes no IThing has more than one image if (I != null) { string ImageFileName = X.ToString() + ".png"; foreach (char C in Path.GetInvalidFileNameChars()) ImageFileName = ImageFileName.Replace(C, '_'); I.Save(Path.Combine(this.dlgBrowseFolder.SelectedPath, ImageFileName), ImageFormat.Png); } Application.DoEvents(); } PWD.Invoke(new AnonymousMethod(delegate() { PWD.Close(); })); })); T.CurrentUICulture = Thread.CurrentThread.CurrentUICulture; T.Start(); PWD.ShowDialog(this); this.Activate(); PWD.Dispose(); PWD = null; } }
private List <PostPackageResponse> SendWCMDisclosurePackage(WCMDisclosurePackage package, PleaseWaitDialog waitDialog) { var trackedDoc = _cdoDisclosuresUtility.GetDisclosuresTrackedDoc(package.EfolderNameThatContainsDisclosures, package); var wcmDisclosures = _cdoDisclosuresUtility.GetDisclosuresFromTrackedDocument(package, trackedDoc); var disclosuresService = new DisclosuresManger(DisclosuresHelper.PopulateDisclosuresUtilityConfig(), new DisclosuresUtilityRequest() { EfolderContainingDisclosures = trackedDoc, DisclosurePackage = package, Disclosures = wcmDisclosures, Loan = EncompassApplication.CurrentLoan, Progress = waitDialog.Progress }); var packageResponse = disclosuresService.SendDisclosurePackageToBorrower(); waitDialog.Progress.Report($"Disclosures sent successfully. {Environment.NewLine + Environment.NewLine}Saving Loan..."); return(packageResponse); }
public static void PleaseWaitJob(object data) { PleaseWaitMsg pleaseWaitMsg = (PleaseWaitMsg)data; PleaseWait.PleaseWaitDialog pleaseWaitDialog = new PleaseWaitDialog(); pleaseWaitDialog.Display(pleaseWaitMsg); }
private DisclosuresManger InitDisclosuresManager(PdfDocumentList encompassDisclosuresList, PleaseWaitDialog waitDialog) { var packageSelected = DisclosuresManger.GetDisclosurePackageSelected(EncompassApplication.CurrentLoan); var wcmDisclosures = GetDisclosures(encompassDisclosuresList, packageSelected); return(new DisclosuresManger(DisclosuresUtilityConfig, new DisclosuresUtilityRequest() { DisclosurePackage = packageSelected, Disclosures = wcmDisclosures, Loan = EncompassApplication.CurrentLoan, Progress = waitDialog.Progress })); }
private void ExportThings(ThingList ThingsToExport) { this.dlgExportFile.FileName = ""; if (this.dlgExportFile.ShowDialog() == DialogResult.OK) { this.PWD = new PleaseWaitDialog(I18N.GetText("Dialog:ExportFileContents")); Thread T = new Thread(new ThreadStart(delegate () { ThingsToExport.Save(this.dlgExportFile.FileName); Application.DoEvents(); this.PWD.Invoke(new AnonymousMethod(delegate() { this.PWD.Close(); })); })); T.CurrentUICulture = Thread.CurrentThread.CurrentUICulture; T.Start(); this.PWD.ShowDialog(this); this.Activate(); this.PWD.Dispose(); this.PWD = null; } }