Ejemplo n.º 1
0
        private void DrawEx(GraphicsCache cache)
        {
            cache.DrawRectangle(new Pen(rectangleBorderColor, rectangleBorderTickness), drawingRectangle);

            foreach (RectangleResizePoints point in Enum.GetValues(typeof(RectangleResizePoints)))
            {
                cache.DrawRectangle(new Pen(rectangleBorderColor), GetRectangle(point));
            }
        }
Ejemplo n.º 2
0
        public static void DrawBackgroundWeekDayCell(long storeid, StoreDay storeday, EmployeeDay epd, GraphicsCache cache, Rectangle rect, long storeworldid, bool bFocused, int? long_absence_color)
        {
            Rectangle drawrect = Rectangle.Inflate(rect, 1, 1);
            if (bFocused)
            {
                Pen pen = cache.GetPen (Color.Black );
                cache.FillRectangle(Painters.FOCUSED_COLOR , drawrect);
                cache.DrawRectangle(pen, drawrect);
            }
            else
            {
                Color color = Color.White;
                if (storeday.Feast) color = Painters.FEAST_COLOR;
                if (storeday.ClosedDay) color = Painters.CLOSEDDAY_COLOR ;
                if (epd.CountDailyAdditionalCharges > 0) color = Painters.ADDITIONAL_CHARGES_COLOR;
                if (epd.StoreWorldId != storeworldid || epd.HasLongAbsence || !epd.HasRelation || storeid != epd.StoreId)
                {
                    color = Painters.DISABLE_COLOR;

                    if (epd.HasLongAbsence)
                    {
                        if (long_absence_color.HasValue)
                            color = Color.FromArgb(long_absence_color.Value);
                    }
                }
                cache.FillRectangle(color, drawrect);
            }
        }
 protected override void InternalDrawString(GraphicsCache cache, string s, Font font, Rectangle r, Brush foreBrush, StringFormatInfo strFormat)
 {
     if (!string.IsNullOrEmpty(HighlightString) && s == HighlightString)
     {
         cache.DrawRectangle(cache.GetPen(Color.Red, 2), r);
     }
     base.InternalDrawString(cache, s, font, r, foreBrush, strFormat);
 }
Ejemplo n.º 4
0
        public static void DrawBackgroundWeekDayCell(long storeid, StoreDay storeday, EmployeeDay epd, GraphicsCache cache, Rectangle rect, long storeworldid, bool bFocused, int?long_absence_color)
        {
            Rectangle drawrect = Rectangle.Inflate(rect, 1, 1);

            if (bFocused)
            {
                Pen pen = cache.GetPen(Color.Black);
                cache.FillRectangle(Painters.FOCUSED_COLOR, drawrect);
                cache.DrawRectangle(pen, drawrect);
            }
            else
            {
                Color color = Color.White;
                if (storeday.Feast)
                {
                    color = Painters.FEAST_COLOR;
                }
                if (storeday.ClosedDay)
                {
                    color = Painters.CLOSEDDAY_COLOR;
                }
                if (epd.CountDailyAdditionalCharges > 0)
                {
                    color = Painters.ADDITIONAL_CHARGES_COLOR;
                }
                if (epd.StoreWorldId != storeworldid || epd.HasLongAbsence || !epd.HasRelation || storeid != epd.StoreId)
                {
                    color = Painters.DISABLE_COLOR;

                    if (epd.HasLongAbsence)
                    {
                        if (long_absence_color.HasValue)
                        {
                            color = Color.FromArgb(long_absence_color.Value);
                        }
                    }
                }
                cache.FillRectangle(color, drawrect);
            }
        }
 private void DrawObjectBorder(GraphicsCache g, Rectangle bounds)
 {
     g.DrawRectangle(new Pen(Brushes.Black, 2), bounds);
 }
Ejemplo n.º 6
0
        private void DrawHotTrackedCell(GraphicsCache cache)
        {
            Rectangle bounds = GetCellBounds(HotTrackedCell);

            cache.DrawRectangle(new Pen(Brushes.Black, _BorderWidth), bounds);
        }