/// <summary> /// Data for the Partner got loaded and we can determine the Partners' 'Primary E-Mail Address'. /// If the Partner has got one we will ask the the E-Mail program to open a new E-Mail with /// the Partner's E-Mail address as the recipient of the E-Mail. /// </summary> /// <param name="Sender">Our instance of <see cref="TUC_PartnerInfo"/>.</param> /// <param name="e">Ignored.</param> private void PartnerInfoUC_DataLoaded(object Sender, Types.TPartnerKeyData e) { String PrimaryEmailAddress; if (Calculations.GetPrimaryEmailAddress( ((TUC_PartnerInfo)Sender).GetPartnerAttributeData(), out PrimaryEmailAddress)) { // MessageBox.Show(PrimaryEmailAddress.ToString()); TRtbHyperlinks.DisplayHelper Launcher = new TRtbHyperlinks.DisplayHelper(new TRtbHyperlinks()); Launcher.LaunchHyperLink(PrimaryEmailAddress, THyperLinkHandling.HYPERLINK_PREFIX_EMAILLINK); } else { MessageBox.Show(MPartnerResourcestrings.StrNoPrimaryEmailAvailableToSendEmailTo, MPartnerResourcestrings.StrNoPrimaryEmailAvailableToSendEmailToTitle, MessageBoxButtons.OK, MessageBoxIcon.Information); } // We don't want to get any further notifications (until the 'SendEmailToPartner' Method hooks myself up again!) ((TUC_PartnerInfo)Sender).DataLoaded -= PartnerInfoUC_DataLoaded; }
private void LaunchHyperlinkFromValue(object sender, EventArgs e) { TRtbHyperlinks TempHyperlinkCtrl = new TRtbHyperlinks(); string LinkType = String.Empty; // Don't attempt to launch an 'empty' link if (txtValue.Text == String.Empty) { return; } // TODO Replace this 'quick solution' when the txtValue Control is replaced with the proper rtbValue Control! TRtbHyperlinks.DisplayHelper Launcher = new TRtbHyperlinks.DisplayHelper(TempHyperlinkCtrl); switch (FValueKind) { case TPartnerAttributeTypeValueKind.CONTACTDETAIL_HYPERLINK: LinkType = THyperLinkHandling.HYPERLINK_PREFIX_URLLINK; break; case TPartnerAttributeTypeValueKind.CONTACTDETAIL_HYPERLINK_WITHVALUE: TempHyperlinkCtrl.BuildLinkWithValue = BuildLinkWithValue; LinkType = THyperLinkHandling.HYPERLINK_PREFIX_URLWITHVALUELINK; break; case TPartnerAttributeTypeValueKind.CONTACTDETAIL_EMAILADDRESS: LinkType = THyperLinkHandling.HYPERLINK_PREFIX_EMAILLINK; break; case TPartnerAttributeTypeValueKind.CONTACTDETAIL_SKYPEID: LinkType = THyperLinkHandling.HYPERLINK_PREFIX_SKYPELINK; break; } Launcher.LaunchHyperLink(txtValue.Text, LinkType); }
private void FileSendEmail(System.Object sender, System.EventArgs e) { string PrimaryEmailAddress; if (Calculations.GetPrimaryEmailAddress( FMainDS.PPartnerAttribute, out PrimaryEmailAddress)) { TRtbHyperlinks.DisplayHelper Launcher = new TRtbHyperlinks.DisplayHelper(new TRtbHyperlinks()); Launcher.LaunchHyperLink(PrimaryEmailAddress, THyperLinkHandling.HYPERLINK_PREFIX_EMAILLINK); } else { MessageBox.Show(MPartnerResourcestrings.StrNoPrimaryEmailAvailableToSendEmailTo, MPartnerResourcestrings.StrNoPrimaryEmailAvailableToSendEmailToTitle, MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void LaunchHyperlinkEMailWithinOrg(object sender, EventArgs e) { // TODO Replace this 'quick solution' when the txtValue Control is replaced with the proper rtbValue Control! TRtbHyperlinks.DisplayHelper Launcher = new TRtbHyperlinks.DisplayHelper(new TRtbHyperlinks()); string EmailAddress = cmbEMailWithinTheOrganisation.GetSelectedString(); // Don't attempt to launch an 'empty' link if (EmailAddress == String.Empty) { return; } Launcher.LaunchHyperLink(EmailAddress, "||email||"); }
private void rtbContactDetails_LinkClicked(string ALinkText, string ALinkType, int ALinkEnd) { var DisplayHelper = new TRtbHyperlinks.DisplayHelper(rtbContactDetails); DisplayHelper.LaunchHyperLink(ALinkText, ALinkType, ALinkEnd); }