/// <summary> /// This class should be created and passed into Application.Run( ... ) /// </summary> public CustomApplicationContext() { InitializeContext(); brChecker = new BathroomChecker(notifyIcon); brChecker.CheckStatus(); var timer = new System.Timers.Timer(1000); timer.Elapsed += CheckBathroomStatus; timer.Start(); CheckBathroomStatus(null, null); }