static List <ItemJSJL> readInputFile(string _sJH) { List <ItemJSJL> listJSJLreturn = new List <ItemJSJL>(); string filePath = Path.Combine(cProjectManager.dirPathWellDir, _sJH, cProjectManager.fileNameInputJSJL); if (File.Exists(filePath)) { using (StreamReader sr = new StreamReader(filePath, Encoding.UTF8)) { String line; int iLine = 0; while ((line = sr.ReadLine()) != null) //delete the line whose legth is 0 { iLine++; if (iLine > 0) { if (line.TrimEnd() != "") { ItemJSJL sttJSJL = ItemJSJL.parseLine(line); if (sttJSJL.sJH != null) { listJSJLreturn.Add(sttJSJL); } } } } } } return(listJSJLreturn); }
public static List <ItemJSJL> readJSJL2Struct(string _sJH) { string filePath = Path.Combine(cProjectManager.dirPathWellDir, _sJH, cProjectManager.fileNameWellJSJL); List <ItemJSJL> listJSJLreturn = new List <ItemJSJL>(); if (File.Exists(filePath)) { List <string> ltLines = cIOGeoEarthText.getDataLineListStringFromGeoText(filePath); foreach (string line in ltLines) { if (line.TrimEnd() != "") { ItemJSJL sttJSJL = ItemJSJL.parseLine(line); if (sttJSJL.sJH != null) { listJSJLreturn.Add(sttJSJL); } } } } return(listJSJLreturn); }