Exemplo n.º 1
0
 /// <summary>
 /// 读取第一个内容行。
 /// </summary>
 /// <param name="path"></param>
 /// <returns></returns>
 private static string GetFirstContentLine(string path)
 {
     using (StreamReader reader = new StreamReader(path))
     {
         RinexUtil.SkipHeader(reader);
         return(ReadContentLine(reader));
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// 获取文件中所有的天线对象。
        /// </summary>
        /// <param name="fileName"></param>
        /// <returns></returns>
        public static AntennaFile ReadFile(string fileName)
        {
            AntennaFile file = new AntennaFile();

            file.Header = ReadHeader(fileName);

            using (StreamReader sr = new StreamReader(fileName))
            {
                string line;
                RinexUtil.SkipHeader(sr);

                while ((line = sr.ReadLine()) != null)
                {
                    Antenna Antenna = ParseAntenna(line, sr, file.Header);
                    file.Antennas.Add(Antenna);
                }
            }

            return(file);
        }
Exemplo n.º 3
0
 /// <summary>
 /// 重置
 /// </summary>
 public override void Reset()
 {
     StreamReader.BaseStream.Position = 0;
     StreamReader.BaseStream.Seek(0, SeekOrigin.Begin);
     RinexUtil.SkipLines(StreamReader, Header.LineNumber);
 }