コード例 #1
0
ファイル: Calendar.cs プロジェクト: 0anion0/IBN
 /// <summary>
 /// Raises the <see cref="ItemCommand"/> event. This allows you to provide a custom handler for the event.
 /// </summary>
 /// <param name="e">A <see cref="CalendarItemEventArgs"/> that contains event data.</param>
 /// Use the OnItemCommand method to provide a custom handler for the ItemCommand event.
 /// 
 /// <remarks>
 /// The OnItemCommand event is raised when an item in the Calendar control is clicked.
 /// </remarks>
 protected virtual void OnItemCommand(CalendarItemCommandEventArgs e)
 {
     CalendarItemCommandEventHandler onItemCommandHandler = (CalendarItemCommandEventHandler)Events[EventItemCommand];
     if (onItemCommandHandler != null) onItemCommandHandler(this, e);
 }
コード例 #2
0
ファイル: CalendarItem.cs プロジェクト: 0anion0/IBN
 /// <summary>
 /// Raises Bubble event
 /// </summary>
 /// <param name="source"></param>
 /// <param name="e"></param>
 /// <returns></returns>
 protected override bool OnBubbleEvent(object source, EventArgs e)
 {
     if(e is CommandEventArgs)
     {
         CalendarItemCommandEventArgs args = new CalendarItemCommandEventArgs(this, source, (CommandEventArgs)e);
         RaiseBubbleEvent(this, args);
         return true;
     }
     return false;
 }