private void writeFrameOffsetAssignments(XmlWriter xml, ItemList<LineElement> lines)
{
bool hasOffset = false;
foreach (LineElement frame in lines)
if (frame != null && !frame.EndOffsets.Equals(LineEndOffsets.Empty))
{
hasOffset = true;
break;
}
if (hasOffset)
{
xml.WriteStartElement("Frame_Offset_Along_Length_Assignments");
foreach (LineElement frame in lines)
if (frame != null)
{
LineEndOffsets off = frame.EndOffsets;
xml.WriteStartElement("Frame");
xml.WriteAttributeString("Frame", frame.Id.ToString());
xml.WriteAttributeString("Type", "User");
xml.WriteAttributeString("LengthI", off.EndI.ToString());
xml.WriteAttributeString("LengthJ", off.EndJ.ToString());
xml.WriteAttributeString("RigidFactor", off.Factor.ToString());
xml.WriteEndElement();
}
xml.WriteEndElement();
}
}