public CategoryListViewModel(IThemeService themeService,
            IRssReader rssReader,
            IAsyncDownloadManager downloadManager,
            INavigationService navigationService,
            ILockscreenHelper lockscreen,
            IDownloadHelper downloadHelper)
        {
            _themeService = themeService;
            _rssReader = rssReader;
            _downloadManager = downloadManager;
            _navigationService = navigationService;
            _lockscreen = lockscreen;
            _downloadHelper = downloadHelper;

            AddMorePicturesCommand = Items.CountChanged
                                          .Select(_ => Items.Count < imageMetaData.Count())
                                          .ToCommand();

            AddMorePicturesCommand
                .RegisterAsyncTask(value => GetImages((int)value));

            FullScreenCommand = new ReactiveCommand();

            SetLockScreenCommand = new ReactiveCommand();
            SetLockScreenCommand
                .RegisterAsyncTask(value => SetLockscreen(value as CategoryItem));

            DownloadImageCommand = new ReactiveCommand();
            DownloadImageCommand
                .RegisterAsyncTask(value => DownloadImage(value as CategoryItem));
        }
        public Form1(IThemeService themeService, IPaperWallRssParser paperWallRssParser, IImageFilter imageFilter, IAsyncDownloadManager asyncDownloadManager)
        {
            this._themeService = themeService;
            this._paperWallRssParser = paperWallRssParser;
            this._imageFilter = imageFilter;
            this._downloadManager = asyncDownloadManager;
            Init();
            DownloadTimer_Tick(this, null);
            


        }
        public ImageDetailsViewModel(IThemeService themeService,
            IRssReader rssReader,
            IAsyncDownloadManager downloadManager)
        {
            _themeService = themeService;
            _rssReader = rssReader;
            _downloadManager = downloadManager;

            OnActivatedCommand = new ReactiveCommand();
            OnActivatedCommand.RegisterAsyncTask(_ =>   OnActivated());

            SetLockscreenCommand = new ReactiveCommand();
            SetLockscreenCommand.RegisterAsyncTask(_ => SetLockscreen());

            DownloadPhotoCommand = new ReactiveCommand();
            DownloadPhotoCommand.RegisterAsyncTask(_ => DownloadPhoto());
        }
        public MainPageViewModel(IThemeService themeService,
            IRssReader rssReader,
            IAsyncDownloadManager downloadManager,
            INavigationService navigationService,
            ILockscreenHelper lockscreenHelper,
            INotificationService notificationService)
        {
            _themeService = themeService;
            _rssReader = rssReader;
            _downloadManager = downloadManager;
            _navigationService = navigationService;
            _lockscreenHelper = lockscreenHelper;


            this._notificationService = notificationService;
            this.ObservableForProperty(vm => vm.SelectedCategory).Select(_ => _.GetValue()).Subscribe(NavigateToCategoryList);
            this.ObservableForProperty(vm => vm.SelectedTop4).Select(_ => _.GetValue()).Where(v => v != null).Subscribe(Top4Selected);
        }
        public CategoryListViewModel(IThemeService themeService,
            IRssReader rssReader,
            IAsyncDownloadManager downloadManager,
            INavigationService navigationService)
        {
            this.themeService = themeService;
            this.rssReader = rssReader;
            this.downloadManager = downloadManager;
            this.navigationService = navigationService;

            OnActivateCommand = new ReactiveCommand();
            OnActivateCommand.RegisterAsyncTask(_ => GetImages());
            CategoryItemCommand = new ReactiveCommand();
            CategoryItemCommand.Subscribe(item => 
                {
                    var categoryItem = item as CategoryItem;
                    navigationService
                        .UriFor<ImageDetailsViewModel>()
                        .WithParam(x => x.Category, Category)
                        .WithParam(x => x.Id, categoryItem.Id)
                        .Navigate();
                });
        }
        public HubViewModel(IThemeService themeService,
            IRssReader rssReader,
            IAsyncDownloadManager downloadManager,
            INavigationService navigationService)
        {
            _themeService = themeService;
            _rssReader = rssReader;
            _downloadManager = downloadManager;
            _navigationService = navigationService;

            OnActivateCommand = new ReactiveCommand();
            OnActivateCommand.RegisterAsyncTask(_ => OnActivateWork());

            WallpaperOfTheDayCommand = new ReactiveCommand();
            WallpaperOfTheDayCommand.Subscribe(NavigateToDetailsForWallpaperOfTheDay);
            Top4Command = new ReactiveCommand();
            Top4Command.Subscribe(NavigateToDetailsForTop4Item);
            CategoryCommand = new ReactiveCommand();
            CategoryCommand.Subscribe(NavigateToCategoryList);
            //BlobCache.LocalMachine.Dispose();
            this.updater = TileUpdateManager.CreateTileUpdaterForApplication();
            updater.EnableNotificationQueue(true);
        }
 public NotificationService(IAsyncDownloadManager downloadManager)
 {
     this.downloadManager = downloadManager;
 }