private static void ShouldIStayOpen(object sender, ElapsedEventArgs args) { OnWindow(window => { if (0 < CleanupMessages(Properties.Settings.Default.MessageTimeoutMilliseconds)) { StartTimer( ); return; } window.CloseForm(Properties.Settings.Default.MessagePollEveryMilliseconds); _window = null; }); }