示例#1
0
 public void Add(Owner Value)
 {
     InnerList.Add(Value);
 }
示例#2
0
 public int IndexOf(Owner Value)
 {
     return InnerList.IndexOf(Value);
 }
示例#3
0
        /// <summary>
        /// Called when the Add Owner menu item is clicked.
        /// </summary>
        /// <param name="sender">The source object</param>
        /// <param name="e">Event arguments</param>
        private void OnAddOwner(object sender, EventArgs e)
        {
            Calendar cal = (Calendar)Component;
            PropertyDescriptor itemsDesc = DesignUtil.GetPropertyDescriptor(cal, "Owners");
            if (itemsDesc != null)
            {
                // Tell the designer that we're changing the property
                RaiseComponentChanging(itemsDesc);

                // Do the change
                Owner owner = new Owner("Owner", "Owner");
                cal.Owners.Add(owner);

                // Tell the designer that we've changed the property
                RaiseComponentChanged(itemsDesc, null, null);
                UpdateDesignTimeHtml();
            }
        }