private void ErrorSplash(TextBox text, string message)
 {
     text.Focus();
     ErrorToolTip.Hide(text);
     ErrorToolTip.Show("", text);
     ErrorToolTip.Show(message, text);
 }
Exemplo n.º 2
0
        private void SigMaskTextBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (char.IsControl(e.KeyChar) || Regex.IsMatch(e.KeyChar.ToString(), @"[x?]"))
            {
                return;
            }

            ErrorToolTip.Show("Only 'x' and '?' are allowed", SigMaskTextBox, 1000);

            e.Handled = true;
        }
Exemplo n.º 3
0
        private void SigMaskTextBox_TextChanged(object sender, EventArgs e)
        {
            if (!(sender is TextBox textBox))
            {
                return;
            }
            if (textBox.Text.Equals(@"[xx??xx]"))
            {
                return;
            }
            if (Regex.Matches(textBox.Text, @"[x?]").Count == textBox.Text.Length)
            {
                return;
            }

            textBox.Clear();

            ErrorToolTip.Show("Only 'x' and '?' are allowed", textBox, 1000);
        }
 private void PanelTBox_TextChanged(object sender, EventArgs e)
 {
     ErrorToolTip.Hide(this);
 }