示例#1
0
文件: Form1.cs 项目: FtMan/ES
        void load_questions()
        {
            var xmlSerializer = new XmlSerializer(typeof(Question_collection));

            XmlReaderSettings settings = new XmlReaderSettings();

            settings.Async = true;

            FileStream fileStream = new FileStream(PathOfLoad + '/' + "questions_xml.xml", FileMode.Open); // Было FileStream fileStream = new FileStream("questions_xml.xml", FileMode.Open); Радмир
            var        xmlReader  = XmlReader.Create(fileStream, settings);

            questions_xml_serialize = (Question_collection)xmlSerializer.Deserialize(xmlReader);
            questions = questions_xml_serialize.qustions;

            fileStream.Close();
            xmlReader.Close();
        }
示例#2
0
文件: Form1.cs 项目: FtMan/ES
 void init_save_module()
 {
     nodes_xml_serialize     = new Node_collection();
     facts_xml_serialize     = new Fact_collection();
     questions_xml_serialize = new Question_collection();
 }