public FileSelectorViewModel(SessionViewModel session, IDialogService dialogService, IFileInfoService infoService)
 {
     _session                 = session;
     _dialogService           = dialogService;
     _infoService             = infoService;
     Files                    = new ObservableCollectionExt <FileSelectorItemViewModel>();
     Files.CollectionChanged += UpdateSession;
     AddFilesCommand          = new MvxCommand(OnAddFiles);
     ClearListCommand         = new MvxCommand(OnClearList);
     RemoveSelectedCommand    = new MvxCommand <FileSelectorItemViewModel>(OnRemoveSelected, CanRemoveSelected);
     FilesDragedinCommand     = new MvxCommand <string[]>(OnFilesDraggedIn);
     AddFolderCommand         = new MvxCommand(OnAddFolder);
     SortCommand              = new MvxCommand <int>(OnSort);
     InfoSelectedCommand      = new MvxCommand <FileSelectorItemViewModel>(OnInfo, CanGetInfo);
     AddArguments(Environment.GetCommandLineArgs());
 }
Пример #2
0
        public JobViewModel(SessionViewModel session,
                            IPresetBuilderService presetBuilderService,
                            IDialogService dialogService,
                            IErrorDisplayService errorDisplayService)
        {
            _fFmpegPath = string.Empty;
            _outputPath = string.Empty;

            _presetBuilderService = presetBuilderService;
            _dialogService        = dialogService;
            _errorDisplayService  = errorDisplayService;
            _session = session;
            Errors   = new ObservableCollectionExt <string>();
            _session.PropertyChanged += _session_PropertyChanged;
            FFmpegPath                = Settings.Default.FFmpegPath;
            OutputPath                = Settings.Default.OutputPath;
            FileHandlingMode          = (FileHandlingMode)Settings.Default.FileHandlingMode;
            PreviewCommand            = new MvxCommand(OnPreview);
            SaveCommand               = new MvxCommand(OnSave);
            ExecuteCommand            = new MvxCommand(OnExecute);
            BrowseFFmpegCommand       = new MvxCommand(OnBrowseFFmpeg);
            BrowseOutputFolderCommand = new MvxCommand(OnBrowseOutput);
        }