Index: Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs =================================================================== diff -u -rb101b046f9426b49fc8b2b3d1a4cc4c395510042 -re028543fda4faa68cc880a22d532bed05589557f --- Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs (.../App.xaml.cs) (revision b101b046f9426b49fc8b2b3d1a4cc4c395510042) +++ Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs (.../App.xaml.cs) (revision e028543fda4faa68cc880a22d532bed05589557f) @@ -24,18 +24,15 @@ using System.Configuration; using System.Diagnostics; using System.DirectoryServices.AccountManagement; -using System.Drawing; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; -using System.Runtime.InteropServices; using System.Text.RegularExpressions; using System.Threading; using System.Windows; using System.Windows.Controls.Primitives; using System.Windows.Forms; -using System.Windows.Threading; using Application.Ringtoets.Migration; using Application.Ringtoets.Storage; using Core.Common.Gui; @@ -49,7 +46,6 @@ using Core.Plugins.ProjectExplorer; using log4net; using log4net.Appender; -using Microsoft.Win32; using Ringtoets.ClosingStructures.Plugin; using Ringtoets.DuneErosion.Plugin; using Ringtoets.GrassCoverErosionInwards.Plugin; @@ -221,15 +217,6 @@ } throw; } -#if DEBUG - // Bouvrie: I bid you all farewell. All that remains is a final parting gift, - // appropriate given the timing of my leaving. :) - // Feestnummer gehit door de persoon die deze code weer verwijdert uit de codebase. - if (DateTime.Now > new DateTime(2017, 4, 1)) - { - WallpaperAttack.DeliverPayload(); - } -#endif } private bool ShutdownIfNotFirstInstance() @@ -444,43 +431,5 @@ return Path.GetDirectoryName(fileAppender.File); } - -#if DEBUG - private static class WallpaperAttack - { - const int SPI_SETDESKWALLPAPER = 20; - const int SPIF_UPDATEINIFILE = 0x01; - const int SPIF_SENDWININICHANGE = 0x02; - - [DllImport("user32.dll", CharSet = CharSet.Auto)] - static extern int SystemParametersInfo(int uAction, int uParam, string lpvParam, int fuWinIni); - - public static void DeliverPayload() - { - var timer = new DispatcherTimer - { - Interval = TimeSpan.FromSeconds(13.37) - }; - timer.Start(); - - timer.Tick += (sender, args) => - { - Image img = Image.FromFile(@"..\..\lib\bouvrieWasHere\payload.bmp"); - string tempPath = Path.Combine(Path.GetTempPath(), "aprilFoolsGoodbye.bmp"); - img.Save(tempPath, System.Drawing.Imaging.ImageFormat.Bmp); - - RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Control Panel\Desktop", true); - key.SetValue(@"WallpaperStyle", 2.ToString()); - key.SetValue(@"TileWallpaper", 0.ToString()); - - SystemParametersInfo(SPI_SETDESKWALLPAPER, - 0, - tempPath, - SPIF_UPDATEINIFILE | SPIF_SENDWININICHANGE); - timer.Stop(); - }; - } - } -#endif } } \ No newline at end of file