Forex_Strategy_Builder.Chart.PnlPrice_MouseLeave C# (CSharp) Method

PnlPrice_MouseLeave() private method

Deletes the cross and Dynamic Info
private PnlPrice_MouseLeave ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        void PnlPrice_MouseLeave(object sender, EventArgs e)
        {
            pnlPrice.Cursor    = Cursors.Default;
            isMouseInPriceChart = false;

            mouseXOld = mouseX;
            mouseYOld = mouseY;
            mouseX    = -1;
            mouseY    = -1;
            barOld    = -1;

            if (isCrossShown)
            {
                GraphicsPath path = new GraphicsPath(FillMode.Winding);

                // Horizontal Line
                path.AddRectangle(new Rectangle(0, mouseYOld, pnlPrice.ClientSize.Width, 1));
                // PriceBox
                path.AddRectangle(new Rectangle(XRight - 1, mouseYOld - font.Height / 2 - 1, szPrice.Width + 2, font.Height + 2));
                // Vertical Line
                path.AddRectangle(new Rectangle(mouseXOld, 0, 1, pnlPrice.ClientSize.Height));
                // DateBox
                path.AddRectangle(new Rectangle(mouseXOld - szDateL.Width / 2 - 1, YBottomText - 1, szDateL.Width + 2, font.Height + 3));

                pnlPrice.Invalidate(new Region(path));

                for (int i = 0; i < indPanels && isIndicatorsShown; i++)
                    pnlInd[i].Invalidate(new Rectangle(mouseXOld, 0, 1, pnlInd[i].ClientSize.Height));

                if (isBalanceEquityShown)
                    pnlBalanceChart.Invalidate(new Rectangle(mouseXOld, 0, 1, pnlBalanceChart.ClientSize.Height));

                if (isFloatingPLShown)
                    pnlFloatingPLChart.Invalidate(new Rectangle(mouseXOld, 0, 1, pnlFloatingPLChart.ClientSize.Height));
            }

            return;
        }