本文整理汇总了C#中System.Windows.Forms.MaskInputRejectedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# MaskInputRejectedEventArgs类的具体用法?C# MaskInputRejectedEventArgs怎么用?C# MaskInputRejectedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MaskInputRejectedEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了MaskInputRejectedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: maskedTextBox1_MaskInputRejected
private void maskedTextBox1_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
{
double val =0;
double.TryParse(maskedTextBox1.Text, out val);
if(val <=4)
student.GPA = val;
}
示例2: maskedTextBox1_MaskInputRejected
private void maskedTextBox1_MaskInputRejected(object sender,
MaskInputRejectedEventArgs e)
{
Control control = (Control)sender;
// Show an error notification.
toolTip1.Show("That character is not allowed in this text box.",
control, new Point(control.Height, control.Height + 1));
}
示例3: GetMaskInputRejectedErrorMessage
internal static string GetMaskInputRejectedErrorMessage(MaskInputRejectedEventArgs e)
{
string str;
switch (e.RejectionHint)
{
case MaskedTextResultHint.PositionOutOfRange:
str = System.Design.SR.GetString("MaskedTextBoxHintPositionOutOfRange");
break;
case MaskedTextResultHint.NonEditPosition:
str = System.Design.SR.GetString("MaskedTextBoxHintNonEditPosition");
break;
case MaskedTextResultHint.UnavailableEditPosition:
str = System.Design.SR.GetString("MaskedTextBoxHintUnavailableEditPosition");
break;
case MaskedTextResultHint.PromptCharNotAllowed:
str = System.Design.SR.GetString("MaskedTextBoxHintPromptCharNotAllowed");
break;
case MaskedTextResultHint.SignedDigitExpected:
str = System.Design.SR.GetString("MaskedTextBoxHintSignedDigitExpected");
break;
case MaskedTextResultHint.LetterExpected:
str = System.Design.SR.GetString("MaskedTextBoxHintLetterExpected");
break;
case MaskedTextResultHint.DigitExpected:
str = System.Design.SR.GetString("MaskedTextBoxHintDigitExpected");
break;
case MaskedTextResultHint.AlphanumericCharacterExpected:
str = System.Design.SR.GetString("MaskedTextBoxHintAlphanumericCharacterExpected");
break;
case MaskedTextResultHint.AsciiCharacterExpected:
str = System.Design.SR.GetString("MaskedTextBoxHintAsciiCharacterExpected");
break;
default:
str = System.Design.SR.GetString("MaskedTextBoxHintInvalidInput");
break;
}
return string.Format(CultureInfo.CurrentCulture, System.Design.SR.GetString("MaskedTextBoxTextEditorErrorFormatString"), new object[] { e.Position, str });
}
示例4: maskedTextBox1_MaskInputRejected
void maskedTextBox1_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
{
if (maskedTextBox1.MaskFull)
{
toolTip1.ToolTipTitle = "Input Rejected - Too Much Data";
toolTip1.Show("You cannot enter any more data into the date field. Delete some characters in order to insert more data.", maskedTextBox1, 0, -20, 5000);
}
else if (e.Position == maskedTextBox1.Mask.Length)
{
toolTip1.ToolTipTitle = "Input Rejected - End of Field";
toolTip1.Show("You cannot add extra characters to the end of this date field.", maskedTextBox1, 0, -20, 5000);
}
else
{
toolTip1.ToolTipTitle = "Input Rejected";
toolTip1.Show("You can only add numeric characters (0-9) into this date field.", maskedTextBox1, 0, -20, 5000);
}
}
示例5: txtStartTime_MaskInputRejected
private void txtStartTime_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
{
if (txtStartTime.MaskFull)
{
toolTip.ToolTipTitle = "Invalid Time";
toolTip.Show("You cannot enter any more data into the time field.", txtStartTime, 0, -20, 5000);
} else if (e.Position == txtStartTime.Mask.Length)
{
toolTip.ToolTipTitle = "Invalid Time";
toolTip.Show("You cannot add extra number to the end of this time.", txtStartTime, 0, -20, 5000);
} else
{
toolTip.ToolTipTitle = "Invalid Time";
toolTip.Show("You can only add numeric characters (0-9) into this time field.", txtStartTime, 0, -20, 5000);
}
btnOk.Enabled = false;
}
示例6: ser_op_MaskInputRejected
private void ser_op_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
{
}
示例7: OnMaskInputRejected
/// <summary>
/// Raises the MaskInputRejected event.
/// </summary>
/// <param name="e">An MaskInputRejectedEventArgs that contains the event data.</param>
protected virtual void OnMaskInputRejected(MaskInputRejectedEventArgs e)
{
if (MaskInputRejected != null)
MaskInputRejected(this, e);
}
示例8: textCantHuespedes_MaskInputRejected
private void textCantHuespedes_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
{
showToolTip("Ingrese solamente números.", textCantHuespedes, textCantHuespedes.Location);
}
示例9: txtPassword_MaskInputRejected
private void txtPassword_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
{
}
示例10: maskedTextBox_MaskInputRejected
private void maskedTextBox_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
{
this.errorProvider.SetError(this.cloneMtb, MaskedTextBoxDesigner.GetMaskInputRejectedErrorMessage(e));
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:4,代码来源:MaskedTextBoxTextEditorDropDown.cs
示例11: UserName_MaskInputRejected
private void UserName_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
{
}
示例12: masktxtbTel_MaskInputRejected
private void masktxtbTel_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
{
}
示例13: maskedTextBox2_MaskInputRejected
private void maskedTextBox2_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
{
toolTip2.ToolTipTitle = "Invalid Input";
toolTip2.Show("Invalid Sensitivity", maskedTextBox2, maskedTextBox2.Location, 5000);
}
示例14: maskedTextBox1_MaskInputRejected
//shows a tooltip if the users ID contains invalid characters or is too long
private void maskedTextBox1_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
{
toolTip1.ToolTipTitle = "Invalid Input";
toolTip1.Show("Invalid UserID", maskedTextBox1, maskedTextBox1.Location, 5000);
}
示例15: textEstadia_MaskInputRejected
private void textEstadia_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
{
showToolTip("Ingrese solamente números.", textEstadia, textEstadia.Location);
}