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

DrawDragDockingSquaresRight() private method

private DrawDragDockingSquaresRight ( Graphics g, Color activeColor, Color inactiveColor, RenderDragDockingData dragData ) : void
g System.Drawing.Graphics
activeColor Color
inactiveColor Color
dragData RenderDragDockingData
return void
        private void DrawDragDockingSquaresRight(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(60, 33, 23, 1), ControlPaint.LightLight(inactiveColor), activeColor, 0f),
                                           bottomBrush = new LinearGradientBrush(new Rectangle(60, 34, 23, 1), ControlPaint.Light(activeColor), activeColor, 0f),
                                           positionBrush = new LinearGradientBrush(new Rectangle(71, 35, 11, 1), Color.FromArgb(160, inactiveColor), Color.FromArgb(64, inactiveColor), 180f),
                                           arrowBrush = new LinearGradientBrush(new Rectangle(68, 40, 5, 8), borderColour, Color.FromArgb(175, borderColour), 180f))
                {
                    // Draw border
                    g.DrawLine(borderPen, 60, 33, 60, 53);
                    g.DrawLine(borderPen, 83, 33, 83, 53);
                    g.DrawLine(borderPen, 60, 53, 83, 53);
                    g.DrawLine(borderPen, 60, 33, 83, 33);

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

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

                    // Draw client area
                    g.FillRectangle(SystemBrushes.Window, 61, 36, 22, 17);

                    // Draw docking edge indicator
                    g.FillRectangle(positionBrush, 72, 36, 11, 17);

                    // Draw a dashed line down the middle
                    dashPen.DashStyle = DashStyle.Dot;
                    g.DrawLine(dashPen, 72, 37, 72, 52);

                    // Draw the direction arrow
                    g.FillPolygon(arrowBrush, new Point[] { new Point(69, 44), new Point(65, 40), new Point(65, 48), new Point(69, 44) });

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