Ejemplo n.º 1
0
 public void Init()
 {
     ConfigurationManager.Init(Constants.CONFIG_FILE_PATH, Constants.CONFIG_FILE_DELIMITER);
     StoredProcedureManager.Init(@"./Data/StoredProcedures/");
     VenueManager.Init(ConfigurationManager.GetConfigurationValue("STADIUM_FILE_DIRECTORY"), true);
     conn = Constants.SQLITE3_CONNECTION_STRING;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// The entry point of the program, where the program control starts and ends.
        /// </summary>
        /// <param name="args">string[]</param>
        public static void Main(string[] args)
        {
            //TODO: Implement DH logic
            //TODO: Implement double round robin
            //TODO: Refactor TeamGroupTree into Composite-Leaf pattern
            //TODO: Implement full season (162 games)

            ConfigurationManager.Init(Constants.CONFIG_FILE_PATH, Constants.CONFIG_FILE_DELIMITER);
            StoredProcedureManager.Init(ConfigurationManager.GetConfigurationValue("STORED_PROCEDURES_DIRECTORY"));
            VenueManager.Init(ConfigurationManager.GetConfigurationValue("STADIUM_FILE_DIRECTORY"), true);
            SABRMetricsManager.Init(ConfigurationManager.GetConfigurationValue("SABRMETRICS_DIRECTORY"), true);

            ConsoleMenu menu             = new ConsoleMenu(ConfigurationManager.GetConfigurationValue("TITLE"), true);
            MenuChoice  chooseTeam       = new MenuChoice(ViewTeamInformation.Display, "View Team", true);
            MenuChoice  chooseLeague     = new MenuChoice(ViewLeagueInformation.Display, "View League", true);
            MenuChoice  playRoundRobin   = new MenuChoice(PlayRoundRobin.SelectYear, "Play Round Robin!", true);
            MenuChoice  playSeries       = new MenuChoice(PlaySeries.SetUpSeries, "Play Series", true);
            MenuChoice  playWorldSeries  = new MenuChoice(PlayChampionshipSeries.SelectWorldSeries, "Replay Championship Series", true);
            MenuChoice  cleanGamesFolder = new MenuChoice(CleanGamesFolder.LoadCleanGamesFolder, "Clean Games Folder", true);
            MenuChoice  exit             = new MenuChoice(ProgramExit.Exit, "Exit", true);

            menu.AddItem(chooseTeam);
            menu.AddItem(chooseLeague);
            menu.AddItem(playRoundRobin);
            menu.AddItem(playSeries);
            menu.AddItem(playWorldSeries);
            menu.AddItem(cleanGamesFolder);
            menu.AddItem(exit);
            menu.Run();
        }
Ejemplo n.º 3
0
        public void Init()
        {
            ConfigurationManager.Init(Constants.CONFIG_FILE_PATH, Constants.CONFIG_FILE_DELIMITER);
            StoredProcedureManager.Init(@"./Data/StoredProcedures/");
            VenueManager.Init(ConfigurationManager.GetConfigurationValue("STADIUM_FILE_DIRECTORY"), true);
            conn = Constants.SQLITE3_CONNECTION_STRING;

            database       = new Db(conn);
            americanLeague = DatabaseGroupLoader.LoadRoot("AL", year, database);
            americanLeague.ParentDirectoryPath = System.IO.Path.Combine($"{ConfigurationManager.GetConfigurationValue("GAME_FILE_DIRECTORY")}");
            nationalLeague = DatabaseGroupLoader.LoadRoot("NL", year, database);
            nationalLeague.ParentDirectoryPath = System.IO.Path.Combine($"{ConfigurationManager.GetConfigurationValue("GAME_FILE_DIRECTORY")}");

            try
            {
                americanLeague.Execute();
                nationalLeague.Execute();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Ejemplo n.º 4
0
 public void Init()
 {
     ConfigurationManager.Init(Constants.CONFIG_FILE_PATH, Constants.CONFIG_FILE_DELIMITER);
     StoredProcedureManager.Init(@"./Data/StoredProcedures/");
     conn = Constants.SQLITE3_CONNECTION_STRING;
 }
Ejemplo n.º 5
0
 public void Init()
 {
     ConfigurationManager.Init(Constants.CONFIG_FILE_PATH, Constants.CONFIG_FILE_DELIMITER);
     StoredProcedureManager.Init(ConfigurationManager.GetConfigurationValue("STORED_PROCEDURES_DIRECTORY"));
     VenueManager.Init(ConfigurationManager.GetConfigurationValue("STADIUM_FILE_DIRECTORY"), true);
 }
Ejemplo n.º 6
0
 public void Init()
 {
     StoredProcedureManager.Init(@"./Data/StoredProcedures/");
     conn = Constants.SQLITE3_CONNECTION_STRING;
 }