Beispiel #1
0
 private void initialize()
 {
     m_tourneyInfoFileName   = Constants.getCurrentTourneyInformationFileName();
     m_tourneyEventsFileName = Constants.getCurrentTourneyEventsFileName();
     m_tourneyName           = NiniUtilities.getStringValue(m_tourneyInfoFileName, Constants.TourneyNameFieldName);
     this.Text     = "Tourney Name : " + m_tourneyName;
     m_tourneyInfo = new TourneyInfo(Constants.getCurrentTourneyInformationFileName(), false);
     this.tourneyInfoPropertyGrid.SelectedObject = m_tourneyInfo;
     m_eventsTable = AccessDatabaseUtilities.loadDatabaseToTable(m_tourneyEventsFileName, Constants.TableName.TourneyEvents);
     loadEvents();
 }
        private static void createTourneyDatabases()
        {
            TourneyInfo m_tourneyInfo = new TourneyInfo(Constants.getCurrentTourneyInformationFileName(), true);

            m_tourneyInfo.TourneyName = m_tourneyName;
            string databaseFileName = Constants.getCurrentTourneyEventsFileName();

            AccessDatabaseUtilities.createDatabase(databaseFileName);
            List <DatabaseField> fields = new List <DatabaseField>();

            fields.Add(new DatabaseField("Event_Name", "TEXT", 255));
            fields.Add(new DatabaseField("Event_Type", "TEXT", 255));
            List <string> primaryKeyFields = new List <string>();

            primaryKeyFields.Add("Event_Name");
            AccessDatabaseUtilities.createTable(databaseFileName, Constants.TableName.TourneyEvents, fields, primaryKeyFields);
        }
        private void initialize()
        {
            TourneyInfo tourneyInfo = new TourneyInfo(Constants.getRootTourneyInformationFile(), true);

            tourneyInfoPropertyGrid.SelectedObject = tourneyInfo;
        }