Exemplo n.º 1
0
        public override void Init()
        {
            base.Init();

            _mediaDeviceService    = GlobalContext.GetServices <IMediaDeviceService>().First();
            _bitmapDownloadService = GlobalContext.GetServices <IBitmapDownloadService>().First();
        }
Exemplo n.º 2
0
        public override void Init()
        {
            base.Init();

            _processService        = GlobalContext.GetServices <IProcessService>().First();
            _bitmapDownloadService = GlobalContext.GetServices <IBitmapDownloadService>().First();
        }
Exemplo n.º 3
0
        internal JsonApi(IBitmapDownloadService bitmapDownloadService)
        {
            _bitmapDownloadService = bitmapDownloadService;
            _jsonApiDirectory      = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), JsonSubdirectory);
            _playbackFilePath      = Path.Combine(_jsonApiDirectory, JsonApiFile);

            _updateSync = new AsyncAutoResetEvent();

            _updateTask = UpdateAction();
        }
Exemplo n.º 4
0
Arquivo: Song.cs Projeto: tihilv/Vkm
 internal async Task <PlayingInfo> ToPlayingInfo(IBitmapDownloadService bitmapDownloader)
 {
     return(new PlayingInfo(Song.Title, Song.Artist, Song.Album, await bitmapDownloader.GetBitmap(Song.AlbumArt), Playing, TimeSpan.FromSeconds(Time.Total), TimeSpan.FromSeconds(Time.Current)));
 }
Exemplo n.º 5
0
 public void InitContext(GlobalContext context)
 {
     _bitmapDownloadService = context.GetServices <IBitmapDownloadService>().FirstOrDefault();
 }