<commit_before>﻿using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;

namespace Junctionizer.UI.Columns
{
    public partial class DependentOnFinalSizeColumn
    {
        public DependentOnFinalSizeColumn()
        {
            InitializeComponent();
        }

        public override BindingBase Binding
        {
            get => base.Binding;

            set {
                base.Binding = value;

                var path = ((Binding) Binding).Path.Path;
                var lastDotIndex = path.LastIndexOf('.');
                var pathToFolder = lastDotIndex < 0 ? string.Empty : path.Substring(0, lastDotIndex + 1);

                AddCellStyle(pathToFolder);
            }
        }

        private void AddCellStyle(string pathToFolder)
        {
            CellStyle = new Style(typeof(DataGridCell), (Style) Application.Current.FindResource("RightAlignCell"));
            var trigger = new DataTrigger {
                Binding = new Binding(pathToFolder + "HasFinalSize"),
                Value = "False"
            };

            trigger.Setters.Add(new Setter(FontStyleProperty, FontStyles.Italic));
            trigger.Setters.Add(new Setter(FontWeightProperty, FontWeights.SemiBold));

            CellStyle.Triggers.Add(trigger);
        }
    }
}<commit_msg>Remove hard coded variable name.<commit_after>﻿using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;

using Junctionizer.Model;

namespace Junctionizer.UI.Columns
{
    public partial class DependentOnFinalSizeColumn
    {
        public DependentOnFinalSizeColumn()
        {
            InitializeComponent();
        }

        public override BindingBase Binding
        {
            get => base.Binding;

            set {
                base.Binding = value;

                var path = ((Binding) Binding).Path.Path;
                var lastDotIndex = path.LastIndexOf('.');
                var pathToFolder = lastDotIndex < 0 ? string.Empty : path.Substring(0, lastDotIndex + 1);

                AddCellStyle(pathToFolder);
            }
        }

        private void AddCellStyle(string pathToFolder)
        {
            CellStyle = new Style(typeof(DataGridCell), (Style) Application.Current.FindResource("RightAlignCell"));
            var trigger = new DataTrigger {
                Binding = new Binding(pathToFolder + nameof(GameFolder.HasFinalSize)),
                Value = "False"
            };

            trigger.Setters.Add(new Setter(FontStyleProperty, FontStyles.Italic));
            trigger.Setters.Add(new Setter(FontWeightProperty, FontWeights.SemiBold));

            CellStyle.Triggers.Add(trigger);
        }
    }
}
{'fraction_non_alphanumeric': 0.09195402298850575, 'fraction_numerical': 0.002224694104560623, 'mean_word_length': 2.0145251396648045, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3432897', 'n_tokens_mistral': 722, 'n_tokens_neox': 685, 'n_words': 138}