private void writeWingWaypoint(AllWings wing) { if (wing.Waypoints != null) { foreach (Waypoint w in wing.Waypoints) { writeWaypointData(w); } } }
public void ReadAll() { string line; while ((line = _reader.ReadLine()) != null) { string[] fields = line.Split(Separator.ToCharArray()); theClass = new AllWings(); theClass.Name = fields[0]; theClass.WingType = (WingTypes)Enum.Parse(typeof(WingTypes), fields[1], true); theClass.Faction = (Factions)Enum.Parse(typeof(Factions), fields[2], true); theClass.Nation = (Nations)Enum.Parse(typeof(Nations), fields[3], true); //if (fields[20] == "") fields[20] = "All"; //theClass.Nation = (Nations) Enum.Parse(typeof(Nations), fields[20], true); theList.Add(theClass); } }