<commit_before>﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Globalization;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;

using Microsoft.Win32;

using TAlex.GameOfLife.Engine;
using TAlex.GameOfLife.FileFormats;
using TAlex.GameOfLife.Controls;
using TAlex.GameOfLife.Helpers;


namespace TAlex.GameOfLife
{
    public partial class MainWindow : Window
    {
        #region Fields

        private const string NumericFormat = "N0";

        private const string DefaultFilePath = "Untitled";

        private bool _patternChanged = false;

        private LifePatternFileFormat _currentOpenedFileFormat;

        private string _currentFilePath = DefaultFilePath;

        private string _patternsDirPath;

        #endregion

        #region Constructors

        public MainWindow()
        {
            InitializeComponent();
            LoadSettings();
<commit_msg>Small code refactoring.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Globalization;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;

using Microsoft.Win32;

using TAlex.GameOfLife.Engine;
using TAlex.GameOfLife.FileFormats;
using TAlex.GameOfLife.Helpers;
using TAlex.GameOfLife.Controls;


namespace TAlex.GameOfLife
{
    public partial class MainWindow : Window
    {
        #region Fields

        private const string NumericFormat = "N0";

        private const string DefaultFilePath = "Untitled";

        private bool _patternChanged = false;

        private LifePatternFileFormat _currentOpenedFileFormat;

        private string _currentFilePath = DefaultFilePath;

        private string _patternsDirPath;

        #endregion

        #region Constructors

        public MainWindow()
        {
            InitializeComponent();
            LoadSettings();

{'fraction_non_alphanumeric': 0.0741852487135506, 'fraction_numerical': 0.002572898799313894, 'mean_word_length': 3.574509803921569, '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': '334438', 'n_tokens_mistral': 629, 'n_tokens_neox': 610, 'n_words': 158}