Beispiel #1
0
        ContinuousCaptureSetting GetContinuousCaptureSetting()
        {
            var setting = new ContinuousCaptureSetting();

            setting.IntervalMilliseconds = (int)this.uxIntervalNumeric.Value * 1000;
            setting.LimitCount           = this.uxCountCheck.Checked ? (int)this.uxCountNumeric.Value : 0;
            setting.SkipDuplicatedImage  = this.uxSkipDuplicatedImageCheck.Checked;
            return(setting);
        }
Beispiel #2
0
        public static CaptureContext StartContinuousCapture(Device device, ContinuousCaptureSetting setting, Action <Bitmap> onCaptured, Action onFinished)
        {
            var instance = new CaptureContext();

            instance.Device           = device ?? throw new ArgumentNullException(nameof(device));
            instance.Mode             = CaptureMode.Continuous;
            instance.continousSetting = setting;
            instance.onCaptured       = onCaptured;
            instance.onFinished       = onFinished;
            instance.RunCapture();
            return(instance);
        }