Ejemplo n.º 1
0
        public static ElementFov Create(XElement element)
        {
            if (element == null)
            {
                return(null);
            }

            ElementFov item = new ElementFov();

            foreach (XAttribute attribute in element.Attributes())
            {
                switch (attribute.Name.LocalName)
                {
                case "id": item.id = ReaderUtil.ConvertInt32(attribute.Value, 0); break;

                case "left": item.left = ReaderUtil.ConvertSingle(attribute.Value, 0.0f); break;

                case "height": item.height = ReaderUtil.ConvertSingle(attribute.Value, 0.0f); break;

                case "x": item.height = ReaderUtil.ConvertSingle(attribute.Value, 0.0f); break;

                case "y": item.height = ReaderUtil.ConvertSingle(attribute.Value, 0.0f); break;
                }
            }

            return(item);
        }
Ejemplo n.º 2
0
        public static ElementBoardFovs Create(XElement element)
        {
            if (element == null)
            {
                return(null);
            }

            ElementBoardFovs item = new ElementBoardFovs();

            foreach (XAttribute attribute in element.Attributes())
            {
                switch (attribute.Name.LocalName)
                {
                case "width": item.width = ReaderUtil.ConvertSingle(attribute.Value, 0.0f); break;

                case "height": item.height = ReaderUtil.ConvertSingle(attribute.Value, 0.0f); break;
                }
            }

            item.fovs
                = (from Element in element.Elements(ElementFov.Name)
                   select ElementFov.Create(Element)
                   ).ToArray();
            return(item);
        }
Ejemplo n.º 3
0
        public static ElementBKFovs Create(XElement element)
        {
            if (element == null)
            {
                return(null);
            }

            ElementBKFovs item = new ElementBKFovs();

            item.fovs

                = (from Element in element.Elements(ElementFov.Name)
                   select ElementFov.Create(Element)
                   ).ToArray();
            return(item);
        }