Beispiel #1
0
 public DataManager()
 {
     problemData = new ProblemData();
     skillData   = new SkillData();
     assetData   = new AssetData();
     ita         = new DefaultITAEngineManager();
 }
Beispiel #2
0
        public DataManager(string dataFile)
        {
            problemData = new ProblemData();
            skillData   = new SkillData();
            assetData   = new AssetData();
            ita         = new DefaultITAEngineManager();
            data        = XMLDataLoader.GetStringFromXML(dataFile);

            LoadData();
        }
Beispiel #3
0
        public static void ProblemDataLoad(string data, ProblemData pd)
        {
            XmlDocument problemXmlDocument = new XmlDocument();

            problemXmlDocument.LoadXml(data);
            foreach (XmlNode problemsNode in problemXmlDocument.SelectNodes("test/test_data/problems"))
            {
                foreach (XmlNode problemNode in problemsNode.SelectNodes("problem"))
                {
                    string id          = problemNode.Attributes.GetNamedItem("UID").InnerText;
                    string tags        = problemNode.Attributes.GetNamedItem("tags").InnerText;
                    bool   isChallenge = (problemNode.Attributes.GetNamedItem("isChallenge").InnerText == "true");
                    string groupId     = problemNode.Attributes.GetNamedItem("GroupID").InnerText;
                    string statement   = GetNodeString(problemNode.Attributes, "statement");
                    pd.AddProblem(id, groupId, tags, isChallenge, statement);
                }
            }
        }