<commit_before>﻿using System.Collections.Generic;
using System.Threading;
using System.Windows.Forms;

namespace Mamesaver
{
    public class MultiFormApplicationContext : ApplicationContext
    {
        private readonly List<Form> _forms;
        private int _openForms;

        public MultiFormApplicationContext(List<Form> forms)
        {
            _forms = forms;
            
            foreach (var form in forms)
            {
                form.FormClosed += FormClosed;
                form.Show();
                _openForms++;
            }
        }

        private void FormClosed(object sender, FormClosedEventArgs args)
        {
            //When we have closed the last of the "starting" forms, 
            //end the program.
            if (Interlocked.Decrement(ref _openForms) == 0)
                ExitThread();
        }<commit_msg>Remove unused field<commit_after>﻿using System.Collections.Generic;
using System.Threading;
using System.Windows.Forms;

namespace Mamesaver
{
    public class MultiFormApplicationContext : ApplicationContext
    {
        private int _openForms;

        public MultiFormApplicationContext(List<Form> forms)
        {
            foreach (var form in forms)
            {
                form.FormClosed += FormClosed;
                form.Show();
                _openForms++;
            }
        }

        private void FormClosed(object sender, FormClosedEventArgs args)
        {
            //When we have closed the last of the "starting" forms, 
            //end the program.
            if (Interlocked.Decrement(ref _openForms) == 0)
                ExitThread();
        }
{'fraction_non_alphanumeric': 0.07571168988491823, 'fraction_numerical': 0.0012113870381586917, 'mean_word_length': 1.7579298831385644, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '2752090', 'n_tokens_mistral': 421, 'n_tokens_neox': 393, 'n_words': 110}