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


C# EventWatcher类代码示例

本文整理汇总了C#中EventWatcher的典型用法代码示例。如果您正苦于以下问题:C# EventWatcher类的具体用法?C# EventWatcher怎么用?C# EventWatcher使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


EventWatcher类属于命名空间,在下文中一共展示了EventWatcher类的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: PropertyDock

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

			tsp.Dock = DockStyle.Left;
			Assert.AreEqual (DockStyle.Left, tsp.Dock, "B1");
			Assert.AreEqual (string.Empty, ew.ToString (), "B2");

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

示例7: 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

示例8: 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

示例9: 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

示例10: PropertyAutoToolTip

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

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

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

示例11: PropertyTextDirectionIEAE

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

			ts.TextDirection = (ToolStripTextDirection)42;
		}
开发者ID:nlhepler,项目名称:mono,代码行数:7,代码来源:ToolStripTest.cs

示例12: PropertyDefaultDropDownDirectionIEAE

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

			ts.DefaultDropDownDirection = (ToolStripDropDownDirection)42;
		}
开发者ID:nlhepler,项目名称:mono,代码行数:7,代码来源:ToolStripTest.cs

示例13: PropertyTabStop

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

			ts.TabStop = true;
			Assert.AreEqual (true, ts.TabStop, "B1");
			Assert.AreEqual (string.Empty, ew.ToString (), "B2");
		}
开发者ID:nlhepler,项目名称:mono,代码行数:9,代码来源:ToolStripTest.cs

示例14: 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

示例15: PropertyForeColor

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

			ts.ForeColor = Color.BurlyWood;
			Assert.AreEqual (Color.BurlyWood, ts.ForeColor, "B1");
			Assert.AreEqual ("ForeColorChanged", ew.ToString (), "B2");

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


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