Esempio n. 1
0
        private void TextBox1_TextChanged(object sender, EventArgs e)
        {
            if (_ignoreTextChange)
            {
                return;
            }

            if (textBox1.Text.Length < 1)
            {
                return;
            }

            _ignoreTextChange = true; // Toggles this event off to edit the value of the TextBox.

            var originalKeywords = textBox1.Text.Split('\n');

            textBox1.Text = Filtering.JoinStrings(Filtering.FilterUniques(originalKeywords));

            _ignoreTextChange = false; // Toggles the TextChanged event back on since the text has been properly modified.
        }