コード例 #1
0
        /// <summary>
        /// Indexer to access the data.  This gets the appropriate data and converts to
        /// the <see cref="PointPair" /> struct that is compatible with ZedGraph.  The
        /// actual data returned depends on the values of <see cref="XData" /> and
        /// <see cref="YData" />.
        /// </summary>
        /// <param name="index">The ordinal position of the desired point in the list</param>
        /// <returns>A <see cref="PointPair" /> corresponding to the specified ordinal data position</returns>
        public PointPair this[int index]
        {
            get
            {
                double xVal, yVal;
                if (index >= 0 && index < this.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));
            }
        }
コード例 #2
0
 /// <summary>
 /// Insert the specified <see cref="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 cref="PerformanceData" /> struct to be inserted</param>
 public void Insert(int index, PerformanceData perfData)
 {
     DataCollection.Insert(index, perfData);
 }
コード例 #3
0
 /// <summary>
 /// Adds the specified <see cref="PerformanceData" /> struct to the end of the collection.
 /// </summary>
 /// <param name="perfData">A <see cref="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));
 }
コード例 #4
0
 /// <summary>
 /// Insert the specified <see cref="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 cref="PerformanceData" /> struct to be inserted</param>
 public void Insert( int index, PerformanceData perfData )
 {
     DataCollection.Insert( index, perfData );
 }
コード例 #5
0
 /// <summary>
 /// Adds the specified <see cref="PerformanceData" /> struct to the end of the collection.
 /// </summary>
 /// <param name="perfData">A <see cref="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 );
 }