Ejemplo n.º 1
0
        public CrashPrompt(CrashPromptArgs args, DynamoViewModel dynamoViewModel)
        {
            InitializeComponent();

            productName = dynamoViewModel.BrandingResourceProvider.ProductName;
            Title = string.Format(Wpf.Properties.Resources.CrashPromptDialogTitle, productName);
            txtOverridingText.Text = string.Format(Wpf.Properties.Resources.CrashPromptDialogCrashMessage, productName);

            if (args.HasDetails())
            {
                this.details = args.Details;
                this.CrashDetailsContent.Text = args.Details;
                this.btnDetails.Visibility = Visibility.Visible;
            }

            if (args.IsFilePath())
            {
                folderPath = Path.GetDirectoryName(args.FilePath);
                btnOpenFolder.Visibility = Visibility.Visible;
            }

            if (args.IsDefaultTextOverridden())
            {
                string overridingText = args.OverridingText;

                if (args.IsFilePath())
                    overridingText = overridingText.Replace("[FILEPATH]", args.FilePath);

                ConvertFormattedTextIntoTextblock(this.txtOverridingText, overridingText);
            }
        }
Ejemplo n.º 2
0
        public CrashPrompt(CrashPromptArgs args)
        {
            InitializeComponent();

            InstrumentationLogger.LogAnonymousEvent("CrashPrompt", "Stability");
            StabilityTracking.GetInstance().NotifyCrash();

            if (args.HasDetails())
            {
                this.details = args.Details;
                this.CrashDetailsContent.Text = args.Details;
                this.btnDetails.Visibility = Visibility.Visible;

                InstrumentationLogger.LogPiiInfo("CrashPrompt", args.Details);
            }
            else
            {
                InstrumentationLogger.LogPiiInfo("CrashPrompt", args.Details);
                
            }

            if (args.IsFilePath())
            {
                folderPath = Path.GetDirectoryName(args.FilePath);
                btnOpenFolder.Visibility = Visibility.Visible;
            }

            if (args.IsDefaultTextOverridden())
            {
                string overridingText = args.OverridingText;

                if (args.IsFilePath())
                    overridingText = overridingText.Replace("[FILEPATH]", args.FilePath);

                ConvertFormattedTextIntoTextblock(this.txtOverridingText, overridingText);
            }
        }