public void DeleteWallpaper(Wallpaper w) { try { if (w == currentShowWallpaper) { WallpaperManger.Clean(); currentShowWallpaper = null; } var currentDir = Directory.GetCurrentDirectory(); var target = currentDir + w.PackInfo.Dir; Directory.Delete(target, true); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } RefreshLocalWallpaper(); }
protected override void OnDeactivate(bool close) { base.OnDeactivate(close); WallpaperManger.Clean(); }
public void Clean() { WallpaperManger.Clean(); }