<commit_before>﻿using SharpDox.GUI.Command;
using System;
using System.Windows;
using System.Windows.Controls;
using SharpDox.GUI.Windows;
using SharpDox.Sdk.Config;
using SharpDox.Sdk.Build;

namespace SharpDox.GUI.Controls.ConfigGrid
{
    public partial class ConfigVisibilityControl : UserControl
    {
        public static readonly DependencyProperty ConfigItemDisplayNameProperty = DependencyProperty.Register("ConfigItemDisplayName", typeof(string), typeof(ConfigVisibilityControl));
        public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(ConfigVisibilityControl));

        private VisibilityEditorView _visibilityEditor;

        private readonly SDGuiStrings _strings;
        private readonly ICoreConfigSection _coreConfigSection;
        private readonly IBuildController _buildController;

        public ConfigVisibilityControl(SDGuiStrings strings, ICoreConfigSection coreConfigSection, IBuildController buildController)
        {
            _strings = strings;
            _coreConfigSection = coreConfigSection;
            _buildController = buildController;

            coreConfigSection.PropertyChanged += ExcludedIdentifiersChanged;
            ExcludedIdentifiersChanged(null, null);

            DataContext = this;
            InitializeComponent();
        }

        void ExcludedIdentifiersChanged(object sender, EventArgs e)
        {
            if (_coreConfigSection.ExcludedIdentifiers.Count == 0)
            {
                Text = string.Format("{0} {1} {2}", _strings.None, _strings.Elements, _strings.Excluded);
            }
            else
            {
                Text = string.Format("{0} {1} {2}", _coreConfigSection.ExcludedIdentifiers.Count, _strings.Elements, _strings.Excluded);
            }
        }

        public string ConfigItemDisplayName<commit_msg>Bugfix in new GUI<commit_after>﻿using SharpDox.GUI.Command;
using System;
using System.Windows;
using System.Windows.Controls;
using SharpDox.GUI.Windows;
using SharpDox.Sdk.Config;
using SharpDox.Sdk.Build;
using System.ComponentModel;

namespace SharpDox.GUI.Controls.ConfigGrid
{
    public partial class ConfigVisibilityControl : UserControl
    {
        public static readonly DependencyProperty ConfigItemDisplayNameProperty = DependencyProperty.Register("ConfigItemDisplayName", typeof(string), typeof(ConfigVisibilityControl));
        public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(ConfigVisibilityControl));

        private VisibilityEditorView _visibilityEditor;

        private readonly SDGuiStrings _strings;
        private readonly ICoreConfigSection _coreConfigSection;
        private readonly IBuildController _buildController;

        public ConfigVisibilityControl(SDGuiStrings strings, ICoreConfigSection coreConfigSection, IBuildController buildController)
        {
            _strings = strings;
            _coreConfigSection = coreConfigSection;
            _buildController = buildController;

            coreConfigSection.PropertyChanged += ExcludedIdentifiersChanged;
            ExcludedIdentifiersChanged(null, null);

            DataContext = this;
            InitializeComponent();
        }

        void ExcludedIdentifiersChanged(object sender, PropertyChangedEventArgs e)
        {
            if (e != null && e.PropertyName == "ExcludedIdentifiers")
            {
                if (_coreConfigSection.ExcludedIdentifiers.Count == 0)
                {
                    Text = string.Format("{0} {1} {2}", _strings.None, _strings.Elements, _strings.Excluded);
                }
                else
                {
                    Text = string.Format("{0} {1} {2}", _coreConfigSection.ExcludedIdentifiers.Count, _strings.Elements, _strings.Excluded);
                }
            }
            else if (e == null)
            {
                Text = string.Format("{0} {1} {2}", _strings.None, _strings.Elements, _strings.Excluded);
            }
        }

        public string ConfigItemDisplayName
{'fraction_non_alphanumeric': 0.07632474477394263, 'fraction_numerical': 0.004132231404958678, 'mean_word_length': 2.863849765258216, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5220523', 'n_tokens_mistral': 1012, 'n_tokens_neox': 965, 'n_words': 216}