public GridePainterArgs(int AbsoluteIndex, int TrackIndex, ITrackerInterface TrackObject, System.Drawing.Rectangle TrackArea)
 {
     this._AbsoluteIndex = AbsoluteIndex;
     this._TrackArea     = TrackArea;
     this._TrackIndex    = TrackIndex;
     this._TrackObject   = TrackObject;
 }
        public void DrawTracks(List <TrackerObject> VocalTracks, List <BackerObject> BackTracks, OneTrackPaintHandler TrackPaintCallBack)
        {
            int ShownTrackCount = baseEvent.ClipRectangle.Height / rconf.Const_TrackHeight;
            int y = rconf.Const_TitleHeight;//绘制点纵坐标

            for (uint i = pprops.TopTrackId; i < VocalTracks.Count + BackTracks.Count; i++)
            {
                if (y > baseEvent.ClipRectangle.Top + baseEvent.ClipRectangle.Height)
                {
                    break;
                }
                try
                {
                    System.Drawing.Rectangle TrackArea = new Rectangle(new Point(baseEvent.ClipRectangle.Left, y), new Size(baseEvent.ClipRectangle.Width, rconf.Const_TrackHeight));
                    uint j = 0;
                    ITrackerInterface TObject = null;
                    if (i >= VocalTracks.Count)
                    {
                        j = (uint)(i - VocalTracks.Count);
                        //BackerObject
                        TObject = BackTracks[(int)j];
                    }
                    else
                    {
                        j = i;
                        //TrackerObject
                        TObject = VocalTracks[(int)j];
                    }
                    if (TObject != null)
                    {
                        if (TrackPaintCallBack != null)
                        {
                            TrackPaintCallBack(new TrackPainterArgs((int)i, (int)j, TObject, TrackArea), this);
                        }
                    }
                }
                catch {; }

                baseEvent.D2DGraphics.DrawLine(
                    new Point(baseEvent.ClipRectangle.Left, y + rconf.Const_TrackHeight),
                    new Point(baseEvent.ClipRectangle.Right, y + rconf.Const_TrackHeight),
                    rconf.TitleColor_Marker
                    );
                y += rconf.Const_TrackHeight;
            }
        }
        public void DrawTracks(List <TrackerObject> VocalTracks, List <BackerObject> BackTracks, OneGridePaintHandler GridePaintCallBack)
        {
            int ShownTrackCount = baseEvent.ClipRectangle.Height / rconf.Const_TrackHeight;
            int y = rconf.Const_TitleHeight;//绘制点纵坐标

            for (uint i = pprops.TopTrackId; i < VocalTracks.Count + BackTracks.Count; i++)
            {
                if (y > baseEvent.ClipRectangle.Top + baseEvent.ClipRectangle.Height)
                {
                    break;
                }
                try
                {
                    System.Drawing.Rectangle TrackArea = new Rectangle(new Point(0, y), new Size(rconf.Const_GridWidth - 1, rconf.Const_TrackHeight));
                    uint j      = 0;
                    uint jcount = 0;
                    ITrackerInterface TObject = null;
                    if (i >= VocalTracks.Count)
                    {
                        j      = (uint)(i - VocalTracks.Count);
                        jcount = (uint)VocalTracks.Count;
                        //BackerObject
                        TObject = BackTracks[(int)j];
                    }
                    else
                    {
                        j      = i;
                        jcount = (uint)VocalTracks.Count;
                        //TrackerObject
                        TObject = VocalTracks[(int)j];
                    }
                    if (TObject != null)
                    {
                        string ShowName = TObject.getName();
                        if (ShowName.Length > 22)
                        {
                            ShowName = ShowName.Substring(0, 22);
                        }
                        baseEvent.D2DGraphics.DrawText(
                            "  " + ShowName,
                            new Rectangle(
                                new Point(rconf.Const_GridVolumeWidth + TrackArea.X + rconf.Const_GridButtonWidth, TrackArea.Y + rconf.Const_GridFontTop),
                                new Size(TrackArea.Width - rconf.Const_GridVolumeWidth - rconf.Const_GridButtonWidth, TrackArea.Height - rconf.Const_GridFontTop)
                                ),
                            Color.White,
                            new System.Drawing.Font("Tahoma", 10));

                        DrawButton(rconf.Const_GridVolumeWidth + TrackArea.X, TrackArea.Y, rconf.Const_GridButtonWidth, rconf.Const_TrackHeight, Color.DarkSlateGray, "");

                        if (j > 0)
                        {
                            DrawButton(rconf.Const_GridVolumeWidth + TrackArea.X, TrackArea.Y, rconf.Const_GridButtonWidth, rconf.Const_TrackHeight / 2, Color.DarkCyan, "▲");
                        }

                        if (j + 1 < jcount)
                        {
                            DrawButton(rconf.Const_GridVolumeWidth + TrackArea.X, TrackArea.Y + rconf.Const_TrackHeight / 2, rconf.Const_GridButtonWidth, rconf.Const_TrackHeight / 2, Color.DarkGoldenrod, "▼");
                        }

                        if (GridePaintCallBack != null)
                        {
                            GridePaintCallBack(new GridePainterArgs((int)i, (int)j, TObject, new Rectangle(new Point(TrackArea.X, TrackArea.Y), new Size(rconf.Const_GridVolumeWidth, TrackArea.Height))), this);
                        }
                    }
                    baseEvent.D2DGraphics.DrawLine(
                        new Point(rconf.Const_GridVolumeWidth, TrackArea.Top),
                        new Point(rconf.Const_GridVolumeWidth, TrackArea.Bottom),
                        rconf.TitleColor_Marker
                        );
                }
                catch {; }

                baseEvent.D2DGraphics.DrawLine(
                    new Point(0, y + rconf.Const_TrackHeight),
                    new Point(rconf.Const_GridWidth, y + rconf.Const_TrackHeight),
                    rconf.TitleColor_Marker
                    );
                y += rconf.Const_TrackHeight;
            }
        }