public MainViewModel(IDialogService dialogService, IPresetReaderService presetReaderService, IPresetRenderService presetRenderService, IPresetBuilderService presetBuilderService, IErrorDisplayService errorDisplayService, IToolService toolService, IFileInfoService fileInfoService) { Session = new SessionViewModel(); FileSelectorVM = new FileSelectorViewModel(Session, dialogService, fileInfoService); PresetSelectorVM = new PresetSelectorViewModel(Session, presetReaderService, presetRenderService); JobVM = new JobViewModel(Session, presetBuilderService, dialogService, errorDisplayService); ToolsVM = new ToolsViewModel(toolService); GetFFmpegCommand = new MvxCommand(OnGetFFmpeg); OpenCloseToolFlyoutCommand = new MvxCommand(OnOpenCloseFlyout); }
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); }