本文整理汇总了C#中System.Windows.Forms.ToolStrip.GetNextItem方法的典型用法代码示例。如果您正苦于以下问题:C# ToolStrip.GetNextItem方法的具体用法?C# ToolStrip.GetNextItem怎么用?C# ToolStrip.GetNextItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.ToolStrip
的用法示例。
在下文中一共展示了ToolStrip.GetNextItem方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MethodGetNextItemIEAE
public void MethodGetNextItemIEAE ()
{
ToolStrip ts = new ToolStrip ();
ts.GetNextItem (null, (ArrowDirection)42);
}
示例2: GetNextItem
private ToolStripItem GetNextItem(ToolStrip parent, ToolStripItem startItem, ArrowDirection direction)
{
if ((parent.RightToLeft == RightToLeft.Yes) && ((direction == ArrowDirection.Left) || (direction == ArrowDirection.Right)))
{
if (direction == ArrowDirection.Right)
{
direction = ArrowDirection.Left;
}
else if (direction == ArrowDirection.Left)
{
direction = ArrowDirection.Right;
}
}
return parent.GetNextItem(startItem, direction);
}
示例3: MethodGetNextItem
public void MethodGetNextItem ()
{
ToolStrip ts = new ToolStrip ();
ts.Items.Add ("Test Item 1");
Form f = new Form ();
f.ShowInTaskbar = false;
f.Controls.Add (ts);
f.Show ();
Assert.AreEqual (ts.Items[0], ts.GetNextItem (null, ArrowDirection.Right), "A1");
Assert.AreEqual (ts.Items[0], ts.GetNextItem (ts.Items[0], ArrowDirection.Right), "A2");
ts.Items.Add ("Test Item 2");
Assert.AreEqual (ts.Items[0], ts.GetNextItem (null, ArrowDirection.Right), "A3");
Assert.AreEqual (ts.Items[1], ts.GetNextItem (ts.Items[0], ArrowDirection.Right), "A4");
f.Dispose ();
}