private void WallpaperPublisher_CurrentWallpaperCleared(object sender, CurrentWallpaperClearedEventArgs e)
 {
     //<document me>
     if (e.PreviousWallpaperPoster == WallpaperPoster.Lockscreen)
     {
         LoadWallpaper(new ConfigurationManager(AppPreferences.Default));
     }
 }
Пример #2
0
        private void WallpaperPublisher_CurrentWallpaperHasBeenCleared(object sender, CurrentWallpaperClearedEventArgs e)
        {
            if (e.PreviousWallpaperPoster == WallpaperPoster.MusicPlayer)
            {
                int opacitylevel = configurationManager.RetrieveAValue(ConfigurationParameters.AlbumArtOpacityLevel, 255);
                int blurLevel    = configurationManager.RetrieveAValue(ConfigurationParameters.AlbumArtBlurLevel, 1); //Never used (for now)

                if (configurationManager.RetrieveAValue(ConfigurationParameters.ShowAlbumArt))
                {
                    WallpaperPublisher.ChangeWallpaper(new WallpaperChangedEventArgs
                    {
                        Wallpaper       = CurrentAlbumArt,
                        OpacityLevel    = (short)opacitylevel,
                        BlurLevel       = 0,                          //Causes a crash That currently I cant debug, damn, thats why is 0. (No blur) and ignoring the value the used have setted.
                        WallpaperPoster = WallpaperPoster.MusicPlayer //We must nutify WallpaperPublisher who is posting the wallpaper, otherwise the wallpaper will be ignored.
                    });
                }
            }
        }
Пример #3
0
        private void WallpaperPublisher_CurrentWallpaperHasBeenCleared(object sender, CurrentWallpaperClearedEventArgs e)
        {
            if (e.PreviousWallpaperPoster == WallpaperPoster.MusicPlayer)
            {
                int opacitylevel = configurationManager.RetrieveAValue(ConfigurationParameters.AlbumArtOpacityLevel, ConfigurationParameters.DefaultAlbumartOpacityLevel);
                int blurLevel    = configurationManager.RetrieveAValue(ConfigurationParameters.AlbumArtBlurLevel, ConfigurationParameters.DefaultAlbumartBlurLevel);

                if (configurationManager.RetrieveAValue(ConfigurationParameters.ShowAlbumArt))
                {
                    WallpaperPublisher.ChangeWallpaper(new WallpaperChangedEventArgs
                    {
                        Wallpaper       = CurrentAlbumArt,
                        OpacityLevel    = (short)opacitylevel,
                        BlurLevel       = (short)blurLevel,
                        WallpaperPoster = WallpaperPoster.MusicPlayer //We must nutify WallpaperPublisher who is posting the wallpaper, otherwise the wallpaper will be ignored.
                    });
                }
            }
        }