Exemplo 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);
 }
Exemplo 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;
     }
 }
Exemplo 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();
        }
Exemplo 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();
        }
Exemplo n.º 5
0
 public TrackImporter(MusicDataManager musicDataManager)
 {
     _musicDataManager = musicDataManager;
 }
Exemplo n.º 6
0
 public TrackImporter(MusicDataManager musicDataManager)
 {
     _musicDataManager = musicDataManager;
 }