示例#1
0
        public static ClSTtype FromStream(BinaryReader br)
        {
            ClSTtype lstdata = new ClSTtype();

            lstdata.strMod1 = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(30));
            lstdata.strStg  = ViewerUtils.ConvertCharArrayToString(br.ReadBytes(20));

            return(lstdata);
        }
示例#2
0
 public static bool ReadModelLstFile(string strFilePath, ref List <ClSTtype> listData)
 {
     listData.Clear();
     if (File.Exists(strFilePath))
     {
         BinaryReader br = new BinaryReader(new FileStream(strFilePath, FileMode.Open, FileAccess.Read), Encoding.Default);
         while (br.BaseStream.Position < br.BaseStream.Length)
         {
             ClSTtype lstdata = ClSTtype.FromStream(br);
             listData.Add(lstdata);
         }
         br.Close();
         return(true);
     }
     return(false);
 }