<commit_before>﻿namespace T3000Controls
{
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    public partial class BackgroundControl : UserControl
    {
        #region DesignerProperties

        [Description("Color for lines"), Category("Appearance")]
        public Color LinesColor { get; set; } = Color.DarkGray;

        [Description("Color for borders"), Category("Appearance")]
        public Color BorderColor { get; set; } = Color.Black;

        [Description("Color for cooling"), Category("Appearance")]
        public Color TopZoneColor { get; set; } = Color.DeepSkyBlue;

        [Description("Color for heating"), Category("Appearance")]
        public Color BottomZoneColor { get; set; } = Color.Red;

        [Description("Top zone"), Category("Data")]
        public bool TopZone { get; set; } = true;

        [Description("Bottom zone"), Category("Data")]
        public bool BottomZone { get; set; } = true;

        [Description("Current value Y"), Category("Data")]
        public float CurrentValueY { get; set; } = 50;

        [Description("Top zone value Y"), Category("Data")]
        public float TopZoneValueY { get; set; } = 66;

        [Description("Bottom zone value Y"), Category("Data")]
        public float BottomZoneValueY { get; set; } = 33;

        [Description("Step height"), Category("Data")]
        public float StepHeight { get; set; } = 10;

        [Description("Small offset Y"), Category("Data")]
        public float SmallOffsetY { get; set; } = 5;

        [Description("Big offset Y"), Category("Data")]
        public float BigOffsetY { get; set; } = 10;

        #endregion

        public BackgroundControl()
        {
            InitializeComponent();

            ResizeRedraw = true;
        }

        protected override void OnPaint(PaintEventArgs args)
        {
            args.Graphics.Clear(BackColor);

            var x1 = 0;
            var x2 = Width - 1;
            if (TopZone)
            {
                using (var brush = new SolidBrush(TopZoneColor))
                {
                    var rect = new RectangleF(x1, 0, x2, TopZoneValueY);
                    args.Graphics.FillRectangle(brush, rect);
                }
            }
            if (BottomZone)
            {
                using (var brush = new SolidBrush(BottomZoneColor))
                {
                    var rect = RectangleF.FromLTRB(x1, BottomZoneValueY, x2, Height - 1);
                    args.Graphics.FillRectangle(brush, rect);
                }
            }

            using (var pen = new Pen(LinesColor))
            {
                for (var height = SmallOffsetY; height < Height; height += StepHeight)
                {
                    args.Graphics.DrawLine(pen, 0.2F * x2, height, 0.8F * x2, height);
                }
            }

            using (var pen = new Pen(LinesColor, 2))
            {
                for (var height = BigOffsetY; height < Height; height += StepHeight)
                {
                    args.Graphics.DrawLine(pen, 0.1F * x2, height, 0.9F * x2, height);
                }
            }

            using (var pen = new Pen(BorderColor))
            {
                args.Graphics.DrawLine(pen, 0, CurrentValueY, Width - 1, CurrentValueY);
                args.Graphics.DrawRectangle(pen, x1, 0, x2, Height - 1);
            }
        }
    }
}<commit_msg>Renamed variables<commit_after>﻿namespace T3000Controls
{
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    public partial class BackgroundControl : UserControl
    {
        #region DesignerProperties

        [Description("Color for lines"), Category("Appearance")]
        public Color LinesColor { get; set; } = Color.DarkGray;

        [Description("Color for borders"), Category("Appearance")]
        public Color BorderColor { get; set; } = Color.Black;

        [Description("Color for cooling"), Category("Appearance")]
        public Color TopZoneColor { get; set; } = Color.DeepSkyBlue;

        [Description("Color for heating"), Category("Appearance")]
        public Color BottomZoneColor { get; set; } = Color.Red;

        [Description("Top zone"), Category("Data")]
        public bool TopZone { get; set; } = true;

        [Description("Bottom zone"), Category("Data")]
        public bool BottomZone { get; set; } = true;

        [Description("Current value Y"), Category("Data")]
        public float CurrentValueY { get; set; } = 50;

        [Description("Top zone value Y"), Category("Data")]
        public float TopZoneValueY { get; set; } = 66;

        [Description("Bottom zone value Y"), Category("Data")]
        public float BottomZoneValueY { get; set; } = 33;

        [Description("Step height"), Category("Data")]
        public float StepHeight { get; set; } = 10;

        [Description("Small offset Y"), Category("Data")]
        public float SmallOffsetY { get; set; } = 5;

        [Description("Big offset Y"), Category("Data")]
        public float BigOffsetY { get; set; } = 10;

        #endregion

        public BackgroundControl()
        {
            InitializeComponent();

            ResizeRedraw = true;
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);

            var graphics = e.Graphics;

            graphics.Clear(BackColor);

            var x1 = 0;
            var x2 = Width - 1;
            if (TopZone)
            {
                using (var brush = new SolidBrush(TopZoneColor))
                {
                    var rect = new RectangleF(x1, 0, x2, TopZoneValueY);
                    graphics.FillRectangle(brush, rect);
                }
            }
            if (BottomZone)
            {
                using (var brush = new SolidBrush(BottomZoneColor))
                {
                    var rect = RectangleF.FromLTRB(x1, BottomZoneValueY, x2, Height - 1);
                    graphics.FillRectangle(brush, rect);
                }
            }

            using (var pen = new Pen(LinesColor))
            {
                for (var height = SmallOffsetY; height < Height; height += StepHeight)
                {
                    graphics.DrawLine(pen, 0.2F * x2, height, 0.8F * x2, height);
                }
            }

            using (var pen = new Pen(LinesColor, 2))
            {
                for (var height = BigOffsetY; height < Height; height += StepHeight)
                {
                    graphics.DrawLine(pen, 0.1F * x2, height, 0.9F * x2, height);
                }
            }

            using (var pen = new Pen(BorderColor))
            {
                graphics.DrawLine(pen, 0, CurrentValueY, Width - 1, CurrentValueY);
                graphics.DrawRectangle(pen, x1, 0, x2, Height - 1);
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.11243463102847182, 'fraction_numerical': 0.012783265543288786, 'mean_word_length': 1.7343129467831613, 'pattern_counts': {'":': 0, '<': 7, '<?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': '928940', 'n_tokens_mistral': 1916, 'n_tokens_neox': 1749, 'n_words': 491}