private void DrawBar(Graphics g, RectangleF rect, bool print) { RectangleF rectBorder = print?this.BorderRectPrint: this.BorderRect; XAxes xAxes = this.CurveGroup.XAxes; int pCnt = listBarPoint.Count; int barValue = -1; long startTime = 0; long endTime = 0; using (SolidBrush brush = new SolidBrush(Color.Black)) { for (int i = 0; i < pCnt; i++) { BarPoint bp = listBarPoint[i]; if (barValue < 0) //无效点 { barValue = bp.Value; startTime = bp.Time; endTime = startTime; } else if (bp.Time < endTime) { //开始绘制 DrawBarValue(barValue, startTime, endTime, g, brush, print); barValue = bp.Value; startTime = bp.Time; endTime = bp.Time; } else if (bp.Value != barValue) { endTime = bp.Time; //开始绘制 DrawBarValue(barValue, startTime, endTime, g, brush, print); barValue = bp.Value; startTime = bp.Time; } else { endTime = bp.Time; } } DrawBarValue(barValue, startTime, endTime, g, brush, print); } }
public bool GetPoint(int pointIndex, ref BarPoint barPoint) { return(true); }
public bool GetPoint(int pointIndex, ref BarPoint barPoint) { return true; }
public virtual bool AddPoint(BarPoint barPoint) { listBarPoint.Add(barPoint); return(true); }
public virtual bool AddPoint(BarPoint barPoint) { listBarPoint.Add(barPoint); return true; }