當前位置: 首頁>>代碼示例>>C#>>正文


C# Forms.MaskInputRejectedEventArgs類代碼示例

本文整理匯總了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;
 }
開發者ID:NilminiKiriwandala,項目名稱:3Tire,代碼行數:7,代碼來源:Student+Registration.cs

示例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));
		}
開發者ID:ehershey,項目名稱:development,代碼行數:8,代碼來源:Form2.cs

示例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 });
        }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:47,代碼來源:MaskedTextBoxDesigner.cs

示例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);
     }
 }
開發者ID:777ondro,項目名稱:sw-en,代碼行數:18,代碼來源:Form5.cs

示例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;
 }
開發者ID:Jchuchla,項目名稱:vixen,代碼行數:17,代碼來源:EffectTimeEditor.cs

示例6: ser_op_MaskInputRejected

 private void ser_op_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
 {
 }
開發者ID:njmube,項目名稱:ErpBapSoftNet_Producion,代碼行數:3,代碼來源:Frm_movimiento.cs

示例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);
 }
開發者ID:Cocotteseb,項目名稱:Krypton,代碼行數:9,代碼來源:KryptonRibbonGroupMaskedTextBox.cs

示例8: textCantHuespedes_MaskInputRejected

 private void textCantHuespedes_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
 {
     showToolTip("Ingrese solamente números.", textCantHuespedes, textCantHuespedes.Location);
 }
開發者ID:tferraro,項目名稱:FrbaHotel,代碼行數:4,代碼來源:GenerarReserva.cs

示例9: txtPassword_MaskInputRejected

 private void txtPassword_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
 {
 }
開發者ID:nagraj1981,項目名稱:Nagraj-IT-Management,代碼行數:3,代碼來源:LoginPage.cs

示例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)
        {

        }
開發者ID:carriercomm,項目名稱:BillingSystem-2,代碼行數:4,代碼來源:Form1.cs

示例12: masktxtbTel_MaskInputRejected

 private void masktxtbTel_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
 {
 }
開發者ID:leoderas,項目名稱:Bencaleth,代碼行數:3,代碼來源:IngresoAlcancia.cs

示例13: maskedTextBox2_MaskInputRejected

 private void maskedTextBox2_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
 {
     toolTip2.ToolTipTitle = "Invalid Input";
     toolTip2.Show("Invalid Sensitivity", maskedTextBox2, maskedTextBox2.Location, 5000);
 }
開發者ID:UmbleJA,項目名稱:MOSS-Interface-Project,代碼行數:5,代碼來源:Form2.cs

示例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);
 }
開發者ID:UmbleJA,項目名稱:MOSS-Interface-Project,代碼行數:6,代碼來源:Form2.cs

示例15: textEstadia_MaskInputRejected

 private void textEstadia_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
 {
     showToolTip("Ingrese solamente números.", textEstadia, textEstadia.Location);
 }
開發者ID:tferraro,項目名稱:FrbaHotel,代碼行數:4,代碼來源:RegistrarConsumibles.cs


注:本文中的System.Windows.Forms.MaskInputRejectedEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。