public void ClearTextWait(bool finish) { List <Wait> list = (from a in WaitList where a.Type == WaitTypes.WaitForText select a).ToList(); foreach (Wait item in list) { if (finish) { item.Finish(); } WaitList.Remove(item); } TextController.FinishTyping(); }