Пример #1
0
        //[XmlAttribute]
        //public int Value { get; set; }

        internal static EnumItemElementXml ConvertToNode(EnumItemElement model)
        {
            var xml = new EnumItemElementXml();

            xml.Name  = model.Name;
            xml.Label = model.Label;
            //xml.Value = model.Value;

            return(xml);
        }
Пример #2
0
        internal static EnumElementXml ConvertToNode(EnumElement model)
        {
            var xml = new EnumElementXml();

            xml.FullName = model.Name;
            xml.Label    = model.Label;
            xml.Left     = model.Left;
            xml.Top      = model.Top;
            xml.Width    = model.Width;
            xml.Height   = model.Height;

            xml.Items = new EnumItemElementXml[model.Items.Count];
            for (int i = 0, c = model.Items.Count; i < c; i++)
            {
                var property    = model.Items[i];
                var propertyXml = EnumItemElementXml.ConvertToNode(property);
                xml.Items[i] = propertyXml;
            }

            return(xml);
        }