Example #1
0
 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);
     }
 }
Example #2
0
 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);
     }
 }
Example #3
0
 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);
     }
 }
Example #4
0
 public static void LoadFromElement(XmlElement e, Value.String value, bool isClip)
 {
     var text = e.GetText();
     value.SetValue(text);
 }
Example #5
0
        public static void LoadFromElement(XmlElement e, Value.Path value, bool isClip)
        {
            var text = e.GetText();

            if (!isClip)
                value.SetRelativePath(text);
            else
                value.SetAbsolutePath(text);
        }