public SettingsViewModel(IFileService fileService, IDialogService dialogService, IThemeResolver themeResolver, IDownloadOptionProvider optionProvider, IUpdateChecker updateChecker, YtdlUpdateService ytdlUpdateService) { this.FileService = fileService; this.dialogService = dialogService; this.themeResolver = themeResolver; this.updateChecker = updateChecker; this.YoutubeDLUpdateService = ytdlUpdateService; DefaultFormats = new ObservableCollection <IDownloadOption>(optionProvider.CreateDownloadOptions()); SwitchAppThemeCommand = new RelayCommand(() => SwitchAppTheme()); UpdateVividlCommand = new RelayCommand(() => UpdateVividl()); UpdateYoutubeDLCommand = new RelayCommand(async() => await UpdateYoutubeDL()); }
public SettingsViewModel(IFileService fileService, IDialogService dialogService, IThemeResolver themeResolver, IDownloadOptionProvider optionProvider) { this.FileService = fileService; this.dialogService = dialogService; this.themeResolver = themeResolver; this.updateChecker = SimpleIoc.Default.GetInstance <IUpdateChecker>(); DefaultFormats = new ObservableCollection <IDownloadOption>(optionProvider.CreateDownloadOptions()); SwitchAppThemeCommand = new RelayCommand(() => SwitchAppTheme()); var ydl = SimpleIoc.Default.GetInstance <YoutubeDLSharp.YoutubeDL>(); YoutubeDLUpdateService = new YtdlUpdateService(ydl); UpdateVividlCommand = new RelayCommand(() => UpdateVividl()); UpdateYoutubeDLCommand = new RelayCommand(async() => await UpdateYoutubeDL()); }