Example #1
0
 /// <summary>
 /// Creates a new object that is a copy of the current instance.
 /// </summary>
 /// <returns>A new object that is a copy of this instance.</returns>
 public override object Clone()
 {
     //CalendarItem copy = (CalendarItem)base.Clone();
     CalendarItem copy = new CalendarItem(this.itemIndex, this.DataItem);
     copy.SetParentCalendar(this.ParentCalendar);
     copy.DataItem = this.DataItem;
     copy.Label = this.Label;
     copy.Description = this.Description;
     copy.Link = this.Link;
     return copy;
 }
Example #2
0
 /// <summary>
 /// Sets properties of the CalendarItem before being added.
 /// </summary>
 /// <param name="item">The CalendarItem to be set.</param>
 private void SetItemProperties(CalendarItem item)
 {
     item.SetParentCalendar(ParentCalendar);
 }