コード例 #1
0
ファイル: XMLControl.cs プロジェクト: kaiss78/hustoes
 public static void CreatePaperAnsXML(string path, string paperId)
 {
     if (File.Exists(path))
     {
         File.Delete(path);
     }
     paperAnsXML = new XMLAssistant(path, XMLType.PaperAnswer, new String[] { paperId });
 }
コード例 #2
0
ファイル: XMLControl.cs プロジェクト: kaiss78/hustoes
 public static void CreateLogXML(string rootPath)
 {
     if (File.Exists(rootPath + "log.xml"))
     {
         int i = 1;
         while (File.Exists(rootPath + "log" + i.ToString() + ".xml"))
         {
             i++;
         }
         File.Move(rootPath + "log.xml", rootPath + "log" + i.ToString() + ".xml");
     }
     logXML = new XMLAssistant(rootPath + "log.xml", XMLType.Log,new object());
 }
コード例 #3
0
ファイル: XMLControl.cs プロジェクト: kaiss78/hustoes
 public static void CreateScoreXML(string path, string paperId, string stuId)
 {
     if (File.Exists(path))
     {
         File.Delete(path);
     }
     scoreXML = new XMLAssistant(path, XMLType.StudentScore, new String[] { paperId, stuId });
 }
コード例 #4
0
ファイル: XMLControl.cs プロジェクト: kaiss78/hustoes
 public static void CreatePaperXML(string filePath, string paperId)
 {
     if (File.Exists(filePath))
     {
         File.Delete(filePath);
     }
     paperXML = new XMLAssistant(filePath, XMLType.Paper, paperId);
 }
コード例 #5
0
ファイル: XMLControl.cs プロジェクト: kaiss78/hustoes
 public static List<IdAnswerType> ReadStudentAns(string filePath)
 {
     studentAnsXML = new XMLAssistant(filePath, XMLType.StudentAnswer, null);
     return studentAnsXML.GetAnswer();
 }
コード例 #6
0
ファイル: XMLControl.cs プロジェクト: kaiss78/hustoes
 public static List<IdAnswerType> ReadPaperAns(string filePath)
 {
     paperAnsXML = new XMLAssistant(filePath, XMLType.PaperAnswer, null);
     return paperAnsXML.GetAnswer();
 }
コード例 #7
0
ファイル: XMLControl.cs プロジェクト: kaiss78/hustoes
 public static List<IdScoreType> ReadScoreSheet(string filePath)
 {
     scoreXML = new XMLAssistant(filePath, XMLType.StudentScore, null);
     return scoreXML.GetPaper();
 }
コード例 #8
0
ファイル: XMLControl.cs プロジェクト: kaiss78/hustoes
 public static List<IdScoreType> ReadPaper(string filePath)
 {
     paperXML = new XMLAssistant(filePath, XMLType.Paper, null);
     return paperXML.GetPaper();
 }
コード例 #9
0
ファイル: XMLControl.cs プロジェクト: kaiss78/hustoes
 public static bool LoadLogXML(string rootPath)
 {
     if (File.Exists(rootPath + "log.xml"))
     {
         logXML = new XMLAssistant(rootPath + "log.xml", XMLType.Log, null);
         return true;
     }
     else
     {
         return false;
     }
 }
コード例 #10
0
ファイル: XMLControl.cs プロジェクト: kaiss78/hustoes
 public static int GetStudentAnsPaper(string filePath)
 {
     studentAnsXML  = new XMLAssistant(filePath, XMLType.StudentAnswer, null);
     return Convert.ToInt32(studentAnsXML.getStuAnsPaperId());
 }
コード例 #11
0
ファイル: XMLControl.cs プロジェクト: kaiss78/hustoes
 public static string getPaperId(string filePath)
 {
     paperXML = new XMLAssistant(filePath, XMLType.Paper, null);
     return paperXML.getPaperId();
 }
コード例 #12
0
ファイル: XMLControl.cs プロジェクト: kaiss78/hustoes
 public static void CreateStudentAnsXML(string rootPath, string stuId, string paperId)
 {
     if (File.Exists(rootPath + "studentAns.xml"))
     {
         File.Delete(rootPath + "studentAns.xml");
     }
     studentAnsXML = new XMLAssistant(rootPath + "studentAns.xml", XMLType.StudentAnswer, new String[] { stuId, paperId });
 }