public static void LoadFromElement(XmlElement e, Value.Float value, bool isClip) { var text = e.GetText(); var parsed = 0.0f; if (float.TryParse(text, System.Globalization.NumberStyles.Float, Setting.NFI, out parsed)) { value.SetValue(parsed); } }
public static void LoadFromElement(XmlElement e, Value.Boolean value, bool isClip) { var text = e.GetText(); var parsed = false; if (bool.TryParse(text, out parsed)) { value.SetValue(parsed); } }
public static void LoadFromElement(XmlElement e, Value.EnumBase value, bool isClip) { var text = e.GetText(); var parsed = 0; if (int.TryParse(text, out parsed)) { value.SetValue(parsed); } }
public static void LoadFromElement(XmlElement e, Value.String value, bool isClip) { var text = e.GetText(); value.SetValue(text); }
public static void LoadFromElement(XmlElement e, Value.Path value, bool isClip) { var text = e.GetText(); if (!isClip) value.SetRelativePath(text); else value.SetAbsolutePath(text); }