public void SamuraiMenu() { while (true) { ProgressReporterProvider.Current.ReportProgress("Value-Samurai -- Main Menu", ReporterImportance.High, ReporterAudience.Admin); ProgressReporterProvider.Current.ReportProgress("1.\tTennis console", ReporterImportance.Medium, ReporterAudience.Admin); ProgressReporterProvider.Current.ReportProgress("2.\tFootball console", ReporterImportance.Medium, ReporterAudience.Admin); ProgressReporterProvider.Current.ReportProgress("", ReporterImportance.Medium, ReporterAudience.Admin); ProgressReporterProvider.Current.ReportProgress("3.\tExit", ReporterImportance.Low, ReporterAudience.Admin); var numberString = Console.ReadLine(); int number; if (!int.TryParse(numberString, out number)) { Console.WriteLine("You f*****g moron!"); } else { if (number == 1) { //throw new NotImplementedException(); var tennisConsole = new TennisConsole(tennisService); tennisConsole.TennisMenu(); } else if (number == 2) { var footballConsole = new FootballConsole(footballService); footballConsole.FootballMenu(); } else break; } } }
public void SamuraiMenu() { while (true) { ProgressReporterProvider.Current.ReportProgress("Value-Samurai -- Main Menu", ReporterImportance.High, ReporterAudience.Admin); ProgressReporterProvider.Current.ReportProgress("1.\tTennis console", ReporterImportance.Medium, ReporterAudience.Admin); ProgressReporterProvider.Current.ReportProgress("2.\tFootball console", ReporterImportance.Medium, ReporterAudience.Admin); ProgressReporterProvider.Current.ReportProgress("", ReporterImportance.Medium, ReporterAudience.Admin); ProgressReporterProvider.Current.ReportProgress("3.\tExit", ReporterImportance.Low, ReporterAudience.Admin); var numberString = Console.ReadLine(); int number; if (!int.TryParse(numberString, out number)) { Console.WriteLine("You f*****g moron!"); } else { if (number == 1) { //throw new NotImplementedException(); var tennisConsole = new TennisConsole(tennisService); tennisConsole.TennisMenu(); } else if (number == 2) { var footballConsole = new FootballConsole(footballService); footballConsole.FootballMenu(); } else { break; } } } }