Пример #1
0
        private static void RefreshFormList()
        {
            if (Application.OpenForms == null)
            {
                return;
            }

            foreach (Form form in Application.OpenForms)
            {
                try
                {
                    if (form != null && !form.IsDisposed && !OpenForms.Contains(form))
                    {
                        form.FormClosing += Form_FormClosing;
                        OpenForms.Add(form);
                        FormOpenedArgs e = new FormOpenedArgs(form);
                        FormOpened?.Invoke(null, e);
                    }
                }
                catch (Exception ex)
                {
                    Logger.HandleError(ex, nameof(FormWrapper));
                }
            }
        }
Пример #2
0
        public override void NativeFormLoaded(object sender, FormOpenedArgs e)
        {
            openedForm = e.OpenForm;
            if (openedForm == null || (openedForm.IsDisposed || !openedForm.Text.Contains("Trigger")))
            {
                return;
            }

            RuleCDOHelper.DownloadCDO();
            RuleLockCDO  cdo    = RuleCDOHelper.CDO;
            int          id     = ((EllieMae.EMLite.Setup.TriggerEditor)openedForm.ActiveControl.TopLevelControl).Trigger.RuleID;
            RuleLockInfo locked = cdo.Rules?.FirstOrDefault(x => x.RuleID.Equals(id)) ?? (RuleLockInfo)null;

            TextBox comments = openedForm.AllControls <TextBox>().FirstOrDefault(x => x.Name.Equals("commentsTxt"));

            if (comments == null)
            {
                return;
            }

            Button ok = openedForm.AllControls <Button>().FirstOrDefault(x => x.Name.Equals("okBtn"));

            if (ok == null)
            {
                return;
            }

            ok.Click += Ok_Click;

            FlowLayoutPanel p = new FlowLayoutPanel();

            openedForm.Controls.Add(p);
            p.Left          = comments.Left;
            p.Top           = comments.Bottom + 20;
            p.Size          = comments.Size;
            p.FlowDirection = FlowDirection.LeftToRight;

            Locked = new CheckBox();
            p.Controls.Add(Locked);
            Locked.Text = "Lock Rule";

            TextBox lockedBy = new TextBox();

            p.Controls.Add(lockedBy);

            Button diff = new Button();

            p.Controls.Add(diff);
            diff.Text   = "Diff";
            diff.Click += Diff_Click;

            if (locked != null)
            {
                lockedBy.Text  = $"Locked By {locked.ID}";
                Locked.Checked = locked.Locked;
                ok.Enabled     = locked.Locked && locked.ID.Equals(EncompassHelper.User.ID) ? false : true;
            }
        }
Пример #3
0
 private void Base_NativeFormLoaded(object sender, FormOpenedArgs e)
 {
     try
     {
         NativeFormLoaded(sender, e);
     }
     catch (Exception ex)
     {
         Logger.HandleError(ex, nameof(Base_NativeFormLoaded));
     }
 }
Пример #4
0
        public override void NativeFormLoaded(object sender, FormOpenedArgs e)
        {
            Form openedForm = e.OpenForm;

            if (openedForm == null || (openedForm.IsDisposed || !openedForm.Text.Equals("Encompass  Settings")))
            {
                return;
            }
            this.SettingsForm = openedForm;
            this.SettingsWindow_Activate();
        }
Пример #5
0
        private void EncompassMainUI_FormOpened(object sender, FormOpenedArgs e)
        {
            Form openedForm = e.OpenForm;

            if (openedForm == null || (openedForm.IsDisposed || !openedForm.Text.Equals("Encompass  Settings")))
            {
                return;
            }
            this.SettingsForm = openedForm;
            this.SettingsWindow_Activate();
        }
Пример #6
0
 private void FormWrapper_FormOpened(object sender, FormOpenedArgs e)
 {
     if (e.OpenForm.Name.Equals("efolderdialog", StringComparison.OrdinalIgnoreCase))
     {
         if (ImportedDocsLoanCdo != null && _externalSourcesDictionary != null)
         {
             this.HighlightEfolderDocs(e.OpenForm);
         }
     }
     else if (e.OpenForm.Name.Equals("AllFilesDialog", StringComparison.OrdinalIgnoreCase))
     {
         this.HighlightFilesUnassigned(e.OpenForm);
     }
 }
Пример #7
0
 public override void NativeFormLoaded(object sender, FormOpenedArgs e)
 {
     if (e.OpenForm.Name.Equals("TableLayoutColumnSelector"))
     {
         Grid = e.OpenForm.Controls.Find("gvColumns", true)[0] as GridView;
         if (Grid != null)
         {
             Grid.Columns.Add(new GVColumn("Field ID"));
             Timer t = new Timer();
             t.Interval = 1000;
             t.Enabled  = true;
             t.Tick    += T_Tick;
         }
     }
 }
        public override void NativeFormLoaded(object sender, FormOpenedArgs e)
        {
            Form   form = e.OpenForm;
            string Name = form.Name;

            if (Name.Equals("FormsManagementDialog"))
            {
                Button delete   = form.Controls.Find("btnDelete", true)[0] as Button;
                Button rename   = form.Controls.Find("btnRename", true)[0] as Button;
                Button upload   = form.Controls.Find("btnUpload", true)[0] as Button;
                Button download = form.Controls.Find("btnDownload", true)[0] as Button;

                delete.Click   += Delete_Click;
                rename.Click   += Rename_Click;
                upload.Click   += Upload_Click;
                download.Click += Download_Click;
            }
            else if (Name.Equals("FormSaveAsDialog")) //title Save Encompass Form
            {
            }
            else if (Name.Equals("PackageExportWizard"))
            {
            }
        }
Пример #9
0
 public virtual void NativeFormLoaded(object sender, FormOpenedArgs e)
 {
     throw new ImplementationException(GetType().Name, nameof(INativeFormLoaded), nameof(NativeFormLoaded));
 }
Пример #10
0
        private void FormWrapper_FormOpened(object sender, FormOpenedArgs e)
        {
            var form = e.OpenForm;

            if (!form.Name.Equals("UnderwritingDetailsDialog", StringComparison.OrdinalIgnoreCase))
            {
                return;
            }

            var pnlStatus = form.Controls.Find("pageStatus", true);

            if (pnlStatus != null && pnlStatus.Count() > 0)
            {
                Panel uwStatusPanel = (Panel)pnlStatus[0];
                if (uwStatusPanel.Controls != null && uwStatusPanel.Controls.Count > 0)
                {
                    string borrowerName = "";
                    // populate borrower checkboxes that let you select who to send tasks to
                    BorrowerPair currentPair = EncompassApplication.CurrentLoan.BorrowerPairs.Current;

                    string borrowerBlendId = BlendUtility.GetCurrentBorrowerPairBorrowerBlendId(EncompassApplication.CurrentLoan);
                    if (string.IsNullOrEmpty(borrowerBlendId))
                    {
                        return;
                    }

                    borrowerName = $"{currentPair.Borrower.FirstName} {currentPair.Borrower.LastName}";


                    //if (currentPair.CoBorrower != null)
                    //{
                    //    string coborrowerBlendId = BlendUtility.GetCurrentBorrowerPairCoBorrowerBlendId(theLoan);
                    //    if (string.IsNullOrEmpty(coborrowerBlendId) == false)
                    //    {
                    //        CoBorrowePortalId = coborrowerBlendId;
                    //        checkBox_CoBorrower.Text = $"{currentPair.CoBorrower.FirstName} {currentPair.CoBorrower.LastName}";
                    //        checkBox_CoBorrower.Visible = true;
                    //    }
                    //}

                    //has this condition already been posted
                    // if y, show updates control
                    // if n, show post control

                    var conditionManager = new BlendConditionManagerPost_Control(borrowerName);
                    conditionManager.Location = new Point(100, 70);

                    conditionManager.Visible = true;
                    conditionManager.BringToFront();
                    uwStatusPanel.Controls.Add((Control)conditionManager);
                    uwStatusPanel.Refresh();

                    //var SendDisclosures = new Button();
                    //SendDisclosures.Name = "WcmDisclosures";
                    //SendDisclosures.Text = "WCM TESTING";
                    //SendDisclosures.Size = new Size(70, 22);
                    //// Back.Image = (Image)Resources.Back;
                    //SendDisclosures.Click += new EventHandler(SendDisclosuresButton_Click);
                    //SendDisclosures.Location = new Point(75, 22);
                    //SendDisclosures.Visible = true;
                    //SendDisclosures.Enabled = true;
                    //SendDisclosures.BringToFront();
                    //ButtonsPanel.Controls.Add((Control)SendDisclosures);
                    //ButtonsPanel.Refresh();
                }
            }
        }