示例#1
0
        private void KtxtHexValue_TextChanged(object sender, EventArgs e)
        {
            if (!TranslationMethods.IsHexadecimal(ktxtHexValue.Text) && !string.IsNullOrWhiteSpace(ktxtHexValue.Text))
            {
                ktxtHexValue.Clear();

                ExtendedKryptonMessageBox.Show("A invalid character has been entered, please try again.", "Invalid Content", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }

            if (ktxtHexValue.Text.Length == 3 || ktxtHexValue.Text.Length == 6)
            {
                UpdateColour(ktxtHexValue.Text);
            }
        }
示例#2
0
 /// <summary>
 /// Clears all text from the text box control.
 /// </summary>
 public void Clear()
 {
     _textBox.Clear();
 }