I am writting a dashboard application in Asp.net. When I load the main page I capture control settings and dynamically create gauges, charts, images, etc.. and load them to a cell in an HTML table. The data that will be fed to each control will update every 3 seconds. I currently store my gauges in a class called BoldGauge. Inside of that class there is a property for GaugeValue, that will need to be updated every 3 seconds. How can I loop through the class and change the values at runtime for each gauge that was created? My class looks like this:
public class BoldGauge
{
private ASPxGaugeControl m_Gauge;
private int m_GaugeTimer;
private string m_GaugeValue;
private string m_GaugeDataType;
private float m_GaugeMinValue;
private float m_GaugeMaxValue;
public BoldGauge(ASPxGaugeControl Gauge, string GaugeValue, string GaugeDataType, float GaugeMinValue, float GaugeMaxValue)
{
m_Gauge = Gauge;
m_GaugeValue = GaugeValue;
m_GaugeDataType = GaugeDataType;
m_GaugeMinValue = GaugeMinValue;
m_GaugeMaxValue = GaugeMaxValue;
}
public string GaugeValue
{
get
{
return m_GaugeValue;
}
set
{
m_GaugeValue = value;
}
}
public int GaugeTimer
{
get
{
return m_GaugeTimer;
}
set
{
m_GaugeTimer = value;
}
}
public string GaugeDataType
{
get
{
return m_GaugeDataType;
}
set
{
m_GaugeDataType = value;
}
}
public ASPxGaugeControl Gauge
{
get
{
return m_Gauge;
}
set
{
m_Gauge = value;
}
}
public float GaugeMinValue
{
get
{
return m_GaugeMinValue;
}
set
{
m_GaugeMinValue = value;
}
}
public float GaugeMaxValue
{
get
{
return m_GaugeMaxValue;
}
set
{
m_GaugeMaxValue = value;
}
}
}
On the main page I generate the new object Like this:
newBoldGauge = new BoldGauge(boldGaugeControl, gaugeValue, controlData, minimumGaugeValue, MaximumGaugeValue);
Thanks.