Beispiel #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));
     }
 }
Beispiel #2
0
 /// <summary>
 ///     backup the current wallpaper registry keys
 /// </summary>
 private void Backup()
 {
     backupWallKey = Wallpaper.GetWallKeys();
     Logger.Info("wallpaper backup successful");
 }
Beispiel #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);
 }