本文整理汇总了C#中EventWatcher.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# EventWatcher.ToString方法的具体用法?C# EventWatcher.ToString怎么用?C# EventWatcher.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EventWatcher
的用法示例。
在下文中一共展示了EventWatcher.ToString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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");
}
示例2: 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");
}
示例3: 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");
}
示例4: 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");
}
示例5: 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");
}
示例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");
}
示例7: 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");
}
示例8: PropertyCanOverflow
public void PropertyCanOverflow ()
{
ToolStrip ts = new ToolStrip ();
EventWatcher ew = new EventWatcher (ts);
ts.CanOverflow = false;
Assert.AreEqual (false, ts.CanOverflow, "B1");
Assert.AreEqual (string.Empty, ew.ToString (), "B2");
}
示例9: PropertyRenderMode
public void PropertyRenderMode ()
{
ToolStripContentPanel tsp = new ToolStripContentPanel ();
EventWatcher ew = new EventWatcher (tsp);
tsp.RenderMode = ToolStripRenderMode.ManagerRenderMode;
Assert.AreEqual (ToolStripRenderMode.ManagerRenderMode, tsp.RenderMode, "B1");
// I refuse to call the event twice like .Net does.
//Assert.AreEqual ("RendererChanged;RendererChanged", ew.ToString (), "B2");
ew.Clear ();
tsp.RenderMode = ToolStripRenderMode.ManagerRenderMode;
Assert.AreEqual (string.Empty, ew.ToString (), "B3");
}
示例10: PropertyShowItemToolTips
public void PropertyShowItemToolTips ()
{
ToolStrip ts = new ToolStrip ();
EventWatcher ew = new EventWatcher (ts);
ts.ShowItemToolTips = false;
Assert.AreEqual (false, ts.ShowItemToolTips, "B1");
Assert.AreEqual (string.Empty, ew.ToString (), "B2");
}
示例11: 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");
}
示例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");
}
示例13: PropertyDefaultDropDownDirection
public void PropertyDefaultDropDownDirection ()
{
ToolStrip ts = new ToolStrip ();
EventWatcher ew = new EventWatcher (ts);
ts.DefaultDropDownDirection = ToolStripDropDownDirection.AboveLeft;
Assert.AreEqual (ToolStripDropDownDirection.AboveLeft, ts.DefaultDropDownDirection, "B1");
Assert.AreEqual (string.Empty, ew.ToString (), "B2");
}
示例14: 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");
}
示例15: PropertyCheckState
public void PropertyCheckState ()
{
ToolStripButton tsi = new ToolStripButton ();
EventWatcher ew = new EventWatcher (tsi);
tsi.CheckState = CheckState.Checked;
Assert.AreEqual (CheckState.Checked, tsi.CheckState, "B1");
Assert.AreEqual ("CheckedChanged;CheckStateChanged", ew.ToString (), "B2");
ew.Clear ();
tsi.CheckState = CheckState.Checked;
Assert.AreEqual (string.Empty, ew.ToString (), "B3");
}