예제 #1
0
    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;
        }
      }
    }
예제 #2
0
        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;
                    }
                }
            }
        }