Example #1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="mainForm">Host form.</param>
 /// <param name="rect">Position and size of control.</param>
 /// <param name="ownerControl">Control that parents this one in the UI automation tree.</param>
 public MyListItem(ParentList parent, ArrayList items, String text, Rectangle myRect)
 {
     myText        = text;
     parentControl = parent;
     parentItems   = items;
     myID          = parentItems.Count + 1;
     myIndex       = parentItems.Count;
     myBounds      = myRect;
 }
Example #2
0
        /// <summary>
        /// Constructor for the application window.
        /// </summary>
        public UIAFragmentProviderForm()
        {
            InitializeComponent();

            // Create an instance of the custom control.
            myList         = new ParentList(this, 10, 10);
            myList.Enabled = true;

            // Add it to the form's controls. Among other things, this makes it possible for
            // UIAutomation to discover it, as it will become a child of the application window.
            this.Controls.Add(myList);
            myList.Add("Aster");
            myList.Add("Daffodil");
            myList.Add("Orchid");
            myList.Add("Tulip");
            myList.Add("Zinnia");
        }
Example #3
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="listItem">Item for which this pattern is implemented.</param>
 /// <param name="parent">List that contains the item.</param>
 public ListItemPattern(MyListItem listItem, ParentList parent)
 {
     myListItem    = listItem;
     parentList    = parent;
     selectedItems = new ArrayList();
 }