• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# EventWatcher类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



EventWatcher类属于命名空间,在下文中一共展示了EventWatcher类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: PropertyImageScalingSize

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

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


示例17: PropertyLayoutStyle

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

			ts.LayoutStyle = ToolStripLayoutStyle.VerticalStackWithOverflow;
			Assert.AreEqual (ToolStripLayoutStyle.VerticalStackWithOverflow, ts.LayoutStyle, "B1");
			Assert.AreEqual ("LayoutCompleted;LayoutStyleChanged", ew.ToString (), "B2");

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


示例18: PropertyImageList

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

			ImageList il = new ImageList ();

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


示例19: PropertyGripStyle

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

			ts.GripStyle = ToolStripGripStyle.Hidden;
			Assert.AreEqual (ToolStripGripStyle.Hidden, ts.GripStyle, "B1");
			Assert.AreEqual ("LayoutCompleted", ew.ToString (), "B2");

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


示例20: PropertyGripMargin

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

			ts.GripMargin = new Padding (6);
			Assert.AreEqual (new Padding (6), ts.GripMargin, "B1");
			Assert.AreEqual ("LayoutCompleted", ew.ToString (), "B2");

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Events类代码示例发布时间:2022-05-24
下一篇:
C# EventTypes类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap