<commit_before>﻿namespace Mappy.UI.Forms
{
    using System;
    using System.ComponentModel;
    using System.Windows.Forms;

    public partial class NewMapForm : Form
    {
        public NewMapForm()
        {
            this.InitializeComponent();
        }

        public int MapWidth
        {
            get; private set;
        }

        public int MapHeight
        {
            get; private set;
        }

        private void NewMapForm_Validating(object sender, CancelEventArgs e)
        {
            try
            {
                int w = Convert.ToInt32(this.textBox1.Text);
                int h = Convert.ToInt32(this.textBox2.Text);

                if (w < 1 || h < 1)
                {
                    e.Cancel = true;
                }
                else
                {
                    this.MapWidth = w;
                    this.MapHeight = h;
                }
            }
            catch (FormatException)
            {
                e.Cancel = true;
            }
        }

        private bool ValidateFields()
        {
            try
            {
                int w = Convert.ToInt32(this.textBox1.Text);
                int h = Convert.ToInt32(this.textBox2.Text);

                if (w < 1 || h < 1)
                {
                    return false;
                }
                else
                {
                    this.MapWidth = w;
                    this.MapHeight = h;
                }
            }
            catch (FormatException)
            {
                return false;
            }

            return true;
        }

        private void Button1Click(object sender, EventArgs e)
        {
            if (this.ValidateFields())
            {
                this.DialogResult = DialogResult.OK;
            }
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            int valX;
            if (!int.TryParse(textBox1.Text, out valX))
            {
                this.label3.Text = string.Empty;
                return;
            }

            float convertedX = (valX * 32) / 512.0f;

            this.label3.Text = string.Format("({0})", convertedX);
        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {
            int valY;
            if (!int.TryParse(textBox2.Text, out valY))
            {
                this.label4.Text = string.Empty;
                return;
            }

            float convertedY = (valY * 32) / 512.0f;

            this.label4.Text = string.Format("({0})", convertedY);
        }
    }
}<commit_msg>Add missing "this"<commit_after>﻿namespace Mappy.UI.Forms
{
    using System;
    using System.ComponentModel;
    using System.Windows.Forms;

    public partial class NewMapForm : Form
    {
        public NewMapForm()
        {
            this.InitializeComponent();
        }

        public int MapWidth
        {
            get; private set;
        }

        public int MapHeight
        {
            get; private set;
        }

        private void NewMapForm_Validating(object sender, CancelEventArgs e)
        {
            try
            {
                int w = Convert.ToInt32(this.textBox1.Text);
                int h = Convert.ToInt32(this.textBox2.Text);

                if (w < 1 || h < 1)
                {
                    e.Cancel = true;
                }
                else
                {
                    this.MapWidth = w;
                    this.MapHeight = h;
                }
            }
            catch (FormatException)
            {
                e.Cancel = true;
            }
        }

        private bool ValidateFields()
        {
            try
            {
                int w = Convert.ToInt32(this.textBox1.Text);
                int h = Convert.ToInt32(this.textBox2.Text);

                if (w < 1 || h < 1)
                {
                    return false;
                }
                else
                {
                    this.MapWidth = w;
                    this.MapHeight = h;
                }
            }
            catch (FormatException)
            {
                return false;
            }

            return true;
        }

        private void Button1Click(object sender, EventArgs e)
        {
            if (this.ValidateFields())
            {
                this.DialogResult = DialogResult.OK;
            }
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            int valX;
            if (!int.TryParse(this.textBox1.Text, out valX))
            {
                this.label3.Text = string.Empty;
                return;
            }

            float convertedX = (valX * 32) / 512.0f;

            this.label3.Text = string.Format("({0})", convertedX);
        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {
            int valY;
            if (!int.TryParse(this.textBox2.Text, out valY))
            {
                this.label4.Text = string.Empty;
                return;
            }

            float convertedY = (valY * 32) / 512.0f;

            this.label4.Text = string.Format("({0})", convertedY);
        }
    }
}
{'fraction_non_alphanumeric': 0.08626258787763633, 'fraction_numerical': 0.0148204446133384, 'mean_word_length': 0.9489078119215105, 'pattern_counts': {'":': 0, '<': 11, '<?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': '6316296', 'n_tokens_mistral': 1457, 'n_tokens_neox': 1339, 'n_words': 284}