internal GBXMLContainer ParsePattern(GBXMLContainer patternOrigin) { if (patternOrigin.Name.StartsWith("CopyPattern.")) { string cpStr = "CopyPattern."; int cpLen = cpStr.Length; string originPattern = patternOrigin.Name.Substring(cpLen, patternOrigin.Name.Length - cpLen); GBXMLContainer retVal = (GBXMLContainer)data[originPattern].Clone(); retVal.Overwrite(patternOrigin); if (patternOrigin.Exists("newName")) { retVal.Name = patternOrigin["newName"].Text; } return retVal; } return patternOrigin; }
public static bool FieldExists(GBXMLContainer stream, string field) { return stream.Exists(field); }