示例#1
0
 /// <summary>
 ///     check if wallpaper has been swapped or not
 /// </summary>
 /// <returns></returns>
 public bool GetWallpaperSwappedStatus()
 {
     using (var hasher = new Hasher())
     {
         //hash desktop to see if set by user or the swapper
         var wallpaper = Wallpaper.GetWallKeys();
         var path      = wallpaper.Values[Wallpaper.KeyNames.WallpaperPath];
         var hash      = hasher.ComputeImageHashFromPath(path);
         return(hashList.Contains(hash));
     }
 }
示例#2
0
 /// <summary>
 ///     backup the current wallpaper registry keys
 /// </summary>
 private void Backup()
 {
     backupWallKey = Wallpaper.GetWallKeys();
     Logger.Info("wallpaper backup successful");
 }
示例#3
0
 /// <summary>
 ///     Sets desktop wallpaper to specified image
 /// </summary>
 /// <param name="image">image to set wallpaper to</param>
 private void Set(Image image)
 {
     Backup();
     Wallpaper.PaintWall(image, Wallpaper.Style.Fill);
 }