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 ScreenCapturer(int screenIndex)
        {
            this.screenIndex = screenIndex;

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

                this.NotifyScreenChanged(bitmapContainer);
            };

            this.mouseCaptureTimer          = new Timer();
            this.mouseCaptureTimer.Interval = MOUSE_CAPTURE_INTERVAL;
            this.mouseCaptureTimer.Elapsed += (sender, e) =>
            {
                var bitmapContainer = this.CaptureMouse();

                this.NotifyScreenChanged(bitmapContainer);
            };
        }
Esempio n. 3
0
 public IBitmapContainer AddBitmapContainer(string filename, int x, int y)
 {
     BitmapContainer bitmapContainer = new BitmapContainer(this);
     bitmapContainer.Load(filename);
     bitmapContainer.Left = x;
     bitmapContainer.Top = y;
     AddElement(bitmapContainer);
     return bitmapContainer;
 }
Esempio n. 4
0
 public IBitmapContainer AddBitmapContainer(Bitmap bitmap, int x, int y)
 {
     BitmapContainer bitmapContainer = new BitmapContainer(this);
     bitmapContainer.Bitmap = bitmap;
     bitmapContainer.Left = x;
     bitmapContainer.Top = y;
     AddElement(bitmapContainer);
     return bitmapContainer;
 }