private static void WriteRWYLabels(DataTable dtSTL, StreamWriter sw) { string strText; string Lat; string Long; string Facility; string Comment; string Output; // string colorValue = dtColors.Rows[0]["ColorValue"].ToString(); Debug.WriteLine("WriteRWYLabels..."); sw.WriteLine("[LABELS]"); sw.WriteLine("; Runway labels"); foreach (DataRow row in dtSTL.AsEnumerable()) { strText = row["LabelText"].ToString(); Lat = row["Latitude"].ToString(); Long = row["Longitude"].ToString(); Facility = row["TextColor"].ToString(); // This is actually the Facility ID in ESE if (row["Comment"].ToString().Length != 0) { Comment = row["Comment"].ToString(); Output = SCTstrings.LabelOut(strText, Lat, Long, Facility, Comment); } else { Output = SCTstrings.LabelOut(strText, Lat, Long, Facility); } sw.WriteLine(Output); } }
private static void WriteLabels(DataTable dtSTL, StreamWriter sw) { string strText; string Lat; string Long; string TextColor; string Comment; string Output; // string colorValue = dtColors.Rows[0]["ColorValue"].ToString(); sw.WriteLine("[LABELS]"); sw.WriteLine("; Runway labels"); foreach (DataRow row in dtSTL.AsEnumerable()) { strText = row["LabelText"].ToString(); Lat = row["Latitude"].ToString(); Long = row["Longitude"].ToString(); TextColor = row["TextColor"].ToString(); Comment = row["Comment"].ToString(); if (row["Comment"].ToString().Length != 0) { Output = SCTstrings.LabelOut(strText, Lat, Long, TextColor, Comment); } else { Output = SCTstrings.LabelOut(strText, Lat, Long, TextColor); } sw.WriteLine(Output); } }