public void load()
 {
     NiniUtilities.loadNiniConfig(m_niniFileName);
     drawsCompleted  = NiniUtilities.getIntValue(m_niniFileName, Constants.DrawsCompletedFieldName);
     roundsCompleted = NiniUtilities.getIntValue(m_niniFileName, Constants.RoundsCompletedFieldName);
     roundsScored    = NiniUtilities.getIntValue(m_niniFileName, Constants.RoundsScoredFieldName);
 }
 public void load()
 {
     NiniUtilities.loadNiniConfig(m_niniFileName);
     scoringType      = (ScoringTypeValues)Enum.Parse(typeof(ScoringTypeValues), NiniUtilities.getStringValue(m_niniFileName, Constants.ScoringTypeFieldName), true);
     tiebreakerMethod = (TiebreakerMethodValues)Enum.Parse(typeof(TiebreakerMethodValues), NiniUtilities.getStringValue(m_niniFileName, Constants.TiebreakerMethodFieldName), true);
     byeScore         = NiniUtilities.getIntValue(m_niniFileName, Constants.ByeScoreFieldName, 18);
 }
 public void load()
 {
     NiniUtilities.loadNiniConfig(m_niniFileName);
     drawForRound        = NiniUtilities.getIntValue(m_niniFileName, Constants.DrawForRoundFieldName);
     fontSize            = NiniUtilities.getDoubleValue(m_niniFileName, Constants.FontSizeFieldName);
     paddingSize         = NiniUtilities.getDoubleValue(m_niniFileName, Constants.PaddingSizeFieldName);
     vpsInSeparateColumn = NiniUtilities.getBooleanValue(m_niniFileName, Constants.VPSInSeparateColumnFieldName);
     useBorder           = NiniUtilities.getBooleanValue(m_niniFileName, Constants.UseBorderFieldName);
 }
        public void setParameters(string eventName, string databaseFileName, string webpagesRoot)
        {
            m_databaseFileName      = databaseFileName;
            m_webpagesRootDirectory = webpagesRoot;
            string mainNiniFileName = Constants.getEventInformationFileName(eventName);

            m_numberOfTeams          = NiniUtilities.getIntValue(mainNiniFileName, Constants.NumberOfTeamsFieldName);
            m_numberOfRounds         = NiniUtilities.getIntValue(mainNiniFileName, Constants.NumberOfRoundsFieldName);
            m_numberOfBoardsPerRound = NiniUtilities.getIntValue(mainNiniFileName, Constants.NumberOfBoardsFieldName);
            m_totalNumberOfBoards    = m_numberOfTeams + (m_numberOfTeams % 2 == 0?1:0) * m_numberOfBoardsPerRound;
        }
Example #5
0
        public void setParameters(string eventName, string databaseFileName, string webpagesRoot)
        {
            m_databaseFileName      = databaseFileName;
            m_webpagesRootDirectory = webpagesRoot;
            string scoringFileName  = Constants.getEventScoringProgressParametersFileName(eventName);
            string mainNiniFileName = Constants.getEventInformationFileName(eventName);

            m_numberOfTeams      = NiniUtilities.getIntValue(mainNiniFileName, Constants.NumberOfTeamsFieldName);
            m_numberOfRounds     = NiniUtilities.getIntValue(mainNiniFileName, Constants.NumberOfRoundsFieldName);
            m_numberOfQualifiers = NiniUtilities.getIntValue(mainNiniFileName, Constants.NumberOfQualifiersFieldName);
            m_roundsCompleted    = NiniUtilities.getIntValue(scoringFileName, Constants.RoundsCompletedFieldName);
            m_drawsCompleted     = NiniUtilities.getIntValue(scoringFileName, Constants.DrawsCompletedFieldName);
        }
 public void load()
 {
     NiniUtilities.loadNiniConfig(m_niniFileName);
     numberOfTeams                  = NiniUtilities.getIntValue(m_niniFileName, Constants.NumberOfTeamsFieldName);
     hasPhantomTable                = (numberOfTeams % 2 == 0);
     numberOfTables                 = numberOfTeams + (hasPhantomTable ? 1 : 0);
     numberOfRounds                 = NiniUtilities.getIntValue(m_niniFileName, Constants.NumberOfRoundsFieldName);
     numberOfBoardsPerRound         = NiniUtilities.getIntValue(m_niniFileName, Constants.NumberOfBoardsFieldName);
     previousNumberOfRounds         = numberOfRounds;
     previousNumberOfTeams          = numberOfTeams;
     previousNumberOfBoardsPerRound = numberOfBoardsPerRound;
     totalNumberOfBoards            = numberOfTables * numberOfBoardsPerRound;
 }
        public void load()
        {
            NiniUtilities.loadNiniConfig(m_niniFileName);
            numberOfTeams  = NiniUtilities.getIntValue(m_niniFileName, Constants.NumberOfTeamsFieldName);
            numberOfRounds = NiniUtilities.getIntValue(m_niniFileName, Constants.NumberOfRoundsFieldName);
            DataTable table = AccessDatabaseUtilities.loadDatabaseToTable(m_databaseFileName, Constants.TableName.KnockoutSessions);

            foreach (DataRow dRow in table.Rows)
            {
                int roundNumber      = (int)dRow["Round_Number"];
                int numberOfSessions = (int)dRow["Number_Of_Sessions"];
                m_oldNumberOfSessions[roundNumber] = numberOfSessions;
            }
            AccessDatabaseUtilities.loadDatabaseToTable(m_databaseFileName, Constants.TableName.KnockoutTeams);
            for (int i = 1; i <= numberOfRounds; i++)
            {
                AccessDatabaseUtilities.loadDatabaseToTable(m_databaseFileName, Constants.TableName.KnockoutScores + "_" + i);
            }
        }
        public void load()
        {
            NiniUtilities.loadNiniConfig(m_niniFileName);
            numberOfTeams          = NiniUtilities.getIntValue(m_niniFileName, Constants.NumberOfTeamsFieldName);
            numberOfRounds         = NiniUtilities.getIntValue(m_niniFileName, Constants.NumberOfRoundsFieldName);
            numberOfBoardsPerRound = NiniUtilities.getIntValue(m_niniFileName, Constants.NumberOfBoardsFieldName);
            numberOfQualifiers     = NiniUtilities.getIntValue(m_niniFileName, Constants.NumberOfQualifiersFieldName);
            string vpScaleString = NiniUtilities.getStringValue(m_niniFileName, Constants.VPScaleFieldName, VPScaleOptions.BFI_30VP_Scale.ToString(), string.Join(",", Enum.GetNames(typeof(VPScaleOptions))));

            if (string.IsNullOrWhiteSpace(vpScaleString))
            {
                vpScale = VPScaleOptions.BFI_30VP_Scale;
            }
            else
            {
                vpScale = (VPScaleOptions)Enum.Parse(typeof(VPScaleOptions), vpScaleString, true);
            }
            previousNumberOfRounds = numberOfRounds;
            previousNumberOfTeams  = numberOfTeams;
        }
        private void update()
        {
            bool result = int.TryParse(numberOfNewEventsTextbox.Text, out m_numberOfNewEvents);

            if (!result || m_numberOfNewEvents < 1)
            {
                Utilities.showErrorMessage("Number of New Events specified is not a valid integer");
                return;
            }
            m_numberOfSelectedEvents = 0;
            m_totalQualifiers        = 0;
            m_selectedEventNames.Clear();
            for (int i = 1; i <= m_numberOfNewEvents; ++i)
            {
                m_selectedTeams[i] = new Dictionary <string, bool[]>();
            }
            foreach (Control control in eventsListPanel.Controls)
            {
                if (control is CheckBox)
                {
                    CheckBox cb = control as CheckBox;
                    if (cb.Checked)
                    {
                        string eventName = cb.Text;
                        m_selectedEventNames.Add(eventName);
                        loadTeams(eventName);
                        NiniUtilities.loadNiniConfig(Constants.getEventInformationFileName(eventName));
                        m_numberOfSelectedEvents++;
                        m_numberOfQualifiers[eventName] = NiniUtilities.getIntValue(Constants.getEventInformationFileName(eventName), Constants.NumberOfQualifiersFieldName);
                        m_totalQualifiers += m_numberOfQualifiers[eventName];
                        selectTeams(eventName);
                    }
                }
            }
            totalQualifiersTextbox.Text    = "" + m_totalQualifiers;
            m_qualifiersPerEvent           = m_totalQualifiers / m_numberOfNewEvents;
            qualifiersPerEventTextbox.Text = "" + m_qualifiersPerEvent;
            loadNewEventTabs();
        }