private void askForChoice(StringBuilder i_Error) { int choice; while (!int.TryParse(Console.ReadLine(), out choice) || choice > r_ItemList.Count || choice < 0) { Console.Clear(); Console.Write(i_Error); } if (choice == 0) { if (Father != null) { Father.DoAction(); } else { return; } } else { r_ItemList[choice - 1].DoAction(); } }
internal override void DoAction() { if (m_Action != null) { Console.Clear(); m_Action.Action(); } System.Threading.Thread.Sleep(k_TimeOutPeriod); Father.DoAction(); }