Beispiel #1
0
        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);
        }