예제 #1
0
 public MainViewModel()
 {
     MusicDataManager = new MusicDataManager();
     MusicDataManager.MusicManager.AudioEngine.ErrorOccurred += AudioEngine_ErrorOccurred;
     Application.Current.MainWindow.Closing += MainWindow_Closing;
     NotificationManager = new NotificationManager();
     _viewController = new ViewController(OpenArtist);
 }
예제 #2
0
 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;
     }
 }
예제 #3
0
        public Task Load(MusicDataManager musicDataManager, ViewController viewController, NotificationManager notificationManager)
        {
            if (IsLoaded)
                return TaskExtensions.CompletedTask;

            MusicDataManager = musicDataManager;
            ViewController = viewController;
            NotificationManager = notificationManager;
            IsLoaded = true;
            return Load();
        }