private void Capture()
        {
            IntPtr bitsPtr;

            if (!CaptureService.Instance.Capture(_captureName, out bitsPtr))
            {
                return;
            }

            var bitmapPtr  = CaptureService.Instance.GetBitmapPtr(_captureName);
            var bitmapInfo = CaptureService.Instance.GetBitmapInfo(_captureName);

            CaptureDone.Invoke(_captureName, bitmapPtr, bitmapInfo);
        }
        private void Capture()
        {
            IntPtr bitsPtr;
            var    bitmapPtr  = CaptureService.Instance.GetBitmapPtr(_captureName);
            var    bitmapInfo = CaptureService.Instance.GetBitmapInfo(_captureName);

            if (!CaptureService.Instance.Capture(_captureName, out bitsPtr))
            {
                CaptureDone.Invoke(_captureName, bitmapPtr, bitmapInfo, false);
                return;
            }
            if (IsIconic(hptr))
            {
                CaptureDone.Invoke(_captureName, bitmapPtr, bitmapInfo, false);
                return;
            }
            CaptureDone.Invoke(_captureName, bitmapPtr, bitmapInfo, true);
        }