<commit_before>﻿namespace AllInPoker.Popups
{
    using System;
    using System.Windows.Forms;

    /// <summary>
    /// Create Tournament PopUp to create a new Tournament
    /// </summary>
    public partial class CreateEventPopup : Form
    {
        /// <summary>
        /// Initialize CreateTournamentComponent
        /// </summary>
        public CreateEventPopup()
        {
            this.InitializeComponent();
        }

        /// <summary>
        /// Override default close, to hide, so data can be recovered on accidental close
        /// </summary>
        /// <param name="e">Form Close Event Arguments</param>
        protected override void OnFormClosing(FormClosingEventArgs e)
        {
            if (e.CloseReason == CloseReason.UserClosing)
            {
                e.Cancel = true;
                this.Hide();
            }
        }

        /// <summary>
        /// Clear all text from the form
        /// </summary>
        private void ResetFields()
        {
            foreach (Control control in this.Controls)
            {
                if (control is TextBox)
                {
                    control.ResetText();
                }
            }
        }

        /// <summary>
        /// Submit data
        /// </summary>
        /// <param name="sender">The Create Tournament View</param>
        /// <param name="e">Event Arguments from the Create Tournament Event</param>
        private void CreateTournamentButtonClick(object sender, EventArgs e)
        {
            string date = this.datePicker.Text;
            string city = this.txtCity.Text;
            string address = this.txtAdress.Text;
            string cost = this.txtCost.Text;

            decimal minAge = this.numMinAge.Value;
            decimal maxAge = this.numMaxAge.Value;
            decimal minPlayers = this.numMinPlayers.Value;
            decimal maxPlayers = this.numMaxPlayers.Value;

            this.ResetFields();
            this.Hide();

            MessageBox.Show("Toernooi succesvol aangemaakt!");
        }
    }
}<commit_msg>Added boolean for event or masterclass<commit_after>﻿namespace AllInPoker.Popups
{
    using System;
    using System.Windows.Forms;

    /// <summary>
    /// Create Tournament PopUp to create a new Tournament
    /// </summary>
    public partial class CreateEventPopup : Form
    {
        /// <summary>
        /// Initialize CreateTournamentComponent
        /// </summary>
        public CreateEventPopup()
        {
            this.InitializeComponent();
        }

        /// <summary>
        /// Override default close, to hide, so data can be recovered on accidental close
        /// </summary>
        /// <param name="e">Form Close Event Arguments</param>
        protected override void OnFormClosing(FormClosingEventArgs e)
        {
            if (e.CloseReason == CloseReason.UserClosing)
            {
                e.Cancel = true;
                this.Hide();
            }
        }

        /// <summary>
        /// Clear all text from the form
        /// </summary>
        private void ResetFields()
        {
            foreach (Control control in this.Controls)
            {
                if (control is TextBox)
                {
                    control.ResetText();
                }
            }
        }

        /// <summary>
        /// Submit data
        /// </summary>
        /// <param name="sender">The Create Tournament View</param>
        /// <param name="e">Event Arguments from the Create Tournament Event</param>
        private void CreateTournamentButtonClick(object sender, EventArgs e)
        {
            string date = this.datePicker.Text;
            string city = this.txtCity.Text;
            string address = this.txtAdress.Text;
            string cost = this.txtCost.Text;

            decimal minAge = this.numMinAge.Value;
            decimal maxAge = this.numMaxAge.Value;
            decimal minPlayers = this.numMinPlayers.Value;
            decimal maxPlayers = this.numMaxPlayers.Value;

            bool isTournament = this.rdoToernooi.Checked;

            this.ResetFields();
            this.Hide();

            MessageBox.Show("Toernooi succesvol aangemaakt!");
        }
    }
}
{'fraction_non_alphanumeric': 0.09881602914389799, 'fraction_numerical': 0.0, 'mean_word_length': 1.3836136733586544, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, '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': '3502487', 'n_tokens_mistral': 1130, 'n_tokens_neox': 1057, 'n_words': 272}