Exemplo n.º 1
0
        public void saveResult(int result)
        {
            DataFileManager dataManager = new DataFileManager(username, testName, usernameToGuess);

            dataManager.updateDirectoryAnswers();
            if (!dataManager.fileExists())
            {
                dataManager.createDirectory(dataManager.getDirectoryPath(usernameToGuess));
                dataManager.saveAnswers(dataManager.getFilePath(usernameToGuess), result);
            }
        }
Exemplo n.º 2
0
        private void testEnd_Click(object sender, EventArgs e)
        {
            DataFileManager dataManager = new DataFileManager(username, testName);

            dataManager.updateDirectoryTests();
            if (!dataManager.fileExists())
            {
                dataManager.createDirectory(dataManager.getDirectoryPath());
                dataManager.writeToFile(dataManager.getFilePath(), qList, true);
                this.Close();
            }
            if (dataManager.fileExists())
            {
                sameFilePanel.Show();
            }
        }