public SettingsForm() { InitializeComponent(); wallpaperMonsterConfiguration = new WallpaperMonsterConfiguration(); wallpaperMonsterService = new WallpaperMonsterService(wallpaperMonsterConfiguration, ScreenResolution.findScreenResolution(this)); wallpaperMonsterTimer = new WallpaperMonsterTimer(wallpaperMonsterService); periodSettings.Value = wallpaperMonsterConfiguration.FindPeriodDecimal(); wallpaperCheckBox.Checked = wallpaperMonsterConfiguration.FindShouldChangeWallpaper(); lockScreenCheckBox.Checked = wallpaperMonsterConfiguration.FindShouldChangeLockScreen(); wallpaperMonsterTimer.ChangeTimerPeriod(wallpaperMonsterConfiguration.FindPeriod()); prepareCategoryCombobox(); }
public WallpaperMonsterTimer(WallpaperMonsterService wallpaperChangerService) { this.wallpaperChangerService = wallpaperChangerService; timer = new Timer(); timer.Elapsed += new ElapsedEventHandler(OnTimedEvent); }