public void CancelExecution() { int cnt = 30; while (--cnt >= 0 && IsExecuting) { Cancel = true; Thread.Sleep(1000); } }