// public void SetAreaPos(int aTag, int aPosition, int aHeight) { if (FAreaMarks == null) { FAreaMarks = new List <AreaMark>(); } int vIndex = GetAreaMarkByTag(aTag); if (vIndex < 0) { AreaMark vAreaMark = new AreaMark(); vAreaMark.Tag = aTag; vAreaMark.Position = aPosition; vAreaMark.Height = aHeight; FAreaMarks.Add(vAreaMark); RECT vRect = GetAreaMarkRect(FAreaMarks.Count - 1); User.InvalidateRect(this.Handle, ref vRect, 0); } else if ((FAreaMarks[vIndex].Position != aPosition) || (FAreaMarks[vIndex].Height != aHeight)) { RECT vRect = GetAreaMarkRect(vIndex); FAreaMarks[vIndex].Position = aPosition; FAreaMarks[vIndex].Height = aHeight; User.InvalidateRect(this.Handle, ref vRect, 0); vRect = GetAreaMarkRect(vIndex); User.InvalidateRect(this.Handle, ref vRect, 0); } }
// public void AddAreaPos(int aPosition, int aHeight) { AreaMark vAreaMark = new AreaMark(); vAreaMark.Position = aPosition; vAreaMark.Height = aHeight; if (FAreaMarks == null) { FAreaMarks = new List <AreaMark>(); } FAreaMarks.Add(vAreaMark); }