public void CheckIsTimeToPrint() { Task.Factory.StartNew(() => { /* * Dispatcher.BeginInvoke(new Action(delegate * { * ReminderWindow autoShownReminderWindow = new ReminderWindow(); * })); */ while (true) { if (commonSet.IsTimeToPrint()) { ShowPrintingWindow(); } Thread.Sleep(60000); } }); }