public void ConvertNullSDKToSDK()
        {
            sdkCeremonyLayoutSettings1 = null;
            converter = new CeremonyLayoutSettingsConverter(sdkCeremonyLayoutSettings1);

            Assert.IsNull(converter.ToSDKCeremonyLayoutSettings());
        }
        public void ConvertNullSDKToSDK()
        {
            sdkCeremonyLayoutSettings1 = null;
            converter = new CeremonyLayoutSettingsConverter(sdkCeremonyLayoutSettings1);

            Assert.IsNull(converter.ToSDKCeremonyLayoutSettings());
        }
        public void ConvertSDKToSDK()
        {
            sdkCeremonyLayoutSettings1 = CreateTypicalSDKCeremonyLayoutSettings();
            sdkCeremonyLayoutSettings2 = new CeremonyLayoutSettingsConverter(sdkCeremonyLayoutSettings1).ToSDKCeremonyLayoutSettings();

            Assert.IsNotNull(sdkCeremonyLayoutSettings2);
            Assert.AreEqual(sdkCeremonyLayoutSettings2, sdkCeremonyLayoutSettings1);
        }
        public void ConvertSDKToSDK()
        {
            sdkCeremonyLayoutSettings1 = CreateTypicalSDKCeremonyLayoutSettings();
            sdkCeremonyLayoutSettings2 = new CeremonyLayoutSettingsConverter(sdkCeremonyLayoutSettings1).ToSDKCeremonyLayoutSettings();

            Assert.IsNotNull(sdkCeremonyLayoutSettings2);
            Assert.AreEqual(sdkCeremonyLayoutSettings2, sdkCeremonyLayoutSettings1);
        }
Пример #5
0
        public CeremonyLayoutSettings Build()
        {
            CeremonyLayoutSettings result = new CeremonyLayoutSettings();

            result.IFrame           = iFrame;
            result.BreadCrumbs      = breadCrumbs;
            result.SessionBar       = sessionBar;
            result.GlobalNavigation = globalNavigation;
            result.ProgressBar      = progressBar;
            result.ShowTitle        = showTitle;
            result.Navigator        = navigator;
            result.LogoImageSource  = logoImageSource;
            result.LogoImageLink    = logoImageLink;

            return(result);
        }
        private Silanis.ESL.SDK.CeremonyLayoutSettings CreateTypicalSDKCeremonyLayoutSettings()
        {
            Silanis.ESL.SDK.CeremonyLayoutSettings settings = new Silanis.ESL.SDK.CeremonyLayoutSettings();
            settings.LogoImageLink                = "logoImageLink";
            settings.LogoImageSource              = "logoImageSource";
            settings.IFrame                       = true;
            settings.ShowTitle                    = true;
            settings.SessionBar                   = true;
            settings.ProgressBar                  = true;
            settings.BreadCrumbs                  = true;
            settings.GlobalNavigation             = true;
            settings.ShowGlobalConfirmButton      = true;
            settings.ShowGlobalDownloadButton     = true;
            settings.ShowGlobalSaveAsLayoutButton = true;

            return(settings);
        }
        public void ConvertSDKToAPI()
        {
            sdkCeremonyLayoutSettings1 = CreateTypicalSDKCeremonyLayoutSettings();
            apiLayoutOptions1          = new CeremonyLayoutSettingsConverter(sdkCeremonyLayoutSettings1).ToAPILayoutOptions();

            Assert.IsNotNull(apiLayoutOptions1);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.LogoImageLink, apiLayoutOptions1.BrandingBar.Logo.Link);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.LogoImageSource, apiLayoutOptions1.BrandingBar.Logo.Src);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.IFrame, apiLayoutOptions1.Iframe);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.ShowTitle, apiLayoutOptions1.Header.TitleBar.Title);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.SessionBar, apiLayoutOptions1.Header.SessionBar);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.ProgressBar, apiLayoutOptions1.Header.TitleBar.ProgressBar);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.BreadCrumbs, apiLayoutOptions1.Header.Breadcrumbs);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.GlobalNavigation, apiLayoutOptions1.Header.GlobalNavigation);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.ShowGlobalConfirmButton, apiLayoutOptions1.Header.GlobalActions.Confirm);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.ShowGlobalDownloadButton, apiLayoutOptions1.Header.GlobalActions.Download);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.ShowGlobalSaveAsLayoutButton, apiLayoutOptions1.Header.GlobalActions.SaveAsLayout);
        }
        public void ConvertAPIToSDK()
        {
            apiLayoutOptions1 = CreateTypicalAPICeremonyLayoutSettings();
            sdkCeremonyLayoutSettings1 = new CeremonyLayoutSettingsConverter(apiLayoutOptions1).ToSDKCeremonyLayoutSettings();

            Assert.IsNotNull(sdkCeremonyLayoutSettings1);
            Assert.IsNull(sdkCeremonyLayoutSettings1.LogoImageLink);
            Assert.IsNull(sdkCeremonyLayoutSettings1.LogoImageSource);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.IFrame, apiLayoutOptions1.Iframe);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.ShowTitle, apiLayoutOptions1.Header.TitleBar.Title);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.SessionBar, apiLayoutOptions1.Header.SessionBar);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.ProgressBar, apiLayoutOptions1.Header.TitleBar.ProgressBar);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.BreadCrumbs, apiLayoutOptions1.Header.Breadcrumbs);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.GlobalNavigation, apiLayoutOptions1.Header.GlobalNavigation);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.ShowGlobalConfirmButton, apiLayoutOptions1.Header.GlobalActions.Confirm);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.ShowGlobalDownloadButton, apiLayoutOptions1.Header.GlobalActions.Download);
            Assert.AreEqual(sdkCeremonyLayoutSettings1.ShowGlobalSaveAsLayoutButton, apiLayoutOptions1.Header.GlobalActions.SaveAsLayout);
        }
Пример #9
0
        public CeremonyLayoutSettings Build()
        {
            CeremonyLayoutSettings result = new CeremonyLayoutSettings();

            result.BreadCrumbs                  = breadCrumbs;
            result.SessionBar                   = sessionBar;
            result.GlobalNavigation             = globalNavigation;
            result.ProgressBar                  = progressBar;
            result.ShowTitle                    = showTitle;
            result.Navigator                    = navigator;
            result.ShowGlobalConfirmButton      = showGlobalConfirmButton;
            result.ShowGlobalDownloadButton     = showGlobalDownloadButton;
            result.ShowGlobalSaveAsLayoutButton = showGlobalSaveAsLayoutButton;
            result.LogoImageSource              = logoImageSource;
            result.LogoImageLink                = logoImageLink;

            return(result);
        }
Пример #10
0
        public Silanis.ESL.SDK.CeremonyLayoutSettings ToSDKCeremonyLayoutSettings()
        {
            if (apiLayoutOptions == null)
            {
                return(sdkCeremonyLayoutSettings);
            }

            CeremonyLayoutSettings result = new CeremonyLayoutSettings();

            result.IFrame = apiLayoutOptions.Iframe;

            if (apiLayoutOptions.Header != null)
            {
                result.BreadCrumbs      = apiLayoutOptions.Header.Breadcrumbs;
                result.SessionBar       = apiLayoutOptions.Header.SessionBar;
                result.GlobalNavigation = apiLayoutOptions.Header.GlobalNavigation;

                if (apiLayoutOptions.Header.GlobalActions != null)
                {
                    result.ShowGlobalConfirmButton      = apiLayoutOptions.Header.GlobalActions.Confirm;
                    result.ShowGlobalDownloadButton     = apiLayoutOptions.Header.GlobalActions.Download;
                    result.ShowGlobalSaveAsLayoutButton = apiLayoutOptions.Header.GlobalActions.SaveAsLayout;
                }

                if (apiLayoutOptions.Header.TitleBar != null)
                {
                    result.ShowTitle   = apiLayoutOptions.Header.TitleBar.Title;
                    result.ProgressBar = apiLayoutOptions.Header.TitleBar.ProgressBar;
                }
            }

            result.Navigator = apiLayoutOptions.Navigator;

            if (apiLayoutOptions.BrandingBar != null && apiLayoutOptions.BrandingBar.Logo != null)
            {
                result.LogoImageLink   = apiLayoutOptions.BrandingBar.Logo.Link;
                result.LogoImageSource = apiLayoutOptions.BrandingBar.Logo.Src;
            }

            return(result);
        }
 public DocumentPackageSettingsBuilder WithCeremonyLayoutSettings(CeremonyLayoutSettings ceremonyLayoutSettings)
 {
     this.ceremonyLayoutSettings = ceremonyLayoutSettings;
     return(this);
 }
        public Silanis.ESL.SDK.CeremonyLayoutSettings ToSDKCeremonyLayoutSettings()
        {
            if (apiLayoutOptions == null)
            {
                return sdkCeremonyLayoutSettings;
            }

            CeremonyLayoutSettings result = new CeremonyLayoutSettings();

            result.IFrame = apiLayoutOptions.Iframe;

            if (apiLayoutOptions.Header != null)
            {
                result.BreadCrumbs = apiLayoutOptions.Header.Breadcrumbs;
                result.SessionBar = apiLayoutOptions.Header.SessionBar;
                result.GlobalNavigation = apiLayoutOptions.Header.GlobalNavigation;

                if (apiLayoutOptions.Header.GlobalActions != null)
                {
                    result.ShowGlobalConfirmButton = apiLayoutOptions.Header.GlobalActions.Confirm;
                    result.ShowGlobalDownloadButton = apiLayoutOptions.Header.GlobalActions.Download;
                    result.ShowGlobalSaveAsLayoutButton = apiLayoutOptions.Header.GlobalActions.SaveAsLayout;
                }

                if (apiLayoutOptions.Header.TitleBar != null)
                {
                    result.ShowTitle = apiLayoutOptions.Header.TitleBar.Title;
                    result.ProgressBar = apiLayoutOptions.Header.TitleBar.ProgressBar;
                }
            }

            result.Navigator = apiLayoutOptions.Navigator;

            if (apiLayoutOptions.BrandingBar != null && apiLayoutOptions.BrandingBar.Logo != null)
            {
                result.LogoImageLink = apiLayoutOptions.BrandingBar.Logo.Link;
                result.LogoImageSource = apiLayoutOptions.BrandingBar.Logo.Src;
            }

            return result;
        }
		public DocumentPackageSettingsBuilder WithCeremonyLayoutSettings( CeremonyLayoutSettings ceremonyLayoutSettings )
		{
			this.ceremonyLayoutSettings = ceremonyLayoutSettings;
			return this;
		}
		public CeremonyLayoutSettings Build()
		{
			Support.LogMethodEntry();
			CeremonyLayoutSettings result = new CeremonyLayoutSettings ();
			result.IFrame = iFrame;
			result.BreadCrumbs = breadCrumbs;
			result.SessionBar = sessionBar;
			result.GlobalNavigation = globalNavigation;
			result.ProgressBar = progressBar;
			result.ShowTitle = showTitle;
			result.Navigator = navigator;
            result.ShowGlobalConfirmButton = showGlobalConfirmButton;
            result.ShowGlobalDownloadButton = showGlobalDownloadButton;
            result.ShowGlobalSaveAsLayoutButton = showGlobalSaveAsLayoutButton;
			result.LogoImageSource = logoImageSource;
			result.LogoImageLink = logoImageLink;

			Support.LogMethodExit(result);
			return result;
		}
Пример #15
0
        override public void Execute()
        {
            sentLayoutSettings = CeremonyLayoutSettingsBuilder.NewCeremonyLayoutSettings()
                                .WithBreadCrumbs()
                                .WithGlobalConfirmButton()
                                .WithGlobalDownloadButton()
                                .WithGlobalNavigation()
                                .WithGlobalSaveAsLayoutButton()
                                .WithIFrame()
                                .WithLogoImageLink( "old logo image link" )
                                .WithLogoImageSource( "old logo image source" )
                                .WithNavigator()
                                .WithProgressBar()
                                .WithSessionBar()
                                .WithTitle()
                                .Build();
                                
            sentSettings = DocumentPackageSettingsBuilder.NewDocumentPackageSettings()
                    .WithCaptureText()
                    .WithDecline()
                    .WithDialogOnComplete()
                    .WithDocumentToolbarDownloadButton()
                    .WithHandOverLinkHref("http://www.old.ca")
                    .WithHandOverLinkText("old hand over link text")
                    .WithHandOverLinkTooltip("old hand over link tool tip")
                    .WithInPerson()
                    .WithOptOut()
                    .WithOptOutReason("old opt out reason #1")
                    .WithOptOutReason("old opt out reason #2")
                    .WithOptOutReason("old opt out reason #3")
                    .WithWatermark()
                    .WithCeremonyLayoutSettings(sentLayoutSettings)
                    .Build();
                    
            sentPackage = PackageBuilder.NewPackageNamed("Old Package Name")
                                          .DescribedAs("Old Description")
                                          .WithEmailMessage("Old Email Message")
                                          .ExpiresOn(DateTime.Now.AddMonths(1))
                                          .WithLanguage( CultureInfo.GetCultureInfo("en"))
                                          .WithAutomaticCompletion()
                                          .WithSettings( sentSettings )
                                          .Build();

            packageId = eslClient.CreatePackage(sentPackage);

            updatedLayoutSettings = CeremonyLayoutSettingsBuilder.NewCeremonyLayoutSettings()
                                .WithoutBreadCrumbs()
                                .WithoutGlobalConfirmButton()
                                .WithoutGlobalDownloadButton()
                                .WithoutGlobalNavigation()
                                .WithoutGlobalSaveAsLayoutButton()
                                .WithoutIFrame()
                                .WithLogoImageLink( "new logo image link" )
                                .WithLogoImageSource( "new logo image source" )
                                .WithoutNavigator()
                                .WithoutProgressBar()
                                .WithoutSessionBar()
                                .WithoutTitle()
                                .Build();

            updatedSettings = DocumentPackageSettingsBuilder.NewDocumentPackageSettings()
                    .WithoutCaptureText()
                    .WithoutDecline()
                    .WithoutDialogOnComplete()
                    .WithoutDocumentToolbarDownloadButton()
                    .WithHandOverLinkHref("http://www.new.ca")
                    .WithHandOverLinkText("new hand over link text")
                    .WithHandOverLinkTooltip("new hand over link tool tip")
                    .WithoutInPerson()
                    .WithoutOptOut()
                    .WithOptOutReason("new opt out reason #1")
                    .WithOptOutReason("new opt out reason #2")
                    .WithOptOutReason("new opt out reason #3")
                    .WithoutWatermark()
                    .WithCeremonyLayoutSettings(updatedLayoutSettings)
                    .Build();

            updatedPackage = PackageBuilder.NewPackageNamed( "New Package Name" )
                               .WithEmailMessage( "New Email Message" )
                               .ExpiresOn(DateTime.Now.AddMonths(2))
                               .WithLanguage( CultureInfo.GetCultureInfo("fr"))
                               .WithoutAutomaticCompletion()
                               .WithSettings( updatedSettings )
                               .Build();

            eslClient.UpdatePackage(packageId, updatedPackage);

            retrievedPackage = eslClient.GetPackage( packageId );
            retrievedSettings = retrievedPackage.Settings;
            retrievedLayoutSettings = retrievedSettings.CeremonyLayoutSettings;
        }
		private Silanis.ESL.SDK.CeremonyLayoutSettings CreateTypicalSDKCeremonyLayoutSettings()
		{
			Silanis.ESL.SDK.CeremonyLayoutSettings settings = new Silanis.ESL.SDK.CeremonyLayoutSettings();
			settings.LogoImageLink = "logoImageLink";
			settings.LogoImageSource = "logoImageSource";
			settings.IFrame = true;
			settings.ShowTitle = true;
			settings.SessionBar = true;
			settings.ProgressBar = true;
			settings.BreadCrumbs = true;
			settings.GlobalNavigation = true;
			settings.ShowGlobalConfirmButton = true;
			settings.ShowGlobalDownloadButton = true;
			settings.ShowGlobalSaveAsLayoutButton = true;

			return settings;
		}