Esempio n. 1
0
 private void NotifyScreenChanged(BitmapContainer bitmapContainer)
 {
     if (this.ScreenCaptured != null)
     {
         this.ScreenCaptured(this, new GenericDataEventArgs <BitmapContainer>(bitmapContainer));
     }
 }
Esempio n. 2
0
        private CaptureService(IScreenCapture screenCapture, int timerInterval)
        {
            this.screenCapture = screenCapture;

            this.screenCaptureTimer          = new Timer();
            this.screenCaptureTimer.Interval = timerInterval;
            this.screenCaptureTimer.Elapsed += (sender, e) =>
            {
                BitmapContainer bitmapContainer = null;
                lock (this.bitmapLock)
                {
                    bitmapContainer = this.CaptureBitmap();
                }

                this.NotifyScreenChanged(bitmapContainer);
            };
        }