public void StartHardwareScan()
{
//This scan hardware will pull the data from the hardware and the weather station value.
/*
Steps : 1.calculate pull the data form the hardware and store it to the database .==>This will be node1
2. Pull the data form the openweatherstation.org store the data to db ==>This will be node2
3. now plot these to nodes
4. Update the data of node one and node2
5. Replot the data again and agin in interval of 4 seconds.
*/
//pulls the data form hardware
//This is initial pulls
// ReadDataFromDevice();
// try {
//First time click the refresh...
if (flagForTimer == 1)
{
atimer.Stop();
atimer.Elapsed -= timer1_Tick_For_Device;
atimer.Dispose();
flagForTimer = 0;//This should not be done
}
RefreshDataFromDeviceAndWeb();
//AsyncMethod1ForPullingData();
//initializes the timer
InitTimerForDevice();
//}catch(Exception ex)
//{
// MessageBox.Show("error :"+ex.Message);
//}
}