/// <summary> /// start capturing /// </summary> public void StartCapture() { Rectangle rctDeskTop = SmartBoundaryDetection.GetDesktopBounds(); _imageCaptureCursor = new ImageCaptureCursor(); var cursor = _imageCaptureCursor.GetCursor(); _wCapture = new ImageCaptureWindow(rctDeskTop, _areaSelection); _wCapture.Cursor = cursor; _wCapture.NotifyCapturingDone += OnScreenCapturingDoneNotify; _wCapture.NotifyCapturingCancel += OnScreenCapturingCancelNotify; _wCapture.Show(); }
protected virtual void Dispose(bool disposing) { if (disposing) { if (_wCapture != null) { _wCapture.Close(); _wCapture = null; } if (_imageCaptureCursor != null) { _imageCaptureCursor.Dispose(); _imageCaptureCursor = null; } } }