public TagImport(IHorsifySettings horsifySettings) { _songTagger = new SongTaggerId3(); _songTaggerTagLib = new SongTaggerTagLib(); _horsifyDataRepo = new HorsifyDataSqliteRepo(); _horsifySettings = horsifySettings; }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainWindowViewModel(IHorsifySettings horsifySettings, IHorsifyDbConnection horsifyDbConnection) : base(horsifySettings) { _horsifySettings.Load(); // Create the database if not exisitng. bool createdNewDatabase = horsifyDbConnection.InitDb(_horsifySettings.HorsifyPath).Result; if (createdNewDatabase) { System.Windows.MessageBox.Show($"Database Created."); } }
public FileMenuViewModel(IHorsifySettings horsifySettings, TagImportOption tagImportOption, IEventAggregator eventAggregator) : base(horsifySettings) { _eventAggregator = eventAggregator; TagImportOption = tagImportOption; //Commands ScanMusicCommand = new DelegateCommand(OnScanMusic, () => !_isScanRunning); StopScanMusicCommand = new DelegateCommand(OnStopScanMusic, () => _isScanRunning); //Listen for scan completed event and update commands _eventAggregator.GetEvent <ScanSongsEndedEvent>().Subscribe(() => { _isScanRunning = false; UpdateScanCommandsCanExecute(); }); }
public ImportViewModelBase(IHorsifySettings horsifySettings) { _horsifySettings = horsifySettings; }