示例#1
0
        public PlaybackStreamViewModel(IScreenCapturer screenCapturer,
                                       IWindowManager windowManager,
                                       IActiveProfileProvider activeProfileProvider)
        {
            _screenCapturer = screenCapturer;
            _windowManager = windowManager;
            _activeProfileProvider = activeProfileProvider;

            _activeProfileProvider.ActiveProfileChanged += ChangeProfile;

            _screenCapturer.CaptureRegionResolver = () => _activeProfile != null
                                                              ? _activeProfile.CaptureRegion
                                                              : new ScreenRegion();
            _screenCapturer.CapturesPerSecondResolver = () => _activeProfile != null
                                                                  ? _activeProfile.CPS
                                                                  : 25;
            _screenCapturer.ScreenCaptured += (sender, args) => { CapturedImage = args.CapturedImage; };

            CanShow = true;
        }
 public CaptureRegionSettingsViewModel(IActiveProfileProvider activeProfileProvider)
 {
     _activeProfileProvider = activeProfileProvider;
 }