private void Window_ContentRendered(object sender, System.EventArgs e) { Boolean result = CHelper.AskConfirmDelete(mv.FileCount); if (!result) { this.Close(); return; } Thread t = new Thread(DeleteFiles); t.Start(); Thread m = new Thread(MonitorDeleted); m.Start(); }