public MainViewModel() { MusicDataManager = new MusicDataManager(); MusicDataManager.MusicManager.AudioEngine.ErrorOccurred += AudioEngine_ErrorOccurred; Application.Current.MainWindow.Closing += MainWindow_Closing; NotificationManager = new NotificationManager(); _viewController = new ViewController(OpenArtist); }
public async Task Load(MusicDataManager musicDataManager, ViewController viewController, NotificationManager notificationManager) { if (!_isLoaded) { _viewController = viewController; _musicDataManager = musicDataManager; await _musicDataManager.LastfmApi.SetAdvancedInfoAboutArtist(Artist, CultureInfo.CurrentCulture); _isLoaded = true; } }
public Task Load(MusicDataManager musicDataManager, ViewController viewController, NotificationManager notificationManager) { if (IsLoaded) return TaskExtensions.CompletedTask; MusicDataManager = musicDataManager; ViewController = viewController; NotificationManager = notificationManager; IsLoaded = true; return Load(); }