Exemple #1
0
    /// <summary>
    /// This function resets this controller to default values
    /// </summary>
    public override void Reset()
    {
        base.Reset();

        subValueType   = Defaults.subValueType;
        finalValueType = Defaults.finalValueType;
    }
    /// <summary>
    /// This gets the value based on type.
    /// </summary>
    /// <param name="valueType">
    /// This type of value to get.
    /// </param>
    /// <returns>
    /// The value that was requested.
    /// </returns>
    public float GetValue(VisDataValueType valueType)
    {
        switch (valueType)
        {
        default:
        case VisDataValueType.Average:
            return(average);

        case VisDataValueType.Median:
            return(median);

        case VisDataValueType.Sum:
            return(sum);

        case VisDataValueType.Minimum:
            return(minimum);

        case VisDataValueType.Maximum:
            return(maximum);
        }
    }
    /// <summary>
    /// This gets the previous value based on type.
    /// </summary>
    /// <param name="valueType">
    /// This type of previous value to get.
    /// </param>
    /// <returns>
    /// The previous value that was requested.
    /// </returns>
    public float GetPreviousValue(VisDataValueType valueType)
    {
        switch (valueType)
        {
        default:
        case VisDataValueType.Average:
            return(previousAverage);

        case VisDataValueType.Median:
            return(previousMedian);

        case VisDataValueType.Sum:
            return(previousSum);

        case VisDataValueType.Minimum:
            return(previousMinimum);

        case VisDataValueType.Maximum:
            return(previousMaximum);
        }
    }
	/// <summary>
	/// This function resets this controller to default values 
	/// </summary>
	public override void Reset()
	{
		base.Reset();		
		
		subValueType = Defaults.subValueType;
		finalValueType = Defaults.finalValueType; 
	}
 /// <summary>
 /// This gets the value difference of this data group, based on the value types.
 /// </summary>
 /// <param name="finalValueType">
 /// This is the value type of the final part of this value. i.e.
 /// The maximum (finalValueType) of the average (subValueType) of all sub data groups.
 /// </param>
 /// <param name="subValueType">
 /// This is the value type of the sub data part of this value. i.e.
 /// The maximum (finalValueType) of the average (subValueType) of all sub data groups.
 /// </param>
 /// <returns>
 /// This is the final value that was requested.
 /// </returns>
 public float GetValueDifference(VisDataValueType finalValueType, VisDataValueType subValueType)
 {
     return(m_aoDataContainers[(int)subValueType].GetValueDifference(finalValueType));
 }
 /// <summary>
 /// This gets the previous value of this data group, based on the value types.
 /// </summary>
 /// <param name="finalValueType">
 /// This is the value type of the final part of this value. i.e.
 /// The maximum (finalValueType) of the average (subValueType) of all sub data groups.
 /// </param>
 /// <param name="subValueType">
 /// This is the value type of the sub data part of this value. i.e.
 /// The maximum (finalValueType) of the average (subValueType) of all sub data groups.
 /// </param>
 /// <returns>
 /// This is the final value that was requested
 /// </returns>
 public float GetPreviousValue(VisDataValueType finalValueType, VisDataValueType subValueType)
 {
     return(m_aoDataContainers[(int)subValueType].GetPreviousValue(finalValueType));
 }