private void DisplayFrame(MotionFrame frame)
{
if (!Dispatcher.CheckAccess())
{
Dispatcher.BeginInvoke((Action)delegate
{
DisplayFrame(frame);
});
return;
}
lastFrame = frame;
UpdateFrameViewer(frame);
UpdateCompressionSizes(frame);
CheckFPS();
txtFPS.Text = fps.ToString("F1");
}