internal Link build() { Link link = new Link (); link.Href = href; link.Text = (text == null ? href : text ); link.Title = (tooltip == null ? href : tooltip); return link; }
internal Link build() { Support.LogMethodEntry(); Link link = new Link (); link.Href = href; link.Text = (text == null ? href : text ); link.Title = (tooltip == null ? href : tooltip); Support.LogMethodExit(link); return link; }
private Silanis.ESL.API.PackageSettings CreateTypicalAPIPackageSettings() { Silanis.ESL.API.CeremonySettings apiCeremonySettings = new Silanis.ESL.API.CeremonySettings(); apiCeremonySettings.InPerson = false; apiCeremonySettings.Ada = true; apiCeremonySettings.DeclineButton = true; apiCeremonySettings.OptOutButton = true; apiCeremonySettings.AddDeclineReason("Decline reason one"); apiCeremonySettings.AddDeclineReason("Decline reason two"); apiCeremonySettings.AddDeclineReason("Decline reason three"); apiCeremonySettings.AddOptOutReason("Opt out reason one"); apiCeremonySettings.AddOptOutReason("Opt out reason two"); apiCeremonySettings.AddOptOutReason("Opt out reason three"); Silanis.ESL.API.Link link = new Silanis.ESL.API.Link(); link.Href = "http://www.google.ca"; link.Text = "click here"; apiCeremonySettings.HandOver = link; apiCeremonySettings.HideCaptureText = true; apiCeremonySettings.HideWatermark = true; apiCeremonySettings.MaxAuthFailsAllowed = 3; apiCeremonySettings.DisableFirstInPersonAffidavit = true; apiCeremonySettings.DisableSecondInPersonAffidavit = true; apiCeremonySettings.HideLanguageDropdown = true; apiCeremonySettings.HidePackageOwnerInPerson = true; Style style = new Style(); style.BackgroundColor = "white"; style.Color = "blue"; LayoutStyle layoutStyle = new LayoutStyle(); layoutStyle.Dialog = style; apiCeremonySettings.Style = layoutStyle; LayoutOptions layoutOptions = new LayoutOptions(); layoutOptions.Iframe = false; apiCeremonySettings.Layout = layoutOptions; HeaderOptions headerOptions = new HeaderOptions(); headerOptions.Breadcrumbs = true; headerOptions.Feedback = true; GlobalActionsOptions globalActionsOptions = new GlobalActionsOptions(); globalActionsOptions.Confirm = true; globalActionsOptions.Download = true; globalActionsOptions.SaveAsLayout = true; headerOptions.GlobalActions = globalActionsOptions; layoutOptions.Header = headerOptions; Silanis.ESL.API.PackageSettings apiPackageSettings = new Silanis.ESL.API.PackageSettings(); apiPackageSettings.Ceremony = apiCeremonySettings; return(apiPackageSettings); }
internal PackageSettings toAPIPackageSettings() { CeremonySettings ceremonySettings = new CeremonySettings(); if ( enableInPerson != null ) ceremonySettings.InPerson = enableInPerson.Value; if ( enableOptOut != null ) ceremonySettings.OptOutButton = enableOptOut.Value; if ( enableDecline != null ) ceremonySettings.DeclineButton = enableDecline.Value; if ( hideWatermark != null ) ceremonySettings.HideWatermark = hideWatermark.Value; if ( hideCaptureText != null ) ceremonySettings.HideCaptureText = hideCaptureText.Value; foreach ( string reason in optOutReasons ) ceremonySettings.OptOutReasons.Add( reason ); if ( maxAuthAttempts != null ) ceremonySettings.MaxAuthFailsAllowed = maxAuthAttempts.Value; if ( linkHref != null ) { Link link = new Link(); link.Href = linkHref; link.Text = ( linkText == null ? linkHref : linkText ); link.Title = ( linkTooltip == null ? linkHref : linkTooltip ); ceremonySettings.HandOver = link; } if ( showDialogOnComplete != null ) { CeremonyEvents ceremonyEvents = new CeremonyEvents(); CeremonyEventComplete ceremonyEventComplete = new CeremonyEventComplete(); if ( showDialogOnComplete != null ) ceremonyEventComplete.Dialog = showDialogOnComplete.Value; ceremonyEvents.Complete = ceremonyEventComplete; ceremonySettings.Events = ceremonyEvents; } if ( showDownloadButton != null ) { DocumentToolbarOptions documentToolbarOptions = new DocumentToolbarOptions(); if ( showDownloadButton != null ) documentToolbarOptions.DownloadButton = showDownloadButton.Value; ceremonySettings.DocumentToolbarOptions = documentToolbarOptions; } if ( ceremonyLayoutSettings != null ) { ceremonySettings.Layout = ceremonyLayoutSettings.toAPILayoutOptions(); } PackageSettings result = new PackageSettings(); result.Ceremony = ceremonySettings; return result; }