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

    using AllInPoker.Views;

    /// <summary>
    /// Tournament Button inside the Main Tournaments View
    /// </summary>
    public class MasterclassButton : Button
    {
        public override string Text
        {
            get => string.Empty;
            set => base.Text = value;
        }

        public string MasterclassTitle { get; set; }

        public string MasterclassTutor { get; set; }

        public int MasterclassPlayerCount { get; set; }

        public int MasterclassMaxPlayerCount { get; set; }

        public string MasterclassDate { get; set; }

        private Font RegularFont { get; }

        private Font BigFont { get; }

        /// <summary>
        /// Initialize TournamentButton
        /// </summary>
        public MasterclassButton()
        {
            this.Width = 250;
            this.Height = 70;
            this.FlatStyle = FlatStyle.Flat;
            this.FlatAppearance.BorderColor = Color.FromArgb(200, 200, 200);
            this.RegularFont = new Font("Microsoft Sans Serif", 10, FontStyle.Regular);
            this.BigFont = new Font("Microsoft Sans Serif", 10, FontStyle.Bold);
            this.UseVisualStyleBackColor = false;
            this.Cursor = Cursors.Hand;
            this.BackColor = Color.White;

            this.Click += (sender, args) => new UpcomingTournamentView(this.MasterclassTitle).ShowDialog();
        }

        /// <summary>
        /// Override default paint to custom button with custom text
        /// </summary>
        /// <param name="paintEventArgs">Paint Event Arguments</param>
        protected override void OnPaint(PaintEventArgs paintEventArgs)
        {
            base.OnPaint(paintEventArgs);
            Rectangle rect = this.ClientRectangle;
            rect.Inflate(-5, -5);
            using (StringFormat sf = new StringFormat()
            {
                Alignment = StringAlignment.Near,
                LineAlignment = StringAlignment.Far
            })
            {
                using (Brush brush = new SolidBrush(this.ForeColor))
                {
                    sf.LineAlignment = StringAlignment.Near;
                    paintEventArgs.Graphics.DrawString(this.MasterclassTitle, this.BigFont, brush, rect, sf);
                    sf.LineAlignment = StringAlignment.Center;
                    paintEventArgs.Graphics.DrawString("door " + this.MasterclassTutor, this.RegularFont, brush, rect, sf);
                    sf.LineAlignment = StringAlignment.Far;
                    paintEventArgs.Graphics.DrawString(this.MasterclassDate, this.RegularFont, brush, rect, sf);
                    sf.Alignment = StringAlignment.Far;
                    paintEventArgs.Graphics.DrawString(this.MasterclassPlayerCount + "/" + this.MasterclassMaxPlayerCount + " deelnemers", this.RegularFont, brush, rect, sf);
                }
            }
        }
    }
}<commit_msg>crashfix: VS2015 crying about arrow functions<commit_after>﻿namespace AllInPoker.Buttons
{
    using System.Drawing;
    using System.Windows.Forms;

    using AllInPoker.Views;

    /// <summary>
    /// Tournament Button inside the Main Tournaments View
    /// </summary>
    public class MasterclassButton : Button
    {
        public override string Text
        {
            get
            {
                return string.Empty;
            }
            set
            {
                base.Text = value;
            }
        }

        public string MasterclassTitle { get; set; }

        public string MasterclassTutor { get; set; }

        public int MasterclassPlayerCount { get; set; }

        public int MasterclassMaxPlayerCount { get; set; }

        public string MasterclassDate { get; set; }

        private Font RegularFont { get; }

        private Font BigFont { get; }

        /// <summary>
        /// Initialize TournamentButton
        /// </summary>
        public MasterclassButton()
        {
            this.Width = 250;
            this.Height = 70;
            this.FlatStyle = FlatStyle.Flat;
            this.FlatAppearance.BorderColor = Color.FromArgb(200, 200, 200);
            this.RegularFont = new Font("Microsoft Sans Serif", 10, FontStyle.Regular);
            this.BigFont = new Font("Microsoft Sans Serif", 10, FontStyle.Bold);
            this.UseVisualStyleBackColor = false;
            this.Cursor = Cursors.Hand;
            this.BackColor = Color.White;

            this.Click += (sender, args) => new UpcomingTournamentView(this.MasterclassTitle).ShowDialog();
        }

        /// <summary>
        /// Override default paint to custom button with custom text
        /// </summary>
        /// <param name="paintEventArgs">Paint Event Arguments</param>
        protected override void OnPaint(PaintEventArgs paintEventArgs)
        {
            base.OnPaint(paintEventArgs);
            Rectangle rect = this.ClientRectangle;
            rect.Inflate(-5, -5);
            using (StringFormat sf = new StringFormat()
            {
                Alignment = StringAlignment.Near,
                LineAlignment = StringAlignment.Far
            })
            {
                using (Brush brush = new SolidBrush(this.ForeColor))
                {
                    sf.LineAlignment = StringAlignment.Near;
                    paintEventArgs.Graphics.DrawString(this.MasterclassTitle, this.BigFont, brush, rect, sf);
                    sf.LineAlignment = StringAlignment.Center;
                    paintEventArgs.Graphics.DrawString("door " + this.MasterclassTutor, this.RegularFont, brush, rect, sf);
                    sf.LineAlignment = StringAlignment.Far;
                    paintEventArgs.Graphics.DrawString(this.MasterclassDate, this.RegularFont, brush, rect, sf);
                    sf.Alignment = StringAlignment.Far;
                    paintEventArgs.Graphics.DrawString(this.MasterclassPlayerCount + "/" + this.MasterclassMaxPlayerCount + " deelnemers", this.RegularFont, brush, rect, sf);
                }
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.09163093536604733, 'fraction_numerical': 0.006987454343338097, 'mean_word_length': 1.6743099787685776, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 23, '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': '6800871', 'n_tokens_mistral': 1669, 'n_tokens_neox': 1505, 'n_words': 356}