本文整理匯總了C#中System.Windows.Forms.ToolStripLabel.ToString方法的典型用法代碼示例。如果您正苦於以下問題:C# ToolStripLabel.ToString方法的具體用法?C# ToolStripLabel.ToString怎麽用?C# ToolStripLabel.ToString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Forms.ToolStripLabel
的用法示例。
在下文中一共展示了ToolStripLabel.ToString方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Accessibility
public void Accessibility ()
{
ToolStripLabel tsi = new ToolStripLabel ();
AccessibleObject ao = tsi.AccessibilityObject;
Assert.AreEqual ("ToolStripItemAccessibleObject: Owner = " + tsi.ToString (), ao.ToString (), "L");
Assert.AreEqual (Rectangle.Empty, ao.Bounds, "L1");
Assert.AreEqual (string.Empty, 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.StaticText, ao.Role, "L8");
Assert.AreEqual (AccessibleStates.ReadOnly, 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 (string.Empty, 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.StaticText, ao.Role, "L18");
Assert.AreEqual (AccessibleStates.ReadOnly, 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");
}