public MainViewModel(ILeanCloudWallpaperService leanCloudWallpaperService, IBingoWallpaperSettings settings, IAppToastService appToastService) { _leanCloudWallpaperService = leanCloudWallpaperService; _settings = settings; _appToastService = appToastService; var wallpaperCollections = new List <WallpaperCollection>(); var date = Constants.MinimumViewMonth; while (date < DateTimeOffset.Now) { wallpaperCollections.Add(new WallpaperCollection(date.Year, date.Month)); date = date.AddMonths(1); } WallpaperCollections = wallpaperCollections; MessengerInstance.Register <SelectedAreaChangedMessage>(this, message => { foreach (var wallpaperCollection in WallpaperCollections) { wallpaperCollection.Clear(); LoadWallpapersAsync(SelectedWallpaperCollection); } }); }
public SettingViewModel(ILeanCloudWallpaperServiceWithCache leanCloudWallpaperServiceWithCache, IBingoWallpaperSettings settings, IBingoShareService bingoShareService, IAppToastService appToastService, IImageLoader imageLoader) { _leanCloudWallpaperServiceWithCache = leanCloudWallpaperServiceWithCache; _settings = settings; _bingoShareService = bingoShareService; _appToastService = appToastService; _imageLoader = imageLoader; }
public DetailViewModel(IWallpaperService wallpaperService, IBingoWallpaperSettings settings, ISystemSettingService systemSettingService, IBingoFileService bingoFileService, IImageLoader imageLoader, IAppToastService appToastService, IBingoShareService bingoShareService) { _wallpaperService = wallpaperService; _settings = settings; _systemSettingService = systemSettingService; _bingoFileService = bingoFileService; _imageLoader = imageLoader; _appToastService = appToastService; _bingoShareService = bingoShareService; }
public UpdateTileTask() { var unityContainer = new UnityContainer(); unityContainer.RegisterType <IWallpaperService, BingWallpaperService>(); unityContainer.RegisterType <IBingWallpaperService, BingWallpaperService>(); unityContainer.RegisterType <IScreenService, ScreenService>(); unityContainer.RegisterType <IBingoWallpaperSettings, BingoWallpaperSettings>(); unityContainer.RegisterType <ITileService, TileService>(); unityContainer.RegisterType <ISystemSettingService, SystemSettingService>(); _bingWallpaperService = unityContainer.Resolve <IBingWallpaperService>(); _bingoWallpaperSettings = unityContainer.Resolve <IBingoWallpaperSettings>(); _tileService = unityContainer.Resolve <ITileService>(); _systemSettingService = unityContainer.Resolve <ISystemSettingService>(); }
public BingoFileService(IBingoWallpaperSettings settings) { _settings = settings; }