/// <summary>
        /// Draws calendar single item rectangle and text
        /// </summary>
        private void DrawItemRect(Graphics graphics, string text,
                                  int x, int y, int width, int height,
                                  bool isDrawLeftBorder,
                                  bool isDrawRightBorder,
                                  Color backColor,
                                  bool isSelected)
        {
            Rectangle Rect = new Rectangle(x, y, width, height);

            //Draws shadow rect
            using (SolidBrush backBrush = new SolidBrush(Color.SlateGray))
                graphics.FillRectangle(backBrush, Rect.X + shadowItemRect, Rect.Y, Rect.Width, Rect.Height + shadowItemRect);

            //draws item rect
            if (width > 0 && height > 0)
            {
                using (LinearGradientBrush gradientBrush = WeekPlannerColorTable.ItemGradientBackBrush(Rect, backColor))
                {
                    graphics.FillRectangle(gradientBrush, Rect);
                }
            }

            // Draws border
            Point p1 = new Point(x, y);
            Point p2 = new Point(x + width, y);
            Point p3 = new Point(x + width, y + height);
            Point p4 = new Point(x, y + height);

            Pen pen = new Pen(itemBorderColor);

            if (isSelected)
            {
                pen = new Pen(selectedItemBorderColor, 3);
            }

            using (pen)
            {
                graphics.DrawLine(pen, p1, p2);
                if (isDrawRightBorder)
                {
                    graphics.DrawLine(pen, p2, p3);
                }
                graphics.DrawLine(pen, p3, p4);
                if (isDrawLeftBorder)
                {
                    graphics.DrawLine(pen, p4, p1);
                }
            }


            //Draws item text
            StringFormat sf = new StringFormat();

            sf.Alignment     = StringAlignment.Center;
            sf.LineAlignment = StringAlignment.Center;
            using (Brush brush = new SolidBrush(Color.Black))
            {
                graphics.DrawString(text, ItemTextFont, brush, Rect, sf);
            }
        }