/// <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)); } }
/// <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); }
/// <summary> /// 重置 /// </summary> public override void Reset() { StreamReader.BaseStream.Position = 0; StreamReader.BaseStream.Seek(0, SeekOrigin.Begin); RinexUtil.SkipLines(StreamReader, Header.LineNumber); }