本文整理汇总了C#中System.Windows.Forms.ToolStripButton.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ToolStripButton.ToString方法的具体用法?C# ToolStripButton.ToString怎么用?C# ToolStripButton.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.ToolStripButton
的用法示例。
在下文中一共展示了ToolStripButton.ToString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Accessibility
public void Accessibility ()
{
ToolStripButton tsi = new ToolStripButton ();
AccessibleObject ao = tsi.AccessibilityObject;
Assert.AreEqual ("ToolStripItemAccessibleObject: Owner = " + tsi.ToString (), ao.ToString (), "L");
Assert.AreEqual (Rectangle.Empty, ao.Bounds, "L1");
Assert.AreEqual ("Press", ao.DefaultAction, "L2");
Assert.AreEqual (null, ao.Description, "L3");
Assert.AreEqual (null, ao.Help, "L4");
Assert.AreEqual (string.Empty, ao.KeyboardShortcut, "L5");
Assert.AreEqual (string.Empty, ao.Name, "L6");
Assert.AreEqual (null, ao.Parent, "L7");
Assert.AreEqual (AccessibleRole.PushButton, ao.Role, "L8");
Assert.AreEqual (AccessibleStates.Focusable, ao.State, "L9");
Assert.AreEqual (string.Empty, ao.Value, "L10");
tsi.Name = "Label1";
tsi.Text = "Test Label";
tsi.AccessibleDescription = "Label Desc";
Assert.AreEqual (Rectangle.Empty, ao.Bounds, "L11");
Assert.AreEqual ("Press", ao.DefaultAction, "L12");
Assert.AreEqual ("Label Desc", ao.Description, "L13");
Assert.AreEqual (null, ao.Help, "L14");
Assert.AreEqual (string.Empty, ao.KeyboardShortcut, "L15");
Assert.AreEqual ("Test Label", ao.Name, "L16");
Assert.AreEqual (null, ao.Parent, "L17");
Assert.AreEqual (AccessibleRole.PushButton, ao.Role, "L18");
Assert.AreEqual (AccessibleStates.Focusable, ao.State, "L19");
Assert.AreEqual (string.Empty, ao.Value, "L20");
tsi.AccessibleName = "Access Label";
Assert.AreEqual ("Access Label", ao.Name, "L21");
tsi.Text = "Test Label";
Assert.AreEqual ("Access Label", ao.Name, "L22");
tsi.AccessibleDefaultActionDescription = "AAA";
Assert.AreEqual ("AAA", tsi.AccessibleDefaultActionDescription, "L23");
}