uForms.UFProject.ExportXml C# (CSharp) Method

ExportXml() public static method

public static ExportXml ( string xmlPath ) : void
xmlPath string
return void
        public static void ExportXml(string xmlPath)
        {
            List<Type> list = new List<Type>();
            current.Controls.ForEach(child => child.ForTree(node =>
            {
                list.Add(node.GetType());
            }));
            list.Add(typeof(UFControl));
            list = list.Distinct().ToList();

            var attributes = new XmlAttributes();
            list.ForEach(t => attributes.XmlArrayItems.Add(new XmlArrayItemAttribute(t)));

            var attrOverride = new XmlAttributeOverrides();
            attrOverride.Add(typeof(UFControl), "childList", attributes);
            attrOverride.Add(typeof(UFProject), "Controls", attributes);

            UFUtility.ExportXml(xmlPath, current, attrOverride: attrOverride);
        }

Usage Example

Beispiel #1
0
        protected override void OnDisable()
        {
            base.OnDisable();

            UFProject.ExportXml(TempXmlPath);
            UFSelection.OnSelectionChange = null;
            UFSelection.ActiveControl     = null;
        }
All Usage Examples Of uForms.UFProject::ExportXml