/// <summary> /// Indexer to access the data. This gets the appropriate data and converts to /// the <see c_ref="PointPair" /> struct that is compatible with ZedGraph. The /// actual data returned depends on the values of <see c_ref="XData" /> and /// <see c_ref="YData" />. /// </summary> /// <param name="index">The ordinal position of the desired point in the list</param> /// <returns>A <see c_ref="PointPair" /> corresponding to the specified ordinal data position</returns> public PointPair this[int index] { get { double xVal, yVal; if (index >= 0 && index < Count) { // grab the specified PerformanceData struct PerformanceData perfData = (PerformanceData)DataCollection[index]; // extract the values from the struct according to the user-set // enum values of XData and YData xVal = perfData[XData]; yVal = perfData[YData]; } else { xVal = PointPair.Missing; yVal = PointPair.Missing; } // insert the values into a pointpair and return return(new PointPair(xVal, yVal, PointPair.Missing, null)); } }
/// <summary> /// Insert the specified <see c_ref="PerformanceData" /> struct into the list at /// the specified ordinal location. /// </summary> /// <param name="index">The ordinal location at which to insert</param> /// <param name="perfData">The <see c_ref="PerformanceData" /> struct to be inserted</param> public void Insert( int index, PerformanceData perfData ) { DataCollection.Insert( index, perfData ); }
/// <summary> /// Adds the specified <see c_ref="PerformanceData" /> struct to the end of the collection. /// </summary> /// <param name="perfData">A <see c_ref="PerformanceData" /> struct to be added</param> /// <returns>The ordinal position in the collection where the values were added</returns> public int Add( PerformanceData perfData ) { return DataCollection.Add( perfData ); }
/// <summary> /// Insert the specified <see c_ref="PerformanceData" /> struct into the list at /// the specified ordinal location. /// </summary> /// <param name="index">The ordinal location at which to insert</param> /// <param name="perfData">The <see c_ref="PerformanceData" /> struct to be inserted</param> public void Insert(int index, PerformanceData perfData) { DataCollection.Insert(index, perfData); }
/// <summary> /// Adds the specified <see c_ref="PerformanceData" /> struct to the end of the collection. /// </summary> /// <param name="perfData">A <see c_ref="PerformanceData" /> struct to be added</param> /// <returns>The ordinal position in the collection where the values were added</returns> public int Add(PerformanceData perfData) { return(DataCollection.Add(perfData)); }