예제 #1
0
        public Bitmap Capture()
        {
            if (_dupl == null)
            {
                _dupl = new DesktopDuplicator(_rectangle, _includeCursor, _monitor);
            }

            try
            {
                return(_dupl.Capture());
            }
            catch
            {
                _dupl?.Dispose();

                _dupl = new DesktopDuplicator(_rectangle, _includeCursor, _monitor);

                try
                {
                    return(_dupl.Capture());
                }
                catch
                {
                    return(new Bitmap(Width, Height));
                }
            }
        }
예제 #2
0
        public Bitmap Capture()
        {
            try
            {
                return(_dupl.Capture());
            }
            catch
            {
                Reinit();

                try
                {
                    return(_dupl.Capture());
                }
                catch
                {
                    return(new Bitmap(Width, Height));
                }
            }
        }
예제 #3
0
        public IBitmapFrame Capture()
        {
            try
            {
                return(_dupl.Capture());
            }
            catch
            {
                Reinit();

                try
                {
                    return(_dupl.Capture());
                }
                catch
                {
                    return(new OneTimeFrame(new Bitmap(Width, Height)));
                }
            }
        }
예제 #4
0
        public IBitmapFrame Capture()
        {
            try
            {
                return(_dupl.Capture());
            }
            catch
            {
                try { Reinit(); }
                catch
                {
                    return(RepeatFrame.Instance);
                }

                try
                {
                    return(_dupl.Capture());
                }
                catch
                {
                    return(new OneTimeFrame(new Bitmap(Width, Height)));
                }
            }
        }
예제 #5
0
        public Bitmap Capture()
        {
            try
            {
                return(_dupl.Capture());
            }
            catch
            {
                try
                {
                    _dupl?.Dispose();

                    _dupl = new DesktopDuplicator(WindowProvider.DesktopRectangle, _includeCursor, _monitor);

                    return(_dupl.Capture());
                }
                catch
                {
                    return(new Bitmap(Width, Height));
                }
            }
        }
예제 #6
0
 public IEditableFrame Capture()
 {
     return(_dupl.Capture());
 }
예제 #7
0
 public IBitmapFrame Capture()
 {
     return(_dupl.Capture());
 }