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


C# EventWatcher.Clear方法代码示例

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


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

示例1: PropertyBackColor

		public void PropertyBackColor ()
		{
			Control c = new Control ();
			EventWatcher ew = new EventWatcher (c);

			c.BackColor = Color.Aquamarine;
			Assert.AreEqual (Color.Aquamarine, c.BackColor, "B1");
			Assert.AreEqual ("BackColorChanged", ew.ToString (), "B2");

			ew.Clear ();
			c.BackColor = Color.Aquamarine;
			Assert.AreEqual (string.Empty, ew.ToString (), "B3");
		}
开发者ID:nlhepler,项目名称:mono,代码行数:13,代码来源:ControlPropertyEventsTest.cs

示例2: PropertyMarqueeAnimationSpeed

		public void PropertyMarqueeAnimationSpeed ()
		{
			ToolStripProgressBar tsi = new ToolStripProgressBar ();
			EventWatcher ew = new EventWatcher (tsi);

			tsi.MarqueeAnimationSpeed = 200;
			Assert.AreEqual (200, tsi.MarqueeAnimationSpeed, "B1");
			Assert.AreEqual (string.Empty, ew.ToString (), "B2");

			ew.Clear ();
			tsi.MarqueeAnimationSpeed = 200;
			Assert.AreEqual (string.Empty, ew.ToString (), "B3");
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:13,代码来源:ToolStripProgressBarTest.cs

示例3: PropertyAutoSize

		public void PropertyAutoSize ()
		{
			Control c = new Control ();
			EventWatcher ew = new EventWatcher (c);

			c.AutoSize = true;
			Assert.AreEqual (true, c.AutoSize, "B1");
			Assert.AreEqual ("AutoSizeChanged", ew.ToString (), "B2");

			ew.Clear ();
			c.AutoSize = true;
			Assert.AreEqual (string.Empty, ew.ToString (), "B3");
		}
开发者ID:nlhepler,项目名称:mono,代码行数:13,代码来源:ControlPropertyEventsTest.cs

示例4: PropertyAutoSize

		public void PropertyAutoSize ()
		{
			ToolStripPanel tsp = new ToolStripPanel ();
			EventWatcher ew = new EventWatcher (tsp);

			tsp.AutoSize = false;
			Assert.AreEqual (false, tsp.AutoSize, "B1");
			Assert.AreEqual ("AutoSizeChanged", ew.ToString (), "B2");

			ew.Clear ();
			tsp.AutoSize = false;
			Assert.AreEqual (string.Empty, ew.ToString (), "B3");
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:13,代码来源:ToolStripPanelTest.cs

示例5: PropertyAllowDrop

		public void PropertyAllowDrop ()
		{
			Control c = new Control ();
			EventWatcher ew = new EventWatcher (c);

			c.AllowDrop = true;
			Assert.AreEqual (true, c.AllowDrop, "B1");
			Assert.AreEqual (string.Empty, ew.ToString (), "B2");

			ew.Clear ();
			c.AllowDrop = true;
			Assert.AreEqual (string.Empty, ew.ToString (), "B3");
		}
开发者ID:nlhepler,项目名称:mono,代码行数:13,代码来源:ControlPropertyEventsTest.cs

示例6: PropertyAnchor

		public void PropertyAnchor ()
		{
			Control c = new Control ();
			EventWatcher ew = new EventWatcher (c);

			c.Anchor = AnchorStyles.Bottom;
			Assert.AreEqual (AnchorStyles.Bottom, c.Anchor, "B1");
			Assert.AreEqual (string.Empty, ew.ToString (), "B2");

			ew.Clear ();
			c.Anchor = AnchorStyles.Bottom;
			Assert.AreEqual (string.Empty, ew.ToString (), "B3");
		}
开发者ID:nlhepler,项目名称:mono,代码行数:13,代码来源:ControlPropertyEventsTest.cs

示例7: PropertyBackColor

		public void PropertyBackColor ()
		{
			ToolStripContentPanel tsp = new ToolStripContentPanel ();
			EventWatcher ew = new EventWatcher (tsp);

			tsp.BackColor = Color.Green;
			Assert.AreEqual (Color.Green, tsp.BackColor, "B1");
			Assert.AreEqual (string.Empty, ew.ToString (), "B2");

			ew.Clear ();
			tsp.BackColor = Color.Green;
			Assert.AreEqual (string.Empty, ew.ToString (), "B3");
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:13,代码来源:ToolStripContentPanelTest.cs

示例8: PropertyRenderer

		public void PropertyRenderer ()
		{
			ToolStripContentPanel tsp = new ToolStripContentPanel ();
			EventWatcher ew = new EventWatcher (tsp);

			ToolStripProfessionalRenderer pr = new ToolStripProfessionalRenderer ();

			tsp.Renderer = pr;
			Assert.AreSame (pr, tsp.Renderer, "B1");
			Assert.AreEqual (ToolStripRenderMode.Custom, tsp.RenderMode, "B1-2");
			// I refuse to call the event twice like .Net does.
			//Assert.AreEqual ("RendererChanged;RendererChanged", ew.ToString (), "B2");

			ew.Clear ();
			tsp.Renderer = pr;
			//Assert.AreEqual (string.Empty, ew.ToString (), "B3");
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:17,代码来源:ToolStripContentPanelTest.cs

示例9: PropertyRenderMode

		public void PropertyRenderMode ()
		{
			ToolStrip ts = new ToolStrip ();
			EventWatcher ew = new EventWatcher (ts);

			ts.RenderMode = ToolStripRenderMode.System;
			Assert.AreEqual (ToolStripRenderMode.System, ts.RenderMode, "B1");
			Assert.AreEqual ("LayoutCompleted;RendererChanged", ew.ToString (), "B2");

			ew.Clear ();
			ts.RenderMode = ToolStripRenderMode.System;
			Assert.AreEqual ("LayoutCompleted;RendererChanged", ew.ToString (), "B3");
		}
开发者ID:nlhepler,项目名称:mono,代码行数:13,代码来源:ToolStripTest.cs

示例10: PropertyRenderer

		public void PropertyRenderer ()
		{
			ToolStrip ts = new ToolStrip ();
			EventWatcher ew = new EventWatcher (ts);

			ToolStripProfessionalRenderer pr = new ToolStripProfessionalRenderer ();

			ts.Renderer = pr;
			Assert.AreSame (pr, ts.Renderer, "B1");
			Assert.AreEqual ("LayoutCompleted;RendererChanged", ew.ToString (), "B2");
			Assert.AreEqual (ToolStripRenderMode.Custom, ts.RenderMode, "B4");
			
			ew.Clear ();
			ts.Renderer = pr;
			Assert.AreEqual (string.Empty, ew.ToString (), "B3");
		}
开发者ID:nlhepler,项目名称:mono,代码行数:16,代码来源:ToolStripTest.cs

示例11: PropertySite

		public void PropertySite ()
		{
			ToolStripControlHost tsi = new ToolStripControlHost (new Control ());
			EventWatcher ew = new EventWatcher (tsi);

			ISite i = new Form ().Site;
			tsi.Site = i;
			Assert.AreSame (i, tsi.Site, "B1");
			Assert.AreEqual (string.Empty, ew.ToString (), "B2");

			ew.Clear ();
			tsi.Site = i;
			Assert.AreSame (string.Empty, ew.ToString (), "B3");
		}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:14,代码来源:ToolStripControlHostTest.cs

示例12: PropertyRowMargin

		public void PropertyRowMargin ()
		{
			ToolStripPanel tsp = new ToolStripPanel ();
			EventWatcher ew = new EventWatcher (tsp);

			tsp.RowMargin = new Padding (4);
			Assert.AreEqual (new Padding (4), tsp.RowMargin, "B1");
			Assert.AreEqual (string.Empty, ew.ToString (), "B2");

			ew.Clear ();
			tsp.RowMargin = new Padding (4);
			Assert.AreEqual (string.Empty, ew.ToString (), "B3");
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:13,代码来源:ToolStripPanelTest.cs

示例13: PropertyOrientation

		public void PropertyOrientation ()
		{
			ToolStripPanel tsp = new ToolStripPanel ();
			EventWatcher ew = new EventWatcher (tsp);

			tsp.Orientation = Orientation.Vertical;
			Assert.AreEqual (Orientation.Vertical, tsp.Orientation, "B1");
			Assert.AreEqual (string.Empty, ew.ToString (), "B2");

			ew.Clear ();
			tsp.Orientation = Orientation.Vertical;
			Assert.AreEqual (string.Empty, ew.ToString (), "B3");
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:13,代码来源:ToolStripPanelTest.cs

示例14: PropertyCheckOnClick

		public void PropertyCheckOnClick ()
		{
			ToolStripButton tsi = new ToolStripButton ();
			EventWatcher ew = new EventWatcher (tsi);

			tsi.CheckOnClick = true;
			Assert.AreEqual (true, tsi.CheckOnClick, "B1");
			Assert.AreEqual (string.Empty, ew.ToString (), "B2");

			ew.Clear ();
			tsi.CheckOnClick = true;
			Assert.AreEqual (string.Empty, ew.ToString (), "B3");
		}
开发者ID:nlhepler,项目名称:mono,代码行数:13,代码来源:ToolStripButtonTest.cs

示例15: PropertyFont

		public void PropertyFont ()
		{
			ToolStrip ts = new ToolStrip ();
			EventWatcher ew = new EventWatcher (ts);

			Font f = new Font ("Arial", 12);
			
			ts.Font = f;
			Assert.AreSame (f, ts.Font, "B1");
			Assert.AreEqual ("LayoutCompleted", ew.ToString (), "B2");

			ew.Clear ();
			ts.Font = f;
			Assert.AreEqual (string.Empty, ew.ToString (), "B3");
		}
开发者ID:nlhepler,项目名称:mono,代码行数:15,代码来源:ToolStripTest.cs


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