示例#1
0
        private void SetCurrentEngine(CaptureMethod method)
        {
            var oldEngine = currentCaptureEngine;

            switch (method)
            {
            case CaptureMethod.AutoDetect:
            case CaptureMethod.BitBlt:
            case CaptureMethod.Wdm:
            case CaptureMethod.DirectX:
                currentCaptureEngine = autoCaptureEngine;
                break;

            case CaptureMethod.Log:
                currentCaptureEngine = logCaptureEngine;
                break;
            }

            if (oldEngine != currentCaptureEngine &&
                oldEngine.IsRunning)
            {
                oldEngine.Stop();
                currentCaptureEngine.StartAsync();
            }
        }
示例#2
0
        /// <summary>
        ///     Handles the message.
        /// </summary>
        /// <param name="message">The message.</param>
        public void Handle(ShellReady message)
        {
            bool autoStart;

            using (var reg = new EngineRegistrySettings())
            {
                captureEngine.CaptureMethod = reg.CaptureMethod;
                captureEngine.Speed         = reg.Speed;
                autoStart = reg.AutoStart;
            }

            if (autoStart)
            {
                captureEngine.StartAsync();
            }
        }
示例#3
0
 public void StartEngine()
 {
     IsStarting = true;
     _captureEngine.StartAsync();
 }
        private void SetCurrentEngine(CaptureMethod method)
        {
            var oldEngine = currentCaptureEngine;
            switch (method)
            {
                case CaptureMethod.AutoDetect:
                case CaptureMethod.BitBlt:
                case CaptureMethod.Wdm:
                case CaptureMethod.DirectX:
                    currentCaptureEngine = autoCaptureEngine;
                    break;
                case CaptureMethod.Log:
                    currentCaptureEngine = logCaptureEngine;
                    break;
            }

            if (oldEngine != currentCaptureEngine
                && oldEngine.IsRunning)
            {
                oldEngine.Stop();
                currentCaptureEngine.StartAsync();
            }
        }
示例#5
0
 public void StartEngine()
 {
     captureEngine.StartAsync();
 }
示例#6
0
 public Task StartAsync()
 {
     return(currentCaptureEngine.StartAsync());
 }