ComponentFactory.Krypton.Toolkit.RenderStandard.DrawDragDockingSquaresBottom C# (CSharp) Method

DrawDragDockingSquaresBottom() private method

private DrawDragDockingSquaresBottom ( Graphics g, Color activeColor, Color inactiveColor, RenderDragDockingData dragData ) : void
g System.Drawing.Graphics
activeColor Color
inactiveColor Color
dragData RenderDragDockingData
return void
        private void DrawDragDockingSquaresBottom(Graphics g,
                                                  Color activeColor,
                                                  Color inactiveColor,
                                                  RenderDragDockingData dragData)
        {
            Color borderColour = ControlPaint.Dark(activeColor);

            // Draw border around the window square
            using (Pen borderPen = new Pen(borderColour),
                       dashPen = new Pen(borderColour),
                       shadow1Pen = new Pen(_190),
                       shadow2Pen = new Pen(_218))
            {
                // Draw the caption area at top of window
                using (LinearGradientBrush middleBrush = new LinearGradientBrush(new Rectangle(33, 61, 20, 1), ControlPaint.LightLight(inactiveColor), activeColor, 0f),
                                           bottomBrush = new LinearGradientBrush(new Rectangle(33, 62, 20, 1), ControlPaint.Light(activeColor), activeColor, 0f),
                                           positionBrush = new LinearGradientBrush(new Rectangle(34, 72, 19, 11), Color.FromArgb(160, inactiveColor), Color.FromArgb(64, inactiveColor), 270f),
                                           arrowBrush = new LinearGradientBrush(new Rectangle(39, 66, 8, 4), borderColour, Color.FromArgb(175, borderColour), 270f))
                {
                    // Draw border
                    g.DrawLine(borderPen, 33, 60, 53, 60);
                    g.DrawLine(borderPen, 53, 60, 53, 83);
                    g.DrawLine(borderPen, 53, 83, 33, 83);
                    g.DrawLine(borderPen, 33, 83, 33, 60);

                    // Draw shadows around right and bottom edges
                    g.DrawLine(shadow1Pen, 34, 84, 54, 84);
                    g.DrawLine(shadow1Pen, 54, 61, 54, 84);
                    g.DrawLine(shadow2Pen, 35, 85, 55, 85);
                    g.DrawLine(shadow2Pen, 55, 61, 55, 85);

                    // Draw the caption area
                    g.FillRectangle(middleBrush, 34, 61, 19, 1);
                    g.FillRectangle(bottomBrush, 34, 62, 19, 1);

                    // Draw client area
                    g.FillRectangle(SystemBrushes.Window, 34, 63, 19, 20);

                    // Draw docking edge indicator
                    g.FillRectangle(positionBrush, 34, 73, 19, 10);

                    // Draw a dashed line down the middle
                    dashPen.DashStyle = DashStyle.Dot;
                    g.DrawLine(dashPen, 35, 73, 53, 73);

                    // Draw the direction arrow
                    g.FillPolygon(arrowBrush, new Point[] { new Point(43, 71), new Point(47, 67), new Point(40, 67), new Point(43, 71) });

                    // If active, then draw highlighted border
                    if (dragData.ActiveBottom)
                    {
                        g.DrawLine(borderPen, 29, 63, 29, 87);
                        g.DrawLine(borderPen, 57, 63, 57, 87);
                        g.DrawLine(borderPen, 29, 87, 57, 87);
                    }
                }
            }
        }
RenderStandard