示例#1
0
        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);
            }
        }
示例#2
0
 public bool GetPoint(int pointIndex, ref BarPoint barPoint)
 {
     return(true);
 }
示例#3
0
 public bool GetPoint(int pointIndex, ref BarPoint barPoint)
 {
     return true;
 }
示例#4
0
 public virtual bool AddPoint(BarPoint barPoint)
 {
     listBarPoint.Add(barPoint);
     return(true);
 }
示例#5
0
 public virtual bool AddPoint(BarPoint barPoint)
 {
     listBarPoint.Add(barPoint);
     return true;
 }