#if FRAMEWORK20 using DevComponents.Schedule.Model; using System.Drawing; namespace DevComponents.DotNetBar.Schedule { public class AppointmentTimeLineView : AppointmentHView { #region Private variables private TimeLineView _TimeLineView; #endregion /// /// Constructor /// /// /// public AppointmentTimeLineView(BaseView baseView, Appointment appointment) : base(baseView, appointment) { } #region Public properties public TimeLineView TimeLineView { get { return (_TimeLineView); } set { if (_TimeLineView != value) { _TimeLineView = value; if (_TimeLineView != null) SetViewEnds(); } } } #endregion #region SetViewEnds /// /// Sets the view display end types /// protected override void SetViewEnds() { ViewEnds = eViewEnds.Complete; Rectangle r = DisplayRectangle; Rectangle p = ParentBounds; if (r.Left < p.Left) ViewEnds |= eViewEnds.PartialLeft; if (r.Right > p.Right) ViewEnds |= eViewEnds.PartialRight; } #endregion #region Protected properties protected override Rectangle ParentBounds { get { if (_TimeLineView != null) return (_TimeLineView.ClientRect); return (base.ParentBounds); } } #endregion } } #endif