Exemplo n.º 1
0
        public static CameraDoc LoadObj()
        {
            CameraDoc pDoc = new CameraDoc();

            try
            {
                XmlSerializer xmlSerializer = new XmlSerializer(typeof(CameraDoc));
                FileStream    fsReader      = null;
                fsReader = File.OpenRead(@".//Parameter/CameraDoc.xml");
                pDoc     = (CameraDoc)xmlSerializer.Deserialize(fsReader);
                fsReader.Close();
                pDoc.CamerasInfoDic = pDoc.CamerasInfoList.ToDictionary(p => p.UserID);
            }
            catch
            {
                pDoc.CamerasInfoList.Clear();
            }

            return(pDoc);
        }
Exemplo n.º 2
0
 public static void LoadDoc()
 {
     doc = CameraDoc.LoadObj();
 }