System.Threading.Timer timerGetAlarms= new System.Threading.Timer(new System.Threading.TimerCallback(getAlarms), null, 1000, 10000);
private void getAlarms(object state)
{
timerGetAlarms.Dispose();
timerGetAlarms = null;
this.Dispatcher.BeginInvoke((Action)delegate()
{
_AlarmRecordsViewModel.GetAlarmRecords();
}
);
}