Exemplo n.º 1
0
        private RadioButton CreateRadioButton(IIssueReporting reporter)
        {
            RadioButton issueReportingOption = new RadioButton();

            issueReportingOption.Content  = reporter.ServiceName;
            issueReportingOption.Tag      = reporter.StableIdentifier;
            issueReportingOption.Margin   = new Thickness(2, 2, 2, 2);
            issueReportingOption.Checked += IssueReporterOnChecked;
            issueReportingOption.FontSize = 14;
            return(issueReportingOption);
        }
Exemplo n.º 2
0
        private RadioButton CreateRadioButton(IIssueReporting reporter)
        {
            RadioButton issueReportingOption = new RadioButton();

            issueReportingOption.Foreground = Application.Current.Resources["PrimaryFGBrush"] as SolidColorBrush;
            issueReportingOption.Content    = reporter.ServiceName;
            issueReportingOption.Tag        = reporter.StableIdentifier;
            issueReportingOption.Margin     = new Thickness(2, 2, 2, 2);
            issueReportingOption.Checked   += IssueReporterOnChecked;
            issueReportingOption.FontSize   = 14;
            return(issueReportingOption);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Call this when settings for an IIssueReporting object may have changed. The
        /// settings will be fetched and updated in the store.
        /// </summary>
        /// <param name="issueReporting">The object whose settings may have changed</param>
        public void UpdateIssueReporterSettings(IIssueReporting issueReporting)
        {
            if (issueReporting == null)
            {
                throw new ArgumentNullException(nameof(issueReporting));
            }

            if (issueReporting.TryGetCurrentSerializedSettings(out string settings))
            {
                Dictionary <Guid, string> configsDictionary = GetConfigsDictionary();
                configsDictionary[issueReporting.StableIdentifier] = settings;
                SaveConfigsDictionary(configsDictionary);
            }
        }