コード例 #1
0
ファイル: ListBoxTester.cs プロジェクト: formist/LinkMe
 protected internal override void ChangeItemSelectState(ListItemTester item, bool selected)
 {
     if (SelectionMode == ListSelectionMode.Single)
     {
         SetListSelection(item, selected);
     }
     else
     {
         ToggleItemSelection(item, selected);
     }
 }
コード例 #2
0
ファイル: ListControlTester.cs プロジェクト: formist/LinkMe
 protected void ToggleItemSelection(ListItemTester item, bool selected)
 {
     if (selected)
     {
         EnterInputValue(item.Element, Tag.Attribute("name"), item.Value);
     }
     else
     {
         RemoveInputValue(item.Element, Tag.Attribute("name"));
     }
     OptionalPostBack(Tag.OptionalAttribute("onchange"));
 }
コード例 #3
0
ファイル: ListControlTester.cs プロジェクト: formist/LinkMe
        protected void SetListSelection(ListItemTester item, bool selected)
        {
            string name = Tag.Attribute("name");

            foreach (XmlElement option in OptionList)
            {
                RemoveInputValue(option, name);
            }
            if (selected)
            {
                EnterInputValue(item.Element, name, item.Value);
            }
            OptionalPostBack(Tag.OptionalAttribute("onchange"));
        }
コード例 #4
0
ファイル: ListControlTester.cs プロジェクト: formist/LinkMe
 protected internal virtual void ChangeItemSelectState(ListItemTester item, bool selected)
 {
     SetListSelection(item, selected);
 }
コード例 #5
0
 /// <summary>
 /// Determines whether the collection contains the specified item.
 /// </summary>
 /// <param name="item">A System.Web.UI.WebControls.ListItem to search for in the collection.</param>
 /// <returns>true if the collection contains the specified item; otherwise, false.</returns>
 public bool Contains(ListItemTester item)
 {
     return(InnerList.Contains(item));
 }