コード例 #1
0
 /// <summary>
 /// Restarts the screen capturing.
 /// </summary>
 void RestartCapturing()
 {
     if (ScreenObserver != null)
     {
         ScreenObserver.Start();
     }
     else
     {
         setCaptureArea();
     }
 }
コード例 #2
0
        /// <summary>
        /// Starts the screen capturing and register for the event.
        /// </summary>
        void setCaptureArea()
        {
            if (ScreenObserver == null)
            {
                ScreenObserver = new ScreenObserver(blinkTimer.timer, 1);

                // so_Changed event handles the rendering of the bitmap
                try { ScreenObserver.Changed -= new ScreenObserver.CaptureChangedEventHandler(so_Changed); }
                catch (Exception) { }
                ScreenObserver.Changed += new ScreenObserver.CaptureChangedEventHandler(so_Changed);
            }
            ScreenObserver.Start();
        }