public SpotifySettingsPageModel(ILoadingIndicatorService loadingIndicator)
        {
            HeaderInfo = new HeaderInfo();
            HeaderInfo.Title = "Spotify";
            //HeaderInfo.IconUri = "pack://application:,,,/Torshify.Radio.Spotify;component/Resources/Spotify_Logo.png";

            _sections = new ObservableCollection<ISettingsSection>();
            _sections.Add(new SpotifyLoginSection(loadingIndicator));
        }
        public MainStationViewModel(
            ILoadingIndicatorService loadingIndicatorService,
            IRadio radio,
            IToastService toastService,
            ILoggerFacade logger,
            IDocumentStore documentStore)
        {
            _loadingIndicatorService = loadingIndicatorService;
            _radio = radio;
            _toastService = toastService;
            _logger = logger;
            _documentStore = documentStore;
            _fetchPreviewTimer = new Timer(1000);
            _fetchPreviewTimer.Elapsed += FetchPreviewTimerTick;
            _scheduler = TaskScheduler.FromCurrentSynchronizationContext();
            _styles = new ObservableCollection<TermModel>();
            _moods = new ObservableCollection<TermModel>();
            _selectedMoods = new ObservableCollection<TermModel>();
            _selectedMoods.CollectionChanged += (sender, args) =>
            {
                RaisePropertyChanged("SelectedMoodsText");
                _fetchPreviewTimer.Stop();
                _fetchPreviewTimer.Start();
            };

            _selectedStyles = new ObservableCollection<TermModel>();
            _selectedStyles.CollectionChanged += (sender, args) =>
            {
                RaisePropertyChanged("SelectedStylesText");
                _fetchPreviewTimer.Stop();
                _fetchPreviewTimer.Start();
            };

            ToggleStyleCommand = new StaticCommand<TermModel>(ExecuteToggleStyle);
            ToggleMoodCommand = new StaticCommand<TermModel>(ExecuteToggleMood);
            StartRadioCommand = new AutomaticCommand(ExecuteStartRadio, CanExecuteStartRadio);
            IncreaseBoostCommand = new StaticCommand<TermModel>(ExecuteIncreaseBoost);
            DecreaseBoostCommand = new StaticCommand<TermModel>(ExecuteDecreaseBoost);
            RequireTermCommand = new StaticCommand<TermModel>(ExecuteRequireTerm);
            BanTermCommand = new StaticCommand<TermModel>(ExecuteBanTerm);
            Tempo = new Range();
            Tempo.Rounding = MidpointRounding.ToEven;
            Tempo.RangeChanged += MetricChanged;
            Loudness = new Range();
            Loudness.RangeChanged += MetricChanged;
            Energy = new Range();
            Energy.RangeChanged += MetricChanged;
            ArtistFamiliarity = new Range();
            ArtistFamiliarity.RangeChanged += MetricChanged;
            ArtistHotness = new Range();
            ArtistHotness.RangeChanged += MetricChanged;
            SongHotness = new Range();
            SongHotness.RangeChanged += MetricChanged;
            Danceability = new Range();
            Danceability.RangeChanged += MetricChanged;
        }
        public SpotifyLoginSection(ILoadingIndicatorService loadingIndicator)
        {
            LoadingIndicator = loadingIndicator;
            HeaderInfo = new HeaderInfo
            {
                Title = "Login details"
            };

            UI = new SpotifyLoginSectionView
            {
                Model = this
            };

            LogOutCommand = new AutomaticCommand(ExecuteLogOut, CanExecuteLogOut);
        }
        public HotArtistsViewModel(
            IRadio radio,
            IToastService toastService,
            ILoadingIndicatorService loadingIndicator,
            ILoggerFacade logger,
            Dispatcher dispatcher)
        {
            _radio = radio;
            _toastService = toastService;
            _loadingIndicator = loadingIndicator;
            _logger = logger;
            _dispatcher = dispatcher;
            _artists = new ObservableCollection<HotArtistModel>();

            PlayAllTracksCommand = new DelegateCommand(ExecutePlayAllTracks);
            PlayTopTrackCommand = new DelegateCommand<HotArtistModel>(ExecutePlayTopTrack);
            QueueTopTrackCommand = new DelegateCommand<HotArtistModel>(ExecuteQueueTopTrack);
        }
 public CoreRadio(
     [Import("CorePlayer")]ITrackPlayer corePlayer,
     IDocumentStore documentStore,
     ILoadingIndicatorService loadingIndicatorService,
     IToastService toastService,
     ILoggerFacade logger,
     Dispatcher dispatcher)
 {
     _trackQueuePublic = new ObservableCollection<Track>();
     _trackStreamQueuePublic = new ObservableCollection<ITrackStream>();
     _trackStreamQueue = new ConcurrentQueue<ITrackStream>();
     _trackQueue = new ConcurrentQueue<Track>();
     _corePlayer = corePlayer;
     _documentStore = documentStore;
     _loadingIndicatorService = loadingIndicatorService;
     _toastService = toastService;
     _logger = logger;
     _dispatcher = dispatcher;
     _corePlayer.Volume = 0.2;
     _corePlayer.TrackComplete += OnTrackComplete;
     _corePlayer.Initialize();
 }
 public void Setup()
 {
     _indicatorService = new LoadingIndicatorService();
 }