Exemplo n.º 1
0
        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);
                }
        }
Exemplo n.º 2
0
        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;
 }