Exemple #1
0
        public RecordingModel(Settings Settings,
                              ILocalizationProvider Loc,
                              ISystemTray SystemTray,
                              WebcamOverlay WebcamOverlay,
                              IPreviewWindow PreviewWindow,
                              IAudioSource AudioSource,
                              WebcamModel WebcamModel,
                              KeymapViewModel Keymap,
                              TimerModel TimerModel,
                              IMessageProvider MessageProvider,
                              IFFmpegViewsProvider FFmpegViewsProvider) : base(Settings, Loc)
        {
            _systemTray          = SystemTray;
            _webcamOverlay       = WebcamOverlay;
            _previewWindow       = PreviewWindow;
            _audioSource         = AudioSource;
            _webcamModel         = WebcamModel;
            _keymap              = Keymap;
            _timerModel          = TimerModel;
            _messageProvider     = MessageProvider;
            _ffmpegViewsProvider = FFmpegViewsProvider;

            SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;

            TimerModel.CountdownElapsed += InternalStartRecording;
        }
        public RecordingViewModel(Settings Settings,
                                  LanguageManager LanguageManager,
                                  ISystemTray SystemTray,
                                  IRegionProvider RegionProvider,
                                  WebcamOverlay WebcamOverlay,
                                  IMainWindow MainWindow,
                                  IPreviewWindow PreviewWindow,
                                  VideoSourcesViewModel VideoSourcesViewModel,
                                  VideoWritersViewModel VideoWritersViewModel,
                                  AudioSource AudioSource,
                                  IWebCamProvider WebCamProvider,
                                  KeymapViewModel Keymap,
                                  IAudioPlayer AudioPlayer,
                                  IRecentList RecentList) : base(Settings, LanguageManager)
        {
            _systemTray            = SystemTray;
            _regionProvider        = RegionProvider;
            _webcamOverlay         = WebcamOverlay;
            _mainWindow            = MainWindow;
            _previewWindow         = PreviewWindow;
            _videoSourcesViewModel = VideoSourcesViewModel;
            _videoWritersViewModel = VideoWritersViewModel;
            _audioSource           = AudioSource;
            _webCamProvider        = WebCamProvider;
            _keymap      = Keymap;
            _audioPlayer = AudioPlayer;
            _recentList  = RecentList;

            RecordCommand = new DelegateCommand(OnRecordExecute);

            PauseCommand = new DelegateCommand(OnPauseExecute, false);

            SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;
        }
Exemple #3
0
 public KeyModifiedStep(KeystrokesSettings Settings,
                        KeymapViewModel Keymap)
 {
     _keymap             = Keymap;
     _keystrokesSettings = Settings;
     _modifierStates     = ModifierStates.GetCurrent();
 }
Exemple #4
0
 public MouseDragStep(Point EndPoint,
                      MouseClickSettings Settings,
                      KeystrokesSettings KeystrokesSettings,
                      KeymapViewModel Keymap) : base(KeystrokesSettings, Keymap)
 {
     this.EndPoint = EndPoint;
     _settings     = Settings;
 }
 public MouseDragBeginStep(Point StartPoint,
                           MouseClickSettings Settings,
                           KeystrokesSettings KeystrokesSettings,
                           KeymapViewModel Keymap) : base(KeystrokesSettings, Keymap)
 {
     _start    = StartPoint;
     _settings = Settings;
 }
Exemple #6
0
        public ScrollStep(MouseEventArgs Args,
                          MouseClickSettings Settings,
                          KeystrokesSettings KeystrokesSettings,
                          KeymapViewModel Keymap) : base(KeystrokesSettings, Keymap)
        {
            this.Args = Args;

            _settings = Settings;
        }
Exemple #7
0
        public MouseClickStep(MouseClickSettings Settings,
                              KeystrokesSettings KeystrokesSettings,
                              MouseEventArgs Args,
                              KeymapViewModel Keymap) : base(KeystrokesSettings, Keymap)
        {
            _settings = Settings;
            this.Args = Args;

            Timestamp = DateTime.Now;
        }
Exemple #8
0
        public KeyRecord(KeyEventArgs keyEventArgs, KeymapViewModel keymap)
        {
            _keymap    = keymap;
            _eventArgs = keyEventArgs;
            TimeStamp  = DateTime.Now;

            Key     = keyEventArgs.KeyCode;
            Control = keyEventArgs.Control;
            Shift   = keyEventArgs.Shift;
            Alt     = keyEventArgs.Alt;

            _capsLock = Console.CapsLock;

            Display = GetDisplay();
        }
Exemple #9
0
        public RecordingModel(Settings Settings,
                              ILocalizationProvider Loc,
                              ISystemTray SystemTray,
                              WebcamOverlay WebcamOverlay,
                              IMainWindow MainWindow,
                              IPreviewWindow PreviewWindow,
                              VideoSourcesViewModel VideoSourcesViewModel,
                              VideoWritersViewModel VideoWritersViewModel,
                              AudioSource AudioSource,
                              WebcamModel WebcamModel,
                              KeymapViewModel Keymap,
                              IAudioPlayer AudioPlayer,
                              IRecentList RecentList,
                              TimerModel TimerModel,
                              IMessageProvider MessageProvider,
                              IFFmpegViewsProvider FFmpegViewsProvider) : base(Settings, Loc)
        {
            _systemTray            = SystemTray;
            _webcamOverlay         = WebcamOverlay;
            _mainWindow            = MainWindow;
            _previewWindow         = PreviewWindow;
            _videoSourcesViewModel = VideoSourcesViewModel;
            _videoWritersViewModel = VideoWritersViewModel;
            _audioSource           = AudioSource;
            _webcamModel           = WebcamModel;
            _keymap              = Keymap;
            _audioPlayer         = AudioPlayer;
            _recentList          = RecentList;
            _timerModel          = TimerModel;
            _messageProvider     = MessageProvider;
            _ffmpegViewsProvider = FFmpegViewsProvider;

            SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;

            TimerModel.CountdownElapsed += InternalStartRecording;
            TimerModel.DurationElapsed  += async() =>
            {
                if (_syncContext != null)
                {
                    _syncContext.Post(async State => await StopRecording(), null);
                }
                else
                {
                    await StopRecording();
                }
            };
        }
Exemple #10
0
        public RecordingModel(Settings.Settings settings,
                              LanguageManager languageManager,
                              ISystemTray systemTray,
                              IRegionProvider regionProvider,
                              WebCamOverlay webcamOverlay,
                              IMainWindow mainWindow,
                              IPreviewWindow previewWindow,
                              VideoSourcesViewModel videoSourcesViewModel,
                              VideoWritersViewModel videoWritersViewModel,
                              AudioSource audioSource,
                              IWebCamProvider webCamProvider,
                              KeymapViewModel keymap,
                              IAudioPlayer audioPlayer,
                              IRecentList recentList,
                              TimerModel timerModel) : base(settings, languageManager)
        {
            _systemTray            = systemTray;
            _regionProvider        = regionProvider;
            _webcamOverlay         = webcamOverlay;
            _mainWindow            = mainWindow;
            _previewWindow         = previewWindow;
            _videoSourcesViewModel = videoSourcesViewModel;
            _videoWritersViewModel = videoWritersViewModel;
            _audioSource           = audioSource;
            _webCamProvider        = webCamProvider;
            _keymap      = keymap;
            _audioPlayer = audioPlayer;
            _recentList  = recentList;
            _timerModel  = timerModel;

            SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;

            timerModel.CountdownElapsed += InternalStartRecording;
            timerModel.DurationElapsed  += async() =>
            {
                if (_syncContext != null)
                {
                    _syncContext.Post(async state => await StopRecording(), null);
                }
                else
                {
                    await StopRecording();
                }
            };
        }
Exemple #11
0
        public RecordingModel(Settings Settings,
                              ISystemTray SystemTray,
                              IPreviewWindow PreviewWindow,
                              IAudioSource AudioSource,
                              KeymapViewModel Keymap,
                              TimerModel TimerModel,
                              IFpsManager FpsManager) : base(Settings)
        {
            _systemTray    = SystemTray;
            _previewWindow = PreviewWindow;
            _audioSource   = AudioSource;
            _keymap        = Keymap;
            _timerModel    = TimerModel;
            _fpsManager    = FpsManager;

            SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;

            TimerModel.CountdownElapsed += InternalStartRecording;
        }
Exemple #12
0
        public StepsRecorder(IMouseKeyHook Hook,
                             IVideoFileWriter VideoWriter,
                             IImageProvider ImageProvider,
                             MouseClickSettings MouseClickSettings,
                             KeystrokesSettings KeystrokesSettings,
                             StepsSettings StepsSettings,
                             KeymapViewModel KeymapViewModel)
        {
            _hook               = Hook;
            _videoWriter        = VideoWriter;
            _imageProvider      = ImageProvider;
            _stepsSettings      = StepsSettings;
            _mouseClickSettings = MouseClickSettings;
            _keystrokesSettings = KeystrokesSettings;
            _keymap             = KeymapViewModel;

            var stepsObservable = Observe(_hook, _cancellationTokenSource.Token, out var shotObservable);

            _recordTask = Task.Factory.StartNew(() => DoRecord(stepsObservable, shotObservable), TaskCreationOptions.LongRunning);
        }
Exemple #13
0
        public RecordingViewModel(Settings Settings,
                                  LanguageManager LanguageManager,
                                  CustomOverlaysViewModel CustomOverlays,
                                  CustomImageOverlaysViewModel CustomImageOverlays,
                                  CensorOverlaysViewModel CensorOverlays,
                                  ISystemTray SystemTray,
                                  IRegionProvider RegionProvider,
                                  WebcamOverlay WebcamOverlay,
                                  IMainWindow MainWindow,
                                  IPreviewWindow PreviewWindow,
                                  VideoViewModel VideoViewModel,
                                  AudioSource AudioSource,
                                  RecentViewModel RecentViewModel,
                                  IWebCamProvider WebCamProvider,
                                  KeymapViewModel Keymap,
                                  IAudioPlayer AudioPlayer,
                                  IIconSet Icons) : base(Settings, LanguageManager)
        {
            this.CustomOverlays      = CustomOverlays;
            this.CustomImageOverlays = CustomImageOverlays;
            this.CensorOverlays      = CensorOverlays;
            _systemTray      = SystemTray;
            _regionProvider  = RegionProvider;
            _webcamOverlay   = WebcamOverlay;
            _mainWindow      = MainWindow;
            _previewWindow   = PreviewWindow;
            _videoViewModel  = VideoViewModel;
            _audioSource     = AudioSource;
            _recentViewModel = RecentViewModel;
            _webCamProvider  = WebCamProvider;
            _keymap          = Keymap;
            _audioPlayer     = AudioPlayer;
            _icons           = Icons;

            RecordCommand = new DelegateCommand(OnRecordExecute);

            PauseCommand = new DelegateCommand(OnPauseExecute, false);

            SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;
        }