Example #1
0
        private void initializeOracle()
        {
            String basePath            = getDataFileBasePath();
            string pathName            = basePath + "\\" + ORACLE_DATA_FILENAME;
            SimpleSpreadsheetReader sr = CsvExcelReader.loadSpreadsheet(pathName);

            //excelReader = TestExcelReader.loadSpreadsheet(pathName, password);
            oracle = new PuzzleOracle(sr);
            if (!oracle.isSourceEncrypted)
            {
                MessageBox.Show(this, "ORACLE DATA FILE IS ***UNENCRYPTED****", "WARNING WARNING WARNING");
            }
            oracle.writeCsvFile(basePath, true);

            // WARNING - writeToFile(false) writes out the decrypted contents!
            // WARNING - do not enable this in the production build!
            // MessageBox.Show(this, "WRITING UNENCRYPTED DATA", "WARNING", MessageBoxButtons.OKCancel);
            //oracle.writeCsvFile(basePath, false);
        }
Example #2
0
        private void initializeTeamInfo()
        {
            String basePath             = getDataFileBasePath();
            String teamInfoPathName     = basePath + "\\" + TEAM_DATA_FILENAME;
            String teamOverridePathName = basePath + "\\" + OVERRIDE_TEAM_DATA_FILENAME;

            // Check if there is a valid override ...
            teamInfo = Utils.getOverrideTeamInfo(teamOverridePathName);
            if (teamInfo == null)
            {
                SimpleSpreadsheetReader srTeam = CsvExcelReader.loadSpreadsheet(teamInfoPathName);
                teamInfo = Utils.getTeamInfoForMachine(srTeam);
            }
            if (teamInfo == null)
            {
                ErrorReport.logError("Could not identify team.");
                teamInfo = new TeamInfo(INVALID_TEAM_ID, INVALID_TEAM_NAME);
            }
        }