Forex_Strategy_Builder.Chart.PnlInfo_Paint C# (CSharp) Method

PnlInfo_Paint() private method

Paints the panel PnlInfo.
private PnlInfo_Paint ( object sender, PaintEventArgs e ) : void
sender object
e PaintEventArgs
return void
        void PnlInfo_Paint(object sender, PaintEventArgs e)
        {
            if (!isInfoPanelShown) return;

            Graphics g = e.Graphics;
            g.Clear(LayoutColors.ColorControlBack);

            if (isDrawDinInfo && isDynInfoShown)
            {
                int rowHeight = fontDI.Height + 1;
                Size size = new Size(dynInfoWidth, rowHeight);

                for (int i = 0; i < infoRows; i++)
                {
                    if (i % 2f != 0)
                        g.FillRectangle(brushEvenRows, new Rectangle(new Point(0, i * rowHeight + 1), size));

                    if (aiInfoType[i + dynInfoScrollValue] == 1)
                        g.DrawString(asInfoTitle[i + dynInfoScrollValue], fontDIInd, brushDIIndicator, 5, i * rowHeight - 1);
                    else
                        g.DrawString(asInfoTitle[i + dynInfoScrollValue], fontDI, brushDynamicInfo, 5, i * rowHeight + 1);

                    g.DrawString(asInfoValue[i + dynInfoScrollValue], fontDI, brushDynamicInfo, XDynInfoCol2, i * rowHeight + 1);
                }
            }

            return;
        }