<commit_before>﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Xml;
using FastColoredTextBoxNS;
using motoi.platform.ui.bindings;
using motoi.platform.ui.widgets;
using Xcite.Collections;

namespace motoi.ui.windowsforms.controls {
    /// <summary>
    /// Provides an implementation of <see cref="IRichTextBox"/> by extending the <see cref="FastColoredTextBox"/>.
    /// </summary>
    public class RichTextBox : FastColoredTextBox, IRichTextBox {
        private WavyLineStyle iErrorLineStyle;
        private WavyLineStyle iWarningLineStyle;
        private WavyLineStyle iInfoLineStyle;
        private Bitmap iErrorBitmap;
        private Bitmap iWarningBitmap;
        private Bitmap iInfoBitmap;

        private readonly Dictionary<int, IRichTextSyntaxHint> iSyntaxHints = new Dictionary<int, IRichTextSyntaxHint>(5);

        /// <summary>
        /// Creates a new instance.
        /// </summary>
        public RichTextBox() {
            InitializeComponent();
        }

        /// <summary>
        /// Performs an initialization of the used components.
        /// </summary>
        private void InitializeComponent() {
            Language = Language.Custom;
            Font = new Font("Consolas", 9.5f, FontStyle.Regular); //new Font(FontFamily.GenericMonospace, 9.5f, FontStyle.Regular);
            LeftPadding = 15;
        }

        /// <summary>
        /// Returns the text content of the text box or does set it.
        /// </summary>
        string ITextBox.Text {
            get { return PRichTextBox.GetModelValue<string>(this, PRichTextBox.TextProperty); }
            set {
                PRichTextBox.SetModelValue(this, PRichTextBox.TextProperty, value);
                Text = value;
            }
        }

        /// <summary>
        /// Returns the curent cursor index of the text box or does set it.<commit_msg>Added current line color for RichTextBox<commit_after>﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Xml;
using FastColoredTextBoxNS;
using motoi.platform.ui.bindings;
using motoi.platform.ui.widgets;
using Xcite.Collections;

namespace motoi.ui.windowsforms.controls {
    /// <summary>
    /// Provides an implementation of <see cref="IRichTextBox"/> by extending the <see cref="FastColoredTextBox"/>.
    /// </summary>
    public class RichTextBox : FastColoredTextBox, IRichTextBox {
        private WavyLineStyle iErrorLineStyle;
        private WavyLineStyle iWarningLineStyle;
        private WavyLineStyle iInfoLineStyle;
        private Bitmap iErrorBitmap;
        private Bitmap iWarningBitmap;
        private Bitmap iInfoBitmap;

        private readonly Dictionary<int, IRichTextSyntaxHint> iSyntaxHints = new Dictionary<int, IRichTextSyntaxHint>(5);

        /// <summary>
        /// Creates a new instance.
        /// </summary>
        public RichTextBox() {
            InitializeComponent();
        }

        /// <summary>
        /// Performs an initialization of the used components.
        /// </summary>
        private void InitializeComponent() {
            Language = Language.Custom;
            Font = new Font("Consolas", 9.5f, FontStyle.Regular); //new Font(FontFamily.GenericMonospace, 9.5f, FontStyle.Regular);
            LeftPadding = 15;
            CurrentLineColor = Color.Gold;
        }

        /// <summary>
        /// Returns the text content of the text box or does set it.
        /// </summary>
        string ITextBox.Text {
            get { return PRichTextBox.GetModelValue<string>(this, PRichTextBox.TextProperty); }
            set {
                PRichTextBox.SetModelValue(this, PRichTextBox.TextProperty, value);
                Text = value;
            }
        }

        /// <summary>
        /// Returns the curent cursor index of the text box or does set it.
{'fraction_non_alphanumeric': 0.09764056224899599, 'fraction_numerical': 0.0035140562248995983, 'mean_word_length': 2.3375209380234505, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, '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': '7657762', 'n_tokens_mistral': 1054, 'n_tokens_neox': 1015, 'n_words': 290}