Exemple #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="resourceProvider"></param>
        /// <param name="dynamoViewModel"></param>
        public UsageReportingAgreementPrompt(IBrandingResourceProvider resourceProvider, DynamoViewModel dynamoViewModel)
        {
            InitializeComponent();
            if (resourceProvider != null)
            {
                Title = resourceProvider.GetString(Wpf.Interfaces.ResourceNames.ConsentForm.Title);
                ConsentFormImageRectangle.Fill = new ImageBrush(
                    resourceProvider.GetImageSource(Wpf.Interfaces.ResourceNames.ConsentForm.Image));
            }
            viewModel = dynamoViewModel;
            var googleAnalyticsFile = "GoogleAnalyticsConsent.rtf";

            if (viewModel.Model.PathManager.ResolveDocumentPath(ref googleAnalyticsFile))
            {
                GoogleAnalyticsContent.File = googleAnalyticsFile;
            }

            var adpAnalyticsFile = "ADPAnalyticsConsent.rtf";

            if (viewModel.Model.PathManager.ResolveDocumentPath(ref adpAnalyticsFile))
            {
                InstrumentationContent.File = adpAnalyticsFile;
            }

            AcceptADPAnalyticsTextBlock.Text =
                string.Format(Wpf.Properties.Resources.ConsentFormADPAnalyticsCheckBoxContent,
                              dynamoViewModel.BrandingResourceProvider.ProductName);
            AcceptADPAnalyticsCheck.Visibility = System.Windows.Visibility.Visible;
            AcceptADPAnalyticsCheck.IsChecked  = AnalyticsService.IsADPOptedIn;

            AcceptGoogleAnalyticsCheck.IsChecked = UsageReportingManager.Instance.IsAnalyticsReportingApproved;
        }
        public UsageReportingAgreementPrompt(IBrandingResourceProvider resourceProvider, DynamoViewModel dynamoViewModel)
        {
            InitializeComponent();
            Title = resourceProvider.GetString(Wpf.Interfaces.ResourceNames.ConsentForm.Title);

            ConsentFormImageRectangle.Fill = new ImageBrush(
                resourceProvider.GetImageSource(Wpf.Interfaces.ResourceNames.ConsentForm.Image));

            viewModel = dynamoViewModel;

            var instrumentationFile = "InstrumentationConsent.rtf";

            if (viewModel.Model.PathManager.ResolveDocumentPath(ref instrumentationFile))
                InstrumentationContent.File = instrumentationFile;

            var googleAnalyticsFile = "GoogleAnalyticsConsent.rtf";

            if (viewModel.Model.PathManager.ResolveDocumentPath(ref googleAnalyticsFile))
                GoogleAnalyticsContent.File = googleAnalyticsFile;

            AcceptUsageReportingTextBlock.Text =
                string.Format(Wpf.Properties.Resources.ConsentFormInstrumentationCheckBoxContent,
                    dynamoViewModel.BrandingResourceProvider.ProductName);
            AcceptUsageReportingCheck.IsChecked = UsageReportingManager.Instance.IsUsageReportingApproved;
            AcceptAnalyticsReportingCheck.IsChecked = UsageReportingManager.Instance.IsAnalyticsReportingApproved;

        }
        public UsageReportingAgreementPrompt(IBrandingResourceProvider resourceProvider, DynamoViewModel dynamoViewModel)
        {
            InitializeComponent();
            Title = resourceProvider.GetString(Wpf.Interfaces.ResourceNames.ConsentForm.Title);

            ConsentFormImageRectangle.Fill = new ImageBrush(
                resourceProvider.GetImageSource(Wpf.Interfaces.ResourceNames.ConsentForm.Image));

            viewModel = dynamoViewModel;

            var instrumentationFile = "InstrumentationConsent.rtf";

            if (viewModel.Model.PathManager.ResolveDocumentPath(ref instrumentationFile))
            {
                InstrumentationContent.File = instrumentationFile;
            }

            var googleAnalyticsFile = "GoogleAnalyticsConsent.rtf";

            if (viewModel.Model.PathManager.ResolveDocumentPath(ref googleAnalyticsFile))
            {
                GoogleAnalyticsContent.File = googleAnalyticsFile;
            }

            AcceptUsageReportingTextBlock.Text =
                string.Format(Wpf.Properties.Resources.ConsentFormInstrumentationCheckBoxContent,
                              dynamoViewModel.BrandingResourceProvider.ProductName);
            AcceptUsageReportingCheck.IsChecked     = UsageReportingManager.Instance.IsUsageReportingApproved;
            AcceptAnalyticsReportingCheck.IsChecked = UsageReportingManager.Instance.IsAnalyticsReportingApproved;
        }
Exemple #4
0
        public UsageReportingAgreementPrompt(IBrandingResourceProvider resourceProvider)
        {
            InitializeComponent();
            Title = resourceProvider.GetString(Wpf.Interfaces.ResourceNames.ConsentForm.Title);

            ConsentFormImageRectangle.Fill = new ImageBrush(
                resourceProvider.GetImageSource(Wpf.Interfaces.ResourceNames.ConsentForm.Image));

            Message1TextBlock.Text = resourceProvider.GetString(Wpf.Interfaces.ResourceNames.ConsentForm.AgreementOne);
            FeatureTextBlock.Text  = resourceProvider.GetString(Wpf.Interfaces.ResourceNames.ConsentForm.FeatureUsage);
            NodeTextBlock.Text     = resourceProvider.GetString(Wpf.Interfaces.ResourceNames.ConsentForm.NodeUsage);
            Message2TextBlock.Text = resourceProvider.GetString(Wpf.Interfaces.ResourceNames.ConsentForm.AgreementTwo);
            ConsentTextBlock.Text  = resourceProvider.GetString(Wpf.Interfaces.ResourceNames.ConsentForm.Consent);
        }
Exemple #5
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="resourceProvider"></param>
        /// <param name="dynamoViewModel"></param>
        public UsageReportingAgreementPrompt(IBrandingResourceProvider resourceProvider, DynamoViewModel dynamoViewModel)
        {
            InitializeComponent();
            if (resourceProvider != null)
            {
                Title = resourceProvider.GetString(Wpf.Interfaces.ResourceNames.ConsentForm.Title);
                ConsentFormImageRectangle.Fill = new ImageBrush(
                    resourceProvider.GetImageSource(Wpf.Interfaces.ResourceNames.ConsentForm.Image));
            }
            viewModel = dynamoViewModel;
            var googleAnalyticsFile = "GoogleAnalyticsConsent.rtf";

            if (viewModel.Model.PathManager.ResolveDocumentPath(ref googleAnalyticsFile))
            {
                GoogleAnalyticsConsent.File = googleAnalyticsFile;
            }
            var adpAnalyticsFile = "ADPAnalyticsConsent.rtf";

            if (viewModel.Model.PathManager.ResolveDocumentPath(ref adpAnalyticsFile))
            {
                ADPAnalyticsConsent.File = adpAnalyticsFile;
            }

            //disable adp configure dialog version check fails.
            //also disabled below id all analytics disabled.
            configure_adp_button.IsEnabled = AnalyticsService.IsADPAvailable();

            AcceptGoogleAnalyticsCheck.IsChecked = UsageReportingManager.Instance.IsAnalyticsReportingApproved;

            if (Analytics.DisableAnalytics)
            {
                AcceptGoogleAnalyticsCheck.IsChecked     = false;
                AcceptGoogleAnalyticsTextBlock.IsEnabled = false;
                AcceptGoogleAnalyticsCheck.IsEnabled     = false;

                configure_adp_button.IsEnabled = false;
            }
        }