/// <summary> /// Sets the current desktop wallpaper to the specified image. /// </summary> /// <param name="imagePath">The path of the image to set as the wallpaper.</param> private void SetWallpaperAsync(string imagePath) { if (_settingWallpaper) { return; } SetWallpaperDelegate setWallpaper = SetWallpaper; setWallpaper.BeginInvoke(imagePath, null, null); }
/// <summary> /// Sets the current desktop wallpaper to the specified image. /// </summary> /// <param name="imagePath">The path of the image to set as the wallpaper.</param> private void SetWallpaperAsync(string imagePath) { if (_settingWallpaper) return; SetWallpaperDelegate setWallpaper = new SetWallpaperDelegate(this.SetWallpaper); setWallpaper.BeginInvoke(imagePath, null, null); }