public CRSH() { csax = new List<CSAX>(); proj = new PROJ(); gdat = new GDAT(); vdat = new VDAT(); }
private int readGroup(string[] lines, List <PROJ> list) { int group_start = find_line(lines, "\"GROUP\",\"PROJ\""); if (group_start == NOT_FOUND) { return(-1); } string[] header = lines[group_start + 1].QuoteSplit(); string[] units = lines[group_start + 2].QuoteSplit(); string[] type = lines[group_start + 3].QuoteSplit(); addUNITS(units); addTYPES(type); for (int i = group_start + 4; i < lines.Count(); i++) { string line = lines[i]; if (line.Length == 0) { return(i); } string[] values = line.QuoteSplit(); PROJ p = new PROJ(); setValues(header, values, p); list.Add(p); } return(0); }
private List <PROJ> getPROJ() { List <PROJ> list = new List <PROJ>(); PROJ p = new PROJ(); p.PROJ_MEMO = $"ESdata data export {DateTime.Now}"; list.Add(p); return(list); }
private int setValues(string[] header, string[] values, PROJ p) { try { for (int i = 0; i < header.Count(); i++) { if (header[i] == "PROJ_CLNT") { p.PROJ_CLNT = values[i]; } if (header[i] == "PROJ_CONT") { p.PROJ_CONT = values[i]; } if (header[i] == "PROJ_ENG") { p.PROJ_ENG = values[i]; } if (header[i] == "PROJ_ID") { p.PROJ_ID = values[i]; } if (header[i] == "PROJ_GRID") { p.PROJ_GRID = values[i]; } if (header[i] == "PROJ_LOC") { p.PROJ_LOC = values[i]; } if (header[i] == "PROJ_MEMO") { p.PROJ_MEMO = values[i]; } if (header[i] == "PROJ_NAME") { p.PROJ_NAME = values[i]; } } } catch { return(-1); } return(0); }