Ejemplo n.º 1
0
        public static PathDataDriverDoc LoadObj()
        {
            PathDataDriverDoc pDoc;
            XmlSerializer     xmlSerializer = new XmlSerializer(typeof(PathDataDriverDoc));
            FileStream        fsReader      = null;

            try
            {
                fsReader = File.OpenRead(@".//Parameter/PathDoc" + ".xml");
                pDoc     = (PathDataDriverDoc)xmlSerializer.Deserialize(fsReader);
                fsReader.Close();
                pDoc.m_pathDataDriverDictionary = pDoc.m_pathDataDriverList.ToDictionary(p => p.Name);
            }
            catch //(Exception eMy)
            {
                if (fsReader != null)
                {
                    fsReader.Close();
                }
                pDoc = new PathDataDriverDoc();
            }
            return(pDoc);
        }
Ejemplo n.º 2
0
 static public void InitData()
 {
     pathDoc = PathDataDriverDoc.LoadObj();
 }