Пример #1
0
        public async void Apply()
        {
            CanClean    = true;
            CanGenerate = true;
            //await
            var para = new WallpapaerParameter()
            {
                Dir = Dir, EnterPoint = EndPoint, Args = Arguments
            };

            await WallpaperManger.ApplyWallpaper(SelectedType, para);
        }
Пример #2
0
 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();
 }
Пример #3
0
 protected override void OnDeactivate(bool close)
 {
     base.OnDeactivate(close);
     WallpaperManger.Clean();
 }
Пример #4
0
 public async void ApplyWallpaper(Wallpaper w)
 {
     currentShowWallpaper = w;
     await WallpaperManger.ApplyWallpaper(w.Type, w.PackInfo);
 }
Пример #5
0
 public void Clean()
 {
     WallpaperManger.Clean();
 }