Example #1
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 DrawContent(GraphicsCache graphicsCache, Skin skin)
        {
            Rectangle bounds = ClientRectangle;

            bounds.Width--; bounds.Height--;
            graphicsCache.Graphics.DrawRectangle(graphicsCache.GetPen(Color.FromArgb(255, 87, 87, 87), 1), bounds);
        }
 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);
 }
Example #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);
            }
        }