当前位置: 首页>>代码示例>>C#>>正文


C# MaskedTextBox.Dispose方法代码示例

本文整理汇总了C#中System.Windows.Forms.MaskedTextBox.Dispose方法的典型用法代码示例。如果您正苦于以下问题:C# MaskedTextBox.Dispose方法的具体用法?C# MaskedTextBox.Dispose怎么用?C# MaskedTextBox.Dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.MaskedTextBox的用法示例。


在下文中一共展示了MaskedTextBox.Dispose方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WordWrapTest

		public void WordWrapTest ()
		{

			MaskedTextBox mtb;

			mtb = new MaskedTextBox ();
			Assert.AreEqual (false, mtb.WordWrap, "#W1");
			mtb.WordWrap = true;
			Assert.AreEqual (false, mtb.WordWrap, "#W2");
			
			mtb.Dispose ();
		}
开发者ID:Profit0004,项目名称:mono,代码行数:12,代码来源:MaskedTextBoxTest.cs

示例2: InitialProperties

		public void InitialProperties ()
		{
			MaskedTextBox mtb = new MaskedTextBox ();
			Assert.AreEqual (false, mtb.AcceptsTab, "#A1");
			Assert.AreEqual (true, mtb.AllowPromptAsInput, "#A2");
			Assert.AreEqual (false, mtb.AsciiOnly, "#A3");
			Assert.AreEqual (false, mtb.BeepOnError, "#B1");
			Assert.AreEqual (false, mtb.CanUndo, "#C1");
			Assert.IsNotNull (mtb.Culture, "#C3");
			Assert.AreEqual (Thread.CurrentThread.CurrentCulture.Name, mtb.Culture.Name, "#4");
			Assert.AreEqual (MaskFormat.IncludeLiterals, mtb.CutCopyMaskFormat, "#C5");
			Assert.IsNull (mtb.FormatProvider, "#F1");
			Assert.AreEqual (false, mtb.HidePromptOnLeave, "#H1");
			Assert.AreEqual (InsertKeyMode.Default, mtb.InsertKeyMode, "#I1");
			Assert.AreEqual (false, mtb.IsOverwriteMode, "#I2");
			Assert.AreEqual (0, mtb.Lines.Length, "#L1");
			Assert.AreEqual ("", mtb.Mask, "#M1");
			Assert.AreEqual (true, mtb.MaskCompleted, "#M2");
			Assert.IsNull (mtb.MaskedTextProvider, "#M3");
			Assert.AreEqual (true, mtb.MaskFull, "#M4");
			Assert.AreEqual (Int16.MaxValue, mtb.MaxLength, "#M5");
			Assert.AreEqual (false, mtb.Multiline, "#M6");
			Assert.AreEqual ('\0', mtb.PasswordChar, "#P1");
			Assert.AreEqual ('_', mtb.PromptChar, "#P2");
			Assert.AreEqual (false, mtb.ReadOnly, "#R1");
			Assert.AreEqual (false, mtb.RejectInputOnFirstFailure, "#R2");
			Assert.AreEqual (true, mtb.ResetOnPrompt, "#R3");
			Assert.AreEqual (true, mtb.ResetOnSpace, "#R4");
			Assert.AreEqual ("", mtb.SelectedText, "#S1");
			Assert.AreEqual (true, mtb.SkipLiterals, "#S2");
			Assert.AreEqual ("", mtb.Text, "#T1");
			Assert.AreEqual (HorizontalAlignment.Left, mtb.TextAlign, "#T2");
			Assert.AreEqual (0, mtb.TextLength, "#T3");
			Assert.AreEqual (MaskFormat.IncludeLiterals, mtb.TextMaskFormat, "#T4");
			Assert.AreEqual (false, mtb.UseSystemPasswordChar, "#U1");
			Assert.IsNull (mtb.ValidatingType, "#V1");
			Assert.AreEqual (false, mtb.WordWrap, "#W1");
			
			mtb.Dispose ();
		}
开发者ID:nlhepler,项目名称:mono,代码行数:40,代码来源:MaskedTextBoxTest.cs

示例3: SelectedTextTest

		public void SelectedTextTest ()
		{

			MaskedTextBox mtb;

			mtb = new MaskedTextBox ();
			Assert.AreEqual ("", mtb.SelectedText, "#S1");
			mtb.Text = "abc";
			Assert.AreEqual ("", mtb.SelectedText, "#S2");
			mtb.SelectAll ();
			Assert.AreEqual ("abc", mtb.SelectedText, "#S3");
			mtb.Dispose ();
		}
开发者ID:nlhepler,项目名称:mono,代码行数:13,代码来源:MaskedTextBoxTest.cs

示例4: ValidatingTypeTest

		public void ValidatingTypeTest ()
		{

			MaskedTextBox mtb;

			mtb = new MaskedTextBox ();
			Assert.IsNull (mtb.ValidatingType, "#V1");
			mtb.ValidatingType = typeof(int);
			Assert.IsNotNull (mtb.ValidatingType, "#V2");
			Assert.AreSame (typeof(int), mtb.ValidatingType, "#V3");
			mtb.Dispose ();
		}
开发者ID:nlhepler,项目名称:mono,代码行数:12,代码来源:MaskedTextBoxTest.cs

示例5: AcceptsTabTest

		public void AcceptsTabTest ()
		{
			MaskedTextBox mtb = new MaskedTextBox ();
			Assert.AreEqual (false, mtb.AcceptsTab, "#A1");
			mtb.AcceptsTab = true;
			Assert.AreEqual (false, mtb.AcceptsTab, "#A2");
			mtb.AcceptsTab = false;
			Assert.AreEqual (false, mtb.AcceptsTab, "#A3");
			mtb.Dispose ();
		}
开发者ID:nlhepler,项目名称:mono,代码行数:10,代码来源:MaskedTextBoxTest.cs

示例6: AsciiOnlyTest

		public void AsciiOnlyTest ()
		{
			MaskedTextBox mtb = new MaskedTextBox ();
			Assert.AreEqual (false, mtb.AsciiOnly, "#A1");
			mtb.AsciiOnly = true;
			Assert.AreEqual (true, mtb.AsciiOnly, "#A2");
			mtb.AsciiOnly = false;
			Assert.AreEqual (false, mtb.AsciiOnly, "#A3");
			mtb.Dispose ();
		}
开发者ID:nlhepler,项目名称:mono,代码行数:10,代码来源:MaskedTextBoxTest.cs

示例7: CanUndoTest

		public void CanUndoTest ()
		{
			MaskedTextBox mtb = new MaskedTextBox ();
			TextBoxBase tbb = mtb;
			Assert.AreEqual (false, mtb.CanUndo, "#A1");
			Assert.AreEqual (false, tbb.CanUndo, "#A2");
			mtb.Dispose ();
		}
开发者ID:nlhepler,项目名称:mono,代码行数:8,代码来源:MaskedTextBoxTest.cs

示例8: CutCopyMaskFormatExceptionTest

		public void CutCopyMaskFormatExceptionTest ()
		{

			MaskedTextBox mtb;

			mtb = new MaskedTextBox ();
			mtb.CutCopyMaskFormat = (MaskFormat) 123;
			mtb.Dispose ();
		}
开发者ID:nlhepler,项目名称:mono,代码行数:9,代码来源:MaskedTextBoxTest.cs

示例9: FormatProviderTest

		public void FormatProviderTest ()
		{

			MaskedTextBox mtb;

			mtb = new MaskedTextBox ();
			Assert.IsNull (mtb.FormatProvider, "#F1");
			mtb.FormatProvider = CultureInfo.CurrentCulture.NumberFormat;
			Assert.IsNotNull (mtb.FormatProvider, "#F2");
			Assert.AreSame (CultureInfo.CurrentCulture.NumberFormat, mtb.FormatProvider, "#F3");
			mtb.Dispose ();
		}
开发者ID:nlhepler,项目名称:mono,代码行数:12,代码来源:MaskedTextBoxTest.cs

示例10: MultilineTest

		public void MultilineTest ()
		{

			MaskedTextBox mtb;

			mtb = new MaskedTextBox ();
			Assert.AreEqual (false, mtb.Multiline, "#M1");
			mtb.Multiline = true;
			Assert.AreEqual (false, mtb.Multiline, "#M2");
			mtb.Dispose ();
		}
开发者ID:nlhepler,项目名称:mono,代码行数:11,代码来源:MaskedTextBoxTest.cs

示例11: PasswordCharTest

		public void PasswordCharTest ()
		{

			MaskedTextBox mtb;

			mtb = new MaskedTextBox ();
			Assert.AreEqual ('\0', mtb.PasswordChar, "#P1");
			mtb.PasswordChar = '*';
			Assert.AreEqual ('*', mtb.PasswordChar, "#P2");
			mtb.Dispose ();
		}
开发者ID:nlhepler,项目名称:mono,代码行数:11,代码来源:MaskedTextBoxTest.cs

示例12: PromptCharTest

		public void PromptCharTest ()
		{

			MaskedTextBox mtb;

			mtb = new MaskedTextBox ();
			Assert.AreEqual ('_', mtb.PromptChar, "#P1");
			mtb.PromptChar = '*';
			Assert.AreEqual ('*', mtb.PromptChar, "#P2");
			mtb.Dispose ();
		}
开发者ID:nlhepler,项目名称:mono,代码行数:11,代码来源:MaskedTextBoxTest.cs

示例13: ReadOnlyTest

		public void ReadOnlyTest ()
		{

			MaskedTextBox mtb;

			mtb = new MaskedTextBox ();
			Assert.AreEqual (false, mtb.ReadOnly, "#R1");
			mtb.ReadOnly = true;
			Assert.AreEqual (true, mtb.ReadOnly, "#R2");
			mtb.Dispose ();
		}
开发者ID:nlhepler,项目名称:mono,代码行数:11,代码来源:MaskedTextBoxTest.cs

示例14: RejectInputOnFirstFailureTest

		public void RejectInputOnFirstFailureTest ()
		{

			MaskedTextBox mtb;

			mtb = new MaskedTextBox ();
			Assert.AreEqual (false, mtb.RejectInputOnFirstFailure, "#R1");
			mtb.RejectInputOnFirstFailure = true;
			Assert.AreEqual (true, mtb.RejectInputOnFirstFailure, "#R2");
			mtb.Dispose ();
		}
开发者ID:nlhepler,项目名称:mono,代码行数:11,代码来源:MaskedTextBoxTest.cs

示例15: ResetOnPromptTest

		public void ResetOnPromptTest ()
		{

			MaskedTextBox mtb;

			mtb = new MaskedTextBox ();
			Assert.AreEqual (true, mtb.ResetOnPrompt, "#R1");
			mtb.ResetOnPrompt = false;
			Assert.AreEqual (false, mtb.ResetOnPrompt, "#R2");
			mtb.Dispose ();
		}
开发者ID:nlhepler,项目名称:mono,代码行数:11,代码来源:MaskedTextBoxTest.cs


注:本文中的System.Windows.Forms.MaskedTextBox.Dispose方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。