QyotoDevelop.QyotoForm.WriteXml C# (CSharp) Method

WriteXml() public static method

public static WriteXml ( XmlNode node, QyotoDesignInfo info ) : QyotoForm
node System.Xml.XmlNode
info QyotoDesignInfo
return QyotoForm
        public static QyotoForm WriteXml(XmlNode node, QyotoDesignInfo info)
        {
            string className = node.SelectSingleNode("widget").Attributes["name"].Value;
            string uiFileName = Path.Combine(info.QtGuiFolder, String.Format("{0}.ui", className));

            // Create .ui file
            using (StreamWriter writer = new StreamWriter(uiFileName)) {
                writer.Write(node.OuterXml);
            }

            uiFileName = Path.GetFileName(uiFileName);
            QyotoForm form = new QyotoForm(uiFileName);
            form.Project = info.Project;
            return form;
        }