Пример #1
0
    /// <summary>
    ///     Retrieves as many data points as are ready from the Datastore
    ///     property and puts them into the Data property.
    /// </summary>
    /// <returns>
    ///     The number of data points retrieved from the Datastore.
    /// </returns>
    protected long UpdateData()
    {
        // Get the points and figure out how many there are.
        float[][] newPoints = Datastore.Dequeue();
        if (newPoints == null)
        {
            return(0);
        }
        long length = newPoints.Length;

        if (length < 1)
        {
            return(0);
        }

        // Update the points in Data.
        Data.AddData(newPoints);

        // If the field names haven't been set yet, do so now.
        ColumnTitles = Datastore.Labels;
        if (ColumnTitles != null && !ColumnTitlesAreReady)
        {
            ColumnTitlesAreReady = true;
        }

        return(length);
    }