private void CreateShortcutXRefButton(appDB.EFileSearchRow efr, int count) { CreateCheckbox(efr.xrefId, count, false); LinkLabel lnkLabel = CreateXrefLinkLabel(efr.xrefId, count, false); Janus.Windows.Common.SuperTipSettings jstSettings = new Janus.Windows.Common.SuperTipSettings(); jstSettings.Text = String.Format(LawMate.Properties.Resources.FileName0FileNumber1, efr.Name, efr.FullFileNumber); jstSettings.HeaderText = efr.XRefName; switch (efr.LinkType) { case (int)atriumBE.FXLinkType.Shortcut: lnkLabel.ImageKey = "fileShortcut.png"; Size sz = System.Windows.Forms.TextRenderer.MeasureText(efr.XRefName, lnkLabel.Font); lnkLabel.Width = sz.Width + 32; lnkLabel.Text = efr.XRefName; jstSettings.HeaderImageKey = "fileShortcut.png"; break; case (int)atriumBE.FXLinkType.XRef: lnkLabel.ImageKey = "XRefFile.gif"; string linkText = String.Format("{0} ({1})", efr.Name, efr.FullFileNumber); Size sz2 = System.Windows.Forms.TextRenderer.MeasureText(linkText, lnkLabel.Font); lnkLabel.Width = sz2.Width + 32; lnkLabel.Text = String.Format("{0} ({1})", efr.Name, efr.FullFileNumber); jstSettings.HeaderImageKey = "XRefFile.gif"; break; } janusSuperTip1.SetSuperTip(lnkLabel, jstSettings); lnkLabel.Tag = efr; pnlXRefsContainer.Controls.Add(lnkLabel); }
void CreateRecip(docDB.RecipientRow r) { if (r.Name == "") { return; } Janus.Windows.Common.SuperTipSettings jstSettings = new Janus.Windows.Common.SuperTipSettings(); Janus.Windows.GridEX.EditControls.EditBox eb = new Janus.Windows.GridEX.EditControls.EditBox(); eb.Name = r.RecipId.ToString(); eb.BorderStyle = Janus.Windows.GridEX.BorderStyle.None; eb.BackColor = tbBackColor; eb.ReadOnly = true; eb.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); eb.Tag = r; eb.Text = r.Name; eb.VisualStyle = Janus.Windows.GridEX.VisualStyle.Office2010; eb.TabStop = false; eb.MouseUp += tbNewRecipient_MouseUp; eb.ShortcutsEnabled = false; eb.ButtonClick += new EventHandler(eb_ButtonClick); if (!r.IsAddressNull()) { jstSettings.Text = r.Address; janusSuperTip1.SetSuperTip(eb, jstSettings); } if (!r.IsOfficerIdNull()) //resolved to officer { eb.Image = Properties.Resources.RecipientOfficer2; } else if (!r.IsListIdNull()) //resolved to list { eb.Image = Properties.Resources.recipientDistList; eb.Font = new Font(eb.Font.FontFamily, 8, FontStyle.Underline | FontStyle.Bold); } else //does not recognize/resolve { eb.Image = Properties.Resources.RecipientUnknown; } ToggleRecipReadOnly(eb); if (myReadOnly) { flowLayoutPanelRecipient.Controls.Add(eb); } else { flowLayoutPanelRecipient.Controls.Remove(tbNewRecipient); flowLayoutPanelRecipient.Controls.Add(eb); flowLayoutPanelRecipient.Controls.Add(tbNewRecipient); if (!AllowMultiple) { tbNewRecipient.Visible = false; } else { tbNewRecipient.Visible = true; } } if (added.ContainsKey(r.RecipId)) { return; } added.Add(r.RecipId, r); }
private void setOfficeTooltip(LinkLabel lnk, officeDB.OfficeRow or) { lnk.Text = or.OfficeCode; string address = ""; if (!or.IsCityNull()) { address = or.City; } if (!or.IsProvinceCodeNull()) { if (address == "") { address = or.ProvinceCode; } else { address += ", " + or.ProvinceCode; } } if (!or.IsCountryCodeNull()) { if (address == "") { address = or.CountryCode; } else { address += ", " + or.CountryCode; } } string addressLbl = address + Environment.NewLine; string tel = ""; string tollfree = ""; string fax = ""; if (!or.IsWorkPhoneNull()) { string tmp = or.WorkPhone; if (!or.IsWorkExtensionNull()) { tmp += " Ext. " + or.WorkExtension; } tel = Environment.NewLine + Properties.Resources.TocOfficeTKTelephone + tmp; } if (!or.IsHomePhoneNull()) { tollfree = Environment.NewLine + Properties.Resources.TocOfficeTKTollFree + or.HomePhone; } if (!or.IsFaxNumberNull()) { fax = Environment.NewLine + Properties.Resources.TocOfficeTKFax + or.FaxNumber; } string jlpvalue = ""; if (!or.IsJudgmentLPNull()) //Judgment LP value exists, show it { jlpvalue = Environment.NewLine + Environment.NewLine + Properties.Resources.TocOfficeTKJudgLP + or.JudgmentLP.ToString() + Properties.Resources.TocOfficeTKyears; } string wlpvalue = ""; if (!or.IsWritofExecutionLPNull()) // { wlpvalue = Environment.NewLine + Properties.Resources.TocOfficeTKWritLP + or.WritofExecutionLP.ToString() + Properties.Resources.TocOfficeTKyears; } Janus.Windows.Common.SuperTipSettings jstSettings1 = new Janus.Windows.Common.SuperTipSettings(); jstSettings1.Image = Properties.Resources.office; if (fmCurrent.AtMng.AppMan.Language == "FRE") { jstSettings1.HeaderText = "(" + or.OfficeCode + ") " + or.OfficeNameFre; } else { jstSettings1.HeaderText = "(" + or.OfficeCode + ") " + or.OfficeName; } if (or.IsOnLine) { jstSettings1.FooterImage = Properties.Resources.atriumtrans16; jstSettings1.FooterText = or.OfficeCode + Properties.Resources.TocOfficeTKusesAtrium; } jstSettings1.Text = addressLbl + tel + tollfree + fax + jlpvalue + wlpvalue; janusSuperTip1.SetSuperTip(lnk, jstSettings1); }