/// <summary> /// Gets or sets the data value as specified by the <see cref="PerfDataType" /> enum /// </summary> /// <param name="type">The required data value type</param> public double this[PerfDataType type] { get { switch (type) { default: case PerfDataType.Time: return(time); case PerfDataType.Distance: return(distance); case PerfDataType.Velocity: return(velocity); case PerfDataType.Acceleration: return(acceleration); } } set { switch (type) { case PerfDataType.Time: time = value; break; case PerfDataType.Distance: distance = value; break; case PerfDataType.Velocity: velocity = value; break; case PerfDataType.Acceleration: acceleration = value; break; } } }
/// <summary> /// The Copy Constructor. This method does NOT duplicate the data, it merely makes /// another "Window" into the same collection. You can make multiple copies and /// set the <see cref="XData" /> and/or <see cref="YData" /> properties to different /// values to plot different data, while maintaining only one copy of the original values. /// </summary> /// <param name="rhs">The <see cref="SampleMultiPointList" /> from which to copy</param> public SampleMultiPointList(SampleMultiPointList rhs) { DataCollection = rhs.DataCollection; XData = rhs.XData; YData = rhs.YData; }
/// <summary> /// Default constructor /// </summary> public SampleMultiPointList() { XData = PerfDataType.Time; YData = PerfDataType.Distance; DataCollection = new ArrayList(); }
/// <summary> /// Gets or sets the data value as specified by the <see cref="PerfDataType" /> enum /// </summary> /// <param name="type">The required data value type</param> public double this[ PerfDataType type ] { get { switch( type ) { default: case PerfDataType.Time: return time; case PerfDataType.Distance: return distance; case PerfDataType.Velocity: return velocity; case PerfDataType.Acceleration: return acceleration; } } set { switch( type ) { case PerfDataType.Time: time = value; break; case PerfDataType.Distance: distance = value; break; case PerfDataType.Velocity: velocity = value; break; case PerfDataType.Acceleration: acceleration = value; break; } } }
/// <summary> /// The Copy Constructor. This method does NOT duplicate the data, it merely makes /// another "Window" into the same collection. You can make multiple copies and /// set the <see cref="XData" /> and/or <see cref="YData" /> properties to different /// values to plot different data, while maintaining only one copy of the original values. /// </summary> /// <param name="rhs">The <see cref="SampleMultiPointList" /> from which to copy</param> public SampleMultiPointList( SampleMultiPointList rhs ) { DataCollection = rhs.DataCollection; XData = rhs.XData; YData = rhs.YData; }