Esempio n. 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);
 }
Esempio n. 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;
     }
 }
Esempio n. 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();
        }
Esempio n. 4
0
        public SettingsViewModel(MusicDataManager musicDataManager, Action refreshViewAction)
        {
            MusicDataManager = musicDataManager;
            _refreshViewAction = refreshViewAction;

            SelectedSoundOutDevice = musicDataManager.MusicManager.AudioEngine.SoundOutProvider.CurrentSoundOutDevice;
            AccentColors =
                ThemeManager.Accents.Select(
                    x => new AccentColorData {ColorBrush = x.Resources["AccentColorBrush"] as Brush, Key = x.Name, AccentColor = x})
                    .ToList();
            Themes = ThemeManager.AppThemes.Select(x => new ThemeData {Key = x.Name, Theme = x}).ToList();

            SelectedTheme = Themes.FirstOrDefault(x => x.Key == _settings.Theme) ?? Themes.First();
            SelectedAccentColor = AccentColors.FirstOrDefault(x => x.Key == _settings.AccentColor) ??
                                   AccentColors.First();
        }
Esempio n. 5
0
 public TrackImporter(MusicDataManager musicDataManager)
 {
     _musicDataManager = musicDataManager;
 }
Esempio n. 6
0
 public TrackImporter(MusicDataManager musicDataManager)
 {
     _musicDataManager = musicDataManager;
 }