Пример #1
0
        public async void AutoSaveSetup()
        {
            IsAutoSaveBackgroundTaskLoading = true;

            if (AutoSave)
            {
                //AutoSave = await BackgroundTaskService.RegisterBackgroundTaskAsync(
                //    BackgroundTaskService.AUTO_SAVE_BACKGROUND_TASK_NAME,
                //    typeof(Tasks.AutoSaveBackgroundTask).FullName);
            }
            else
            {
                if (BackgroundTaskService.UnregisterbackgroundTask(BackgroundTaskService.AUTO_SAVE_BACKGROUND_TASK_NAME))
                {
                    AppSettingsService.SaveSetting(AppSettingsService.LAST_AUTO_SAVE_IMAGE, string.Empty);
                }
            }

            AppSettingsService.SaveSetting(AppSettingsService.AUTO_SAVE_SETTINGS, AutoSave);

            IsAutoSaveBackgroundTaskLoading = false;
        }
Пример #2
0
        public async void AutoWallpaperSetup()
        {
            IsAutoWallpaperTaskLoading = true;

            if (AutoWallpaper)
            {
                //AutoWallpaper = await BackgroundTaskService.RegisterBackgroundTaskAsync(
                //    BackgroundTaskService.AUTO_START_BACKGROUND_TASK_NAME,
                //    typeof(Tasks.StartImageBackgroundTask).FullName);
            }
            else
            {
                if (BackgroundTaskService.UnregisterbackgroundTask(BackgroundTaskService.AUTO_START_BACKGROUND_TASK_NAME))
                {
                    AppSettingsService.SaveSetting(AppSettingsService.LAST_AUTO_START_IMAGE, string.Empty);
                }
            }

            AppSettingsService.SaveSetting(AppSettingsService.AUTO_WALLPAPER_SETTINGS, AutoWallpaper);

            IsAutoWallpaperTaskLoading = false;
        }
Пример #3
0
        public async void LiveTileSetup()
        {
            IsLiveTileBackgroundTaskLoading = true;

            if (LiveTile)
            {
                //LiveTile = await BackgroundTaskService.RegisterBackgroundTaskAsync(
                //    BackgroundTaskService.LIVE_TILE_BACKGROUND_TASK_NAME,
                //    typeof(Tasks.LiveTileBackgroundTask).FullName);
            }
            else
            {
                if (BackgroundTaskService.UnregisterbackgroundTask(BackgroundTaskService.LIVE_TILE_BACKGROUND_TASK_NAME))
                {
                    TileUpdateManager.CreateTileUpdaterForApplication().Clear();
                    AppSettingsService.SaveSetting(AppSettingsService.LAST_LIVE_TILE_IMAGE, string.Empty);
                }
            }

            AppSettingsService.SaveSetting(AppSettingsService.LIVE_TILE_SETTINGS, LiveTile);

            IsLiveTileBackgroundTaskLoading = false;
        }