private void UpdateTimerElapsed(object sender, ElapsedEventArgs e)
{
_updateTimer.Stop();
foreach (Control c in _pnlCameras.Controls)
{
try
{
var cameraWindow = c as CameraWindow;
if (cameraWindow != null)
{
cameraWindow.Tick();
continue;
}
var volumeLevel = c as VolumeLevel;
if (volumeLevel != null)
{
volumeLevel.Tick();
continue;
}
var floorPlanControl = c as FloorPlanControl;
if (floorPlanControl != null)
{
FloorPlanControl fpc = floorPlanControl;
if (fpc.Fpobject.needsupdate)
{
fpc.NeedsRefresh = true;
fpc.Fpobject.needsupdate = false;
}
fpc.Tick();
}
}
catch (Exception ex)
{
Logger.LogExceptionToFile(ex);
}
}
if (!_shuttingDown)
_updateTimer.Start();
}