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