public static void SaveXMLHip(ParamHipCustom hip, string path) { XMLParamHip xml = new XMLParamHip(hip); using (FileStream fs = new FileStream(path, FileMode.Create, FileAccess.Write)) using (StreamWriter sw = new StreamWriter(fs)) { xml.Serialize(sw); } }
public static bool LoadXMLHip(ParamHipCustom hip, string path) { XMLParamHip xml = new XMLParamHip(); using (StreamReader reader = new StreamReader(path)) { if (!xml.Deserialize(reader)) { return(false); } } xml.CopyParams(hip); return(true); }
public void CopyFrom(XMLParamHip source) { Version = source.Version; gravity = source.gravity; paramSets = source.paramSets; }