private static void SpecifyChoice() { switch (EnteredKey.key) { case (char)KeyStatus.Yes: { GetNames(); printer.Value(Constants.SpecifyCategory).ToString(); EnteredKey.GetEnteredKey(Console.ReadKey()); Console.ReadLine(); printer.Value(Constants.SelectJokes).ToString(); int n = Int32.Parse(Console.ReadLine()); printer.Value(Constants.EnterCategory).ToString(); GetRandomJokes(Console.ReadLine(), n); PrintResults(); break; } default: { printer.Value(Constants.SelectJokes).ToString(); int n = Int32.Parse(Console.ReadLine()); GetRandomJokes(null, n); PrintResults(); break; } } }
private static void StartJoke() { if (Console.ReadLine() == "?") { while (true) { printer.Value(Constants.GetCategory).ToString(); printer.Value(Constants.GetRandom).ToString(); EnteredKey.GetEnteredKey(Console.ReadKey()); Console.ReadLine(); MakeSelection(); } } }
private static void MakeSelection() { switch (EnteredKey.key) { case (char)KeyStatus.Category: GetCategories(); PrintResults(); break; case (char)KeyStatus.RandomJokes: { printer.Value(Constants.RandomName).ToString(); EnteredKey.GetEnteredKey(Console.ReadKey()); Console.ReadLine(); SpecifyChoice(); break; } } }