Beispiel #1
0
        internal void OnMouseDown(ZedGraphControl sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Left || e.Clicks != 1)
            {
                return;
            }

            m_HighLight?.Hide();

            var loc = Location;

            loc.Offset(sender.PointToScreen(sender.ClientRectangle.Location));

            m_HighLight = new HighLight(loc, Size);
            m_Start     = m_Last = e.Location;

            if (PaneIndex > 0 && sender.MasterPane != null && PaneIndex < sender.MasterPane.PaneList.Count - 1)
            {
                var before = sender.MasterPane.PaneList[PaneIndex - 1];
                var after  = sender.MasterPane.PaneList[PaneIndex + 1];

                var min = before.Location;
                var max = new Point((int)after.Rect.Right, (int)after.Rect.Bottom);

                m_Min = Vertical ? min.X : min.Y;
                m_Max = Vertical ? max.X : max.Y;
            }
        }