private void OnSelectionChanged(object sender, Calendar.AppointmentEventArgs args) { if (args.Appointment != null) { m_SelectedTaskID = args.Appointment.Id; } }
private void OnDayViewAppointmentChanged(object sender, Calendar.AppointmentEventArgs args) { var move = args as Calendar.MoveAppointmentEventArgs; if (move == null) { return; } // Whilst move is in progress only update selected task dates if (!move.Finished) { UpdatedSelectedTaskDatesText(); return; } var item = args.Appointment as CalendarItem; if (item == null) { return; } ProcessTaskAppointmentChange(item, move.Mode); UpdatedSelectedTaskDatesText(); }
void DayViewMain_AppointmentMove(object sender, Calendar.AppointmentEventArgs e) { var termin = e.Appointment as Appointment; if (termin != null && termin.IsDirty) { termin.Update(); } }
void dayView_AppointmentMove(object sender, Calendar.AppointmentEventArgs e) { Model.Entities.Termin termin = e.Appointment as Model.Entities.Termin; if (termin != null) { termin.StartDate = e.Appointment.StartDate; termin.EndDate = e.Appointment.EndDate; } }
private void OnSelectionChanged(object sender, Calendar.AppointmentEventArgs args) { if (args.Appointment != null) { m_SelectedTaskID = args.Appointment.Id; // User made this selection so the task must be visible m_VisibleSelectedTaskID = m_SelectedTaskID; } }
private void dayView1_AppointmentMoved(object sender, Calendar.AppointmentEventArgs e) { //has it changed to another user? if (!e.Appointment.AllDayEvent) { e.Appointment.Object = lstPeople.CheckedItems[e.Appointment.Column]; } ShowMessage("Appointment Moved"); }
private void OnDayViewSelectionChanged(object sender, Calendar.AppointmentEventArgs args) { UIExtension.ParentNotify notify = new UIExtension.ParentNotify(m_HwndParent); if (m_DayView.Selection != Calendar.SelectionType.None) { UpdatedSelectedTaskDatesText(); notify.NotifySelChange(m_DayView.GetSelectedTaskID()); } }
private void OnDayViewSelectionChanged(object sender, Calendar.AppointmentEventArgs args) { UIExtension.ParentNotify notify = new UIExtension.ParentNotify(m_HwndParent); if (m_DayView.Selection != Calendar.SelectionType.None) { if (args.Appointment != null) { notify.NotifySelChange(args.Appointment.Id); } else { notify.NotifySelChange(0); } } }
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; } UIExtension.ParentNotify notify = new UIExtension.ParentNotify(m_hwndParent); switch (move.Mode) { case Calendar.SelectionTool.Mode.Move: if ((item.StartDate - item.OrgStartDate).TotalSeconds != 0.0) { item.OrgStartDate = item.StartDate; notify.NotifyMod(UIExtension.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(UIExtension.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(UIExtension.TaskAttribute.DueDate, args.Appointment.EndDate); } break; } }
private void OnDayViewSelectionChanged(object sender, Calendar.AppointmentEventArgs args) { UIExtension.ParentNotify notify = new UIExtension.ParentNotify(m_HwndParent); switch (m_DayView.Selection) { case Calendar.SelectionType.DateRange: break; case Calendar.SelectionType.Appointment: if (args.Appointment != null) { notify.NotifySelChange(args.Appointment.Id); } break; } }
private void dayView1_AppointmentUpdated(object sender, Calendar.AppointmentEventArgs e) { ShowMessage("Appointment Updated"); }
private void OnDayViewAppointmentChanged(object sender, Calendar.AppointmentEventArgs args) { var move = args as Calendar.MoveAppointmentEventArgs; // Ignore moves whilst they are occurring if ((move == null) || !move.Finished) { return; } var item = args.Appointment as CalendarItem; if (item == null) { return; } var notify = new UIExtension.ParentNotify(m_HwndParent); switch (move.Mode) { case Calendar.SelectionTool.Mode.Move: if (item.StartDateDiffersFromOriginal()) { if (notify.NotifyMod(Task.Attribute.OffsetTask, item.StartDate)) { item.UpdateOriginalDates(); m_DayView.FixupSelection(true, false); } else { item.RestoreOriginalDates(); m_DayView.Invalidate(); } } break; case Calendar.SelectionTool.Mode.ResizeLeft: case Calendar.SelectionTool.Mode.ResizeTop: if (item.StartDateDiffersFromOriginal()) { notify.AddMod(Task.Attribute.StartDate, item.StartDate); // Update the Time estimate if it is zero or // it used to match the previous date range bool modifyTimeEst = WantModifyTimeEstimate(item); if (modifyTimeEst) { notify.AddMod(Task.Attribute.TimeEstimate, item.LengthAsTimeEstimate(m_WorkWeek, false), item.TimeEstUnits); } if (notify.NotifyMod()) { item.UpdateOriginalDates(); if (modifyTimeEst) { item.TimeEstimate = item.LengthAsTimeEstimate(m_WorkWeek, false); } } else { item.RestoreOriginalDates(); m_DayView.Invalidate(); } } break; case Calendar.SelectionTool.Mode.ResizeRight: case Calendar.SelectionTool.Mode.ResizeBottom: if (item.EndDateDiffersFromOriginal()) { // Allow for end of day var endDate = item.EndDate; if (endDate == endDate.Date) { endDate = endDate.AddDays(-1); } if (item.IsDone) { notify.AddMod(Task.Attribute.DoneDate, endDate); } else { notify.AddMod(Task.Attribute.DueDate, endDate); } // Update the Time estimate if used to match the previous date range bool modifyTimeEst = WantModifyTimeEstimate(item); if (modifyTimeEst) { notify.AddMod(Task.Attribute.TimeEstimate, item.LengthAsTimeEstimate(m_WorkWeek, false), item.TimeEstUnits); } if (notify.NotifyMod()) { item.UpdateOriginalDates(); if (modifyTimeEst) { item.TimeEstimate = item.LengthAsTimeEstimate(m_WorkWeek, false); } } else { item.RestoreOriginalDates(); m_DayView.Invalidate(); } } break; } }