private void OnDayViewSelectionChanged(object sender, Calendar.AppointmentEventArgs args) { TDLUIExtension.TDLNotify notify = new TDLUIExtension.TDLNotify(m_hwndParent); switch (this.m_DayView.Selection) { case Calendar.SelectionType.DateRange: break; case Calendar.SelectionType.Appointment: if (args.Appointment != null) notify.NotifySelChange(args.Appointment.Id); else notify.NotifySelChange(0); break; } }
private void OnDayViewAppointmentChanged(object sender, Calendar.AppointmentEventArgs args) { Calendar.MoveAppointmentEventArgs move = args as Calendar.MoveAppointmentEventArgs; // Ignore moves whilst they are occurring if ((move == null) || !move.Finished) return; CalendarItem item = args.Appointment as CalendarItem; if (item == null) return; TDLUIExtension.TDLNotify notify = new TDLUIExtension.TDLNotify(m_hwndParent); switch (move.Mode) { case Calendar.SelectionTool.Mode.Move: if ((item.StartDate - item.OrgStartDate).TotalSeconds != 0.0) { item.OrgStartDate = item.StartDate; notify.NotifyMod(TDLUIExtension.TaskAttribute.OffsetTask, args.Appointment.StartDate); } break; case Calendar.SelectionTool.Mode.ResizeTop: if ((item.StartDate - item.OrgStartDate).TotalSeconds != 0.0) { item.OrgStartDate = item.StartDate; notify.NotifyMod(TDLUIExtension.TaskAttribute.StartDate, args.Appointment.StartDate); } break; case Calendar.SelectionTool.Mode.ResizeBottom: if ((item.EndDate - item.OrgEndDate).TotalSeconds != 0.0) { item.OrgEndDate = item.EndDate; notify.NotifyMod(TDLUIExtension.TaskAttribute.DueDate, args.Appointment.EndDate); } break; } }