예제 #1
0
        public void Tick(string text)
        {
            long now;

            QueryPerformanceCounter(out now);
            fps++;
            if (now - last > freq) // update every second
            {
                last = now;
                form.UpdateStatus(text + " FPS=" + fps);
                fps = 0;
            }
        }
예제 #2
0
 private bool DisplayDeviceConnection(bool state)
 {
     if (state)
     {
         if (!disconnected)
         {
             form.UpdateStatus("Device Disconnected");
         }
         disconnected = true;
     }
     else
     {
         if (disconnected)
         {
             form.UpdateStatus("Device Reconnected");
         }
         disconnected = false;
     }
     return(disconnected);
 }