public void Add(Owner Value) { InnerList.Add(Value); }
public int IndexOf(Owner Value) { return InnerList.IndexOf(Value); }
/// <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(); } }