private void SetNewDragItem(TimeLineView pv, CalendarItem view) { _LastBounds = pv._LastBounds; _LastMovePoint = pv._LastMovePoint; _LastPointOffset = pv._LastPointOffset; int dx = _LastPointOffset.X - _LastBounds.X; CalendarView.CalendarPanel.InternalMouseMove(new MouseEventArgs(MouseButtons.None, 0, view.Bounds.X + dx, view.Bounds.Y, 0)); MouseEventArgs args = new MouseEventArgs(MouseButtons.Left, 1, view.Bounds.X + dx, view.Bounds.Y, 0); IsMoving = true; InternalMouseMove(args); CalendarView.CalendarPanel.InternalMouseDown(args); SelectedItem = view; IsCopyDrag = true; }
private bool DragCustomItem(TimeLineView pv, CustomCalendarItem ci) { // Set the new owner and selected view, and // recalc the new layout ci.OwnerKey = OwnerKey; NeedRecalcLayout = true; RecalcSize(); CalendarView.SelectedOwnerIndex = this.DisplayedOwnerKeyIndex; // Get the new view CustomCalendarItem view = GetCustomCalendarItem(ci); if (view != null) SetNewDragItem(pv, view); return (true); }
/// <summary> /// Drags the given appointment from one view to another /// </summary> /// <param name="pv">Previous view</param> /// <param name="av">Item to drag</param> private bool DragAppointment(TimeLineView pv, AppointmentView av) { // Set the new owner and selected view, and // recalc the new layout av.Appointment.OwnerKey = OwnerKey; NeedRecalcLayout = true; RecalcSize(); CalendarView.SelectedOwnerIndex = this.DisplayedOwnerKeyIndex; // Get the new view AppointmentView view = GetAppointmentView(av.Appointment); if (view != null) SetNewDragItem(pv, view); return (true); }
private bool _IsConnected; // Connection status #endregion /// <summary> /// Constructor /// </summary> /// <param name="model">Assoc CalendarModel</param> /// <param name="timeLineView">Assoc TimeLineView</param> public ModelTimeLineViewConnector(CalendarModel model, TimeLineView timeLineView) { _Model = model; _View = timeLineView; }