Пример #1
0
 public static string GetCurrentDirectory()
 {
     if (!IsRunningAsUwp())
     {
         return(DesktopHelper.GetCurrentDirectory());
     }
     else
     {
         return(UwpHelper.GetCurrentDirectory());
     }
 }
Пример #2
0
        private void SetWallpaper(int imageId)
        {
            string imageFilename = ThemeManager.currentTheme.imageFilename.Replace("*",
                                                                                   imageId.ToString());
            string imagePath = Path.Combine(Directory.GetCurrentDirectory(), "themes",
                                            ThemeManager.currentTheme.themeName, imageFilename);

            WallpaperApi.SetWallpaper(imagePath);

            if (UwpDesktop.IsRunningAsUwp() && JsonConfig.settings.changeLockScreen)
            {
                UwpHelper.SetLockScreenImage(imagePath);
            }

            lastImageId = imageId;
        }