예제 #1
0
        public static IODoc LoadObj()
        {
            IODoc         pDoc;
            XmlSerializer xmlSerializer = new XmlSerializer(typeof(IODoc));
            FileStream    fsReader      = null;

            try
            {
                fsReader = File.OpenRead(@".//Parameter/IODoc" + ".xml");
                pDoc     = (IODoc)xmlSerializer.Deserialize(fsReader);
                fsReader.Close();
                pDoc.m_InputDictionary  = pDoc.m_InputDataList.ToDictionary(p => p.strIOName);
                pDoc.m_OutputDictionary = pDoc.m_OutputDataList.ToDictionary(p => p.strIOName);
            }
            catch (Exception eMy)
            {
                if (fsReader != null)
                {
                    fsReader.Close();
                }
                pDoc = new IODoc();
            }
            return(pDoc);
        }
예제 #2
0
파일: IOManage.cs 프로젝트: houxpGit/12
 static public void LoadData()
 {
     IODoc = IODoc.LoadObj();
 }