Example #1
0
        public override void Init()
        {
            base.Init();

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

            _processService        = GlobalContext.GetServices <IProcessService>().First();
            _bitmapDownloadService = GlobalContext.GetServices <IBitmapDownloadService>().First();
        }
Example #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();
        }
Example #4
0
File: Song.cs Project: 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)));
 }
Example #5
0
 public void InitContext(GlobalContext context)
 {
     _bitmapDownloadService = context.GetServices <IBitmapDownloadService>().FirstOrDefault();
 }