示例#1
0
//		public CurveItem AddDigitalCurve( string label, double x,
//			Color color)
//		{
//			ArrayList x1 = new ArrayList();
//			ArrayList y1 = new ArrayList();
//			ArrayList cl1 = new ArrayList();
//			ArrayList sym1 = new ArrayList();
//			x1.Add(x);
//			y1.Add(this.YAxis.Min +(2*this.YAxis.MinorStep));
//			cl1.Add(color);
//			sym1.Add(SymbolType.NoSymbol);
//
//
//			CurveItem curve = new CurveItem( label,x1,y1 ,cl1,sym1 );
//			curve.AddPointFlg = true;
//			curve.Line.Color = color;
//			curve.Symbol.Color = color;
//			curve.Symbol.Type = SymbolType.NoSymbol;
//			this.curveList.Add( curve );
//			return curve;
//
//
//		}
//		public void AddPointInDigitalCurve(int CurveIndex, double x, int Bit,
//			Color color )
//		{
//
//			if(this.curveList[CurveIndex].AddPointFlg)
//			{
//				this.curveList[CurveIndex].X.Add(x);
//				if(Bit == 1)
//				{
//					this.curveList[CurveIndex].Y.Add(this.YAxis.Min +(4*this.YAxis.MinorStep));
//				}
//				else
//				{
//					this.curveList[CurveIndex].Y.Add(this.YAxis.Min +(2*this.YAxis.MinorStep));
//				}
//
//				this.curveList[CurveIndex].CL.Add(color);
//				this.curveList[CurveIndex].SYM.Add(SymbolType.NoSymbol);
//				Graphics gr = Graphics.FromHwnd(this.hwnd);
//				gr.SetClip( this.axisRect );
//				this.curveList[CurveIndex].Draw(gr,this,TmpScalefactor );
//				gr.ResetClip();
//				gr.Dispose();
//			}
//		}

        public CurveItem AddCurveWithPoint(string label, double x, double y,
                                           Color color, SymbolType symbolType)
        {
            ArrayList x1   = new ArrayList();
            ArrayList y1   = new ArrayList();
            ArrayList cl1  = new ArrayList();
            ArrayList sym1 = new ArrayList();

            x1.Add(x);
            y1.Add(y);
            cl1.Add(color);
            sym1.Add(symbolType);

            CurveItem curve = new CurveItem(label, x1, y1, cl1, sym1);

            curve.AddPointFlg  = true;
            curve.Line.Color   = color;
            curve.Symbol.Color = color;
            curve.Symbol.Type  = symbolType;
            this.curveList.Add(curve);

            return(curve);
        }
示例#2
0
 /// <summary>
 /// Add a <see cref="CurveItem"/> object to the collection at the end of the list.
 /// </summary>
 /// <param name="curve">A reference to the <see cref="CurveItem"/> object to
 /// be added</param>
 public void Add(CurveItem curve)
 {
     List.Add(curve);
 }