private void worker_OutputDataReady(object sender, BitmapReadyEventArgs e)
 {
     try
     {
         Dispatcher.Invoke((Action) delegate()
         {
             this.DrawImage2(e.Image);
             this.statsbarFps.Text = (((double)Utility.CalculateFrameRate() / 10)).ToString("0.00", CultureInfo.InvariantCulture) + " fps";
         });
     }
     catch (Exception)
     {
     }
 }
        private void kinectWorker_DataReady(object sender, BitmapReadyEventArgs e)
        {
#if TRACE
            this.Log().Debug("Event received from KinectWorker from thread " + Thread.CurrentThread.ManagedThreadId);
#endif
            try
            {
                Dispatcher.Invoke((Action) delegate()
                {
                    this.DrawImage(e.Image);
                    this.statsbarFps.Text = (((double)Utility.CalculateFrameRate() / 10)).ToString("0.00", CultureInfo.InvariantCulture) + " fps";
                });
            }
            catch (Exception)
            {
            }
        }