Esempio n. 1
0
        protected async Task SaveTileImage(SourceTile normalTileImage, SourceTile transparentTileImage)
        {
            var settings = SimpleIoc.Default.GetInstance<ISettingsService>();
            var storage = SimpleIoc.Default.GetInstance<IStorageService>();

            var tileService = new TileService(storage, settings); 
            var vm = DataContext as ProviderViewModelBase;
            if (vm != null)
            {
                var file = tileService.GetTileFile(vm.Provider.ToString(), true);
                await tileService.SaveVisualElementToFile(transparentTileImage, file, 360, 360);

                file = tileService.GetTileFile(vm.Provider.ToString(), false);
                await tileService.SaveVisualElementToFile(normalTileImage, file, 360, 360);

                vm.PinUnpinCommand.Execute(null);
            }
        }
Esempio n. 2
0
 public TileMessage(SourceTile tile, SourceProvider provider)
 {
     Tile = tile;
     SourceProvider = provider;
 }