Exemple #1
0
        public CellView(BaseAppointmentBook parent, CellViewModel cellDisplay, bool selected = false)
        {
            TextAlignment  = DevAge.Drawing.ContentAlignment.MiddleLeft;
            Border         = DevAge.Drawing.RectangleBorder.NoBorder;
            base.BackColor = cellDisplay.BackColor;
            base.ForeColor = cellDisplay.TextColor;
            base.Font      = new Font(base.Font ?? Control.DefaultFont, cellDisplay.FontStyle);
            base.Padding   = new DevAge.Drawing.Padding(selected ? 0 : 1);
            var border = new RectangleBorder {
                Top    = BorderLine.NoBorder,
                Left   = BorderLine.NoBorder,
                Right  = BorderLine.NoBorder,
                Bottom = BorderLine.NoBorder
            };

            if (cellDisplay.Traits.HasFlag(CellTraits.Filled))
            {
                border.Left  = selected ? parent.SelectedAppointmentBorderLine : parent.AppointmentBorderLine;
                border.Right = selected ? parent.SelectedAppointmentBorderLine : parent.AppointmentBorderLine;
            }
            if (cellDisplay.Traits.HasFlag(CellTraits.Top))
            {
                border.Top = selected ? parent.SelectedAppointmentBorderLine : parent.AppointmentBorderLine;
            }
            if (cellDisplay.Traits.HasFlag(CellTraits.Bottom))
            {
                border.Bottom = selected ? parent.SelectedAppointmentBorderLine : parent.AppointmentBorderLine;
            }

            base.Border = border;
        }
Exemple #2
0
 public EmptyCellView(BaseAppointmentBook parent)
 {
     Border = new RectangleBorder {
         Top    = BorderLine.NoBorder,
         Left   = BorderLine.NoBorder,
         Right  = BorderLine.NoBorder,
         Bottom = parent.HorizontalBorderLine
     };
 }
Exemple #3
0
 internal BaseCellController(BaseAppointmentBook owner)
 {
     Owner           = owner;
     _previousCursor = null;
     _cursor         = null;
 }
 internal FilledCellController(BaseAppointmentBook owner)
     : base(owner)
 {
 }
Exemple #5
0
		internal EmptyCellController(BaseAppointmentBook owner) : base(owner) {
		}