Exemple #1
0
        //[XmlElement("Accel", typeof(string), DataType = "integer")]
        //[XmlElement("Accel2", typeof(string), DataType = "integer")]
        //[XmlElement("Anchor", typeof(string))]
        //[XmlElement("AutoFill", typeof(ST_TrueFalseBlank))]
        //[XmlElement("AutoLine", typeof(ST_TrueFalseBlank))]
        //[XmlElement("AutoPict", typeof(ST_TrueFalseBlank))]
        //[XmlElement("AutoScale", typeof(ST_TrueFalseBlank))]
        //[XmlElement("CF", typeof(ST_CF))]
        //[XmlElement("Camera", typeof(ST_TrueFalseBlank))]
        //[XmlElement("Cancel", typeof(ST_TrueFalseBlank))]
        //[XmlElement("Checked", typeof(string), DataType = "integer")]
        //[XmlElement("ColHidden", typeof(ST_TrueFalseBlank))]
        //[XmlElement("Colored", typeof(ST_TrueFalseBlank))]
        //[XmlElement("Column", typeof(string), DataType = "integer")]
        //[XmlElement("DDE", typeof(ST_TrueFalseBlank))]
        //[XmlElement("Default", typeof(ST_TrueFalseBlank))]
        //[XmlElement("DefaultSize", typeof(ST_TrueFalseBlank))]
        //[XmlElement("Disabled", typeof(ST_TrueFalseBlank))]
        //[XmlElement("Dismiss", typeof(ST_TrueFalseBlank))]
        //[XmlElement("DropLines", typeof(string), DataType = "integer")]
        //[XmlElement("DropStyle", typeof(string))]
        //[XmlElement("Dx", typeof(string), DataType = "integer")]
        //[XmlElement("FirstButton", typeof(ST_TrueFalseBlank))]
        //[XmlElement("FmlaGroup", typeof(string))]
        //[XmlElement("FmlaLink", typeof(string))]
        //[XmlElement("FmlaMacro", typeof(string))]
        //[XmlElement("FmlaPict", typeof(string))]
        //[XmlElement("FmlaRange", typeof(string))]
        //[XmlElement("FmlaTxbx", typeof(string))]
        //[XmlElement("Help", typeof(ST_TrueFalseBlank))]
        //[XmlElement("Horiz", typeof(ST_TrueFalseBlank))]
        //[XmlElement("Inc", typeof(string), DataType = "integer")]
        //[XmlElement("JustLastX", typeof(ST_TrueFalseBlank))]
        //[XmlElement("LCT", typeof(string))]
        //[XmlElement("ListItem", typeof(string))]
        //[XmlElement("LockText", typeof(ST_TrueFalseBlank))]
        //[XmlElement("Locked", typeof(ST_TrueFalseBlank))]
        //[XmlElement("MapOCX", typeof(ST_TrueFalseBlank))]
        //[XmlElement("Max", typeof(string), DataType = "integer")]
        //[XmlElement("Min", typeof(string), DataType = "integer")]
        //[XmlElement("MoveWithCells", typeof(ST_TrueFalseBlank))]
        //[XmlElement("MultiLine", typeof(ST_TrueFalseBlank))]
        //[XmlElement("MultiSel", typeof(string))]
        //[XmlElement("NoThreeD", typeof(ST_TrueFalseBlank))]
        //[XmlElement("NoThreeD2", typeof(ST_TrueFalseBlank))]
        //[XmlElement("Page", typeof(string), DataType = "integer")]
        //[XmlElement("PrintObject", typeof(ST_TrueFalseBlank))]
        //[XmlElement("RecalcAlways", typeof(ST_TrueFalseBlank))]
        //[XmlElement("Row", typeof(string), DataType = "integer")]
        //[XmlElement("RowHidden", typeof(ST_TrueFalseBlank))]
        //[XmlElement("ScriptExtended", typeof(string))]
        //[XmlElement("ScriptLanguage", typeof(string), DataType = "nonNegativeInteger")]
        //[XmlElement("ScriptLocation", typeof(string), DataType = "nonNegativeInteger")]
        //[XmlElement("ScriptText", typeof(string))]
        //[XmlElement("SecretEdit", typeof(ST_TrueFalseBlank))]
        //[XmlElement("Sel", typeof(string), DataType = "integer")]
        //[XmlElement("SelType", typeof(string))]
        //[XmlElement("SizeWithCells", typeof(ST_TrueFalseBlank))]
        //[XmlElement("TextHAlign", typeof(string))]
        //[XmlElement("TextVAlign", typeof(string))]
        //[XmlElement("UIObj", typeof(ST_TrueFalseBlank))]
        //[XmlElement("VScroll", typeof(ST_TrueFalseBlank))]
        //[XmlElement("VTEdit", typeof(string), DataType = "integer")]
        //[XmlElement("Val", typeof(string), DataType = "integer")]
        //[XmlElement("ValidIds", typeof(ST_TrueFalseBlank))]
        //[XmlElement("Visible", typeof(ST_TrueFalseBlank))]
        //[XmlElement("WidthMin", typeof(string), DataType = "integer")]
        //[XmlChoiceIdentifier("ItemsElementName")]
        //public List<object> Items
        //{
        //    get
        //    {
        //        return this.itemsField;
        //    }
        //    set
        //    {
        //        this.itemsField = value;
        //    }
        //}
        public static CT_ClientData Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_ClientData ctObj = new CT_ClientData();

            if (node.Attributes["ObjectType"] != null)
            {
                ctObj.ObjectType = (ST_ObjectType)Enum.Parse(typeof(ST_ObjectType), node.Attributes["ObjectType"].Value);
            }
            ctObj.column = new List <Int32>();
            ctObj.row    = new List <Int32>();
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "Anchor")
                {
                    ctObj.anchor = childNode.InnerText;
                }
                else if (childNode.LocalName == "AutoFill")
                {
                    ctObj.autoFill = NPOI.OpenXmlFormats.Util.XmlHelper.ReadTrueFalseBlank(childNode.InnerText);
                }
                else if (childNode.LocalName == "Visible")
                {
                    ctObj.visible = NPOI.OpenXmlFormats.Util.XmlHelper.ReadTrueFalseBlank(childNode.InnerText);
                }
                else if (childNode.LocalName == "MoveWithCells")
                {
                    ctObj.moveWithCells = NPOI.OpenXmlFormats.Util.XmlHelper.ReadTrueFalseBlank(childNode.InnerText);
                }
                else if (childNode.LocalName == "SizeWithCells")
                {
                    ctObj.sizeWithCells = NPOI.OpenXmlFormats.Util.XmlHelper.ReadTrueFalseBlank(childNode.InnerText);
                }
                else if (childNode.LocalName == "Column")
                {
                    ctObj.column.Add(Int32.Parse(childNode.InnerText));
                }
                else if (childNode.LocalName == "Row")
                {
                    ctObj.row.Add(Int32.Parse(childNode.InnerText));
                }
            }
            return(ctObj);
        }
Exemple #2
0
 //[XmlElement("Accel", typeof(string), DataType = "integer")]
 //[XmlElement("Accel2", typeof(string), DataType = "integer")]
 //[XmlElement("Anchor", typeof(string))]
 //[XmlElement("AutoFill", typeof(ST_TrueFalseBlank))]
 //[XmlElement("AutoLine", typeof(ST_TrueFalseBlank))]
 //[XmlElement("AutoPict", typeof(ST_TrueFalseBlank))]
 //[XmlElement("AutoScale", typeof(ST_TrueFalseBlank))]
 //[XmlElement("CF", typeof(ST_CF))]
 //[XmlElement("Camera", typeof(ST_TrueFalseBlank))]
 //[XmlElement("Cancel", typeof(ST_TrueFalseBlank))]
 //[XmlElement("Checked", typeof(string), DataType = "integer")]
 //[XmlElement("ColHidden", typeof(ST_TrueFalseBlank))]
 //[XmlElement("Colored", typeof(ST_TrueFalseBlank))]
 //[XmlElement("Column", typeof(string), DataType = "integer")]
 //[XmlElement("DDE", typeof(ST_TrueFalseBlank))]
 //[XmlElement("Default", typeof(ST_TrueFalseBlank))]
 //[XmlElement("DefaultSize", typeof(ST_TrueFalseBlank))]
 //[XmlElement("Disabled", typeof(ST_TrueFalseBlank))]
 //[XmlElement("Dismiss", typeof(ST_TrueFalseBlank))]
 //[XmlElement("DropLines", typeof(string), DataType = "integer")]
 //[XmlElement("DropStyle", typeof(string))]
 //[XmlElement("Dx", typeof(string), DataType = "integer")]
 //[XmlElement("FirstButton", typeof(ST_TrueFalseBlank))]
 //[XmlElement("FmlaGroup", typeof(string))]
 //[XmlElement("FmlaLink", typeof(string))]
 //[XmlElement("FmlaMacro", typeof(string))]
 //[XmlElement("FmlaPict", typeof(string))]
 //[XmlElement("FmlaRange", typeof(string))]
 //[XmlElement("FmlaTxbx", typeof(string))]
 //[XmlElement("Help", typeof(ST_TrueFalseBlank))]
 //[XmlElement("Horiz", typeof(ST_TrueFalseBlank))]
 //[XmlElement("Inc", typeof(string), DataType = "integer")]
 //[XmlElement("JustLastX", typeof(ST_TrueFalseBlank))]
 //[XmlElement("LCT", typeof(string))]
 //[XmlElement("ListItem", typeof(string))]
 //[XmlElement("LockText", typeof(ST_TrueFalseBlank))]
 //[XmlElement("Locked", typeof(ST_TrueFalseBlank))]
 //[XmlElement("MapOCX", typeof(ST_TrueFalseBlank))]
 //[XmlElement("Max", typeof(string), DataType = "integer")]
 //[XmlElement("Min", typeof(string), DataType = "integer")]
 //[XmlElement("MoveWithCells", typeof(ST_TrueFalseBlank))]
 //[XmlElement("MultiLine", typeof(ST_TrueFalseBlank))]
 //[XmlElement("MultiSel", typeof(string))]
 //[XmlElement("NoThreeD", typeof(ST_TrueFalseBlank))]
 //[XmlElement("NoThreeD2", typeof(ST_TrueFalseBlank))]
 //[XmlElement("Page", typeof(string), DataType = "integer")]
 //[XmlElement("PrintObject", typeof(ST_TrueFalseBlank))]
 //[XmlElement("RecalcAlways", typeof(ST_TrueFalseBlank))]
 //[XmlElement("Row", typeof(string), DataType = "integer")]
 //[XmlElement("RowHidden", typeof(ST_TrueFalseBlank))]
 //[XmlElement("ScriptExtended", typeof(string))]
 //[XmlElement("ScriptLanguage", typeof(string), DataType = "nonNegativeInteger")]
 //[XmlElement("ScriptLocation", typeof(string), DataType = "nonNegativeInteger")]
 //[XmlElement("ScriptText", typeof(string))]
 //[XmlElement("SecretEdit", typeof(ST_TrueFalseBlank))]
 //[XmlElement("Sel", typeof(string), DataType = "integer")]
 //[XmlElement("SelType", typeof(string))]
 //[XmlElement("SizeWithCells", typeof(ST_TrueFalseBlank))]
 //[XmlElement("TextHAlign", typeof(string))]
 //[XmlElement("TextVAlign", typeof(string))]
 //[XmlElement("UIObj", typeof(ST_TrueFalseBlank))]
 //[XmlElement("VScroll", typeof(ST_TrueFalseBlank))]
 //[XmlElement("VTEdit", typeof(string), DataType = "integer")]
 //[XmlElement("Val", typeof(string), DataType = "integer")]
 //[XmlElement("ValidIds", typeof(ST_TrueFalseBlank))]
 //[XmlElement("Visible", typeof(ST_TrueFalseBlank))]
 //[XmlElement("WidthMin", typeof(string), DataType = "integer")]
 //[XmlChoiceIdentifier("ItemsElementName")]
 //public List<object> Items
 //{
 //    get
 //    {
 //        return this.itemsField;
 //    }
 //    set
 //    {
 //        this.itemsField = value;
 //    }
 //}
 public static CT_ClientData Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_ClientData ctObj = new CT_ClientData();
     if (node.Attributes["ObjectType"] != null)
         ctObj.ObjectType = (ST_ObjectType)Enum.Parse(typeof(ST_ObjectType), node.Attributes["ObjectType"].Value);
     ctObj.column = new List<Int32>();
     ctObj.row = new List<Int32>();
     foreach (XmlNode childNode in node.ChildNodes)
     {
         if (childNode.LocalName == "Anchor")
             ctObj.anchor = childNode.InnerText;
         else if (childNode.LocalName == "AutoFill")
             ctObj.autoFill = NPOI.OpenXmlFormats.Util.XmlHelper.ReadTrueFalseBlank(childNode.InnerText);
         else if (childNode.LocalName == "Visible")
             ctObj.visible =NPOI.OpenXmlFormats.Util.XmlHelper.ReadTrueFalseBlank(childNode.InnerText);
         else if (childNode.LocalName == "MoveWithCells")
             ctObj.moveWithCells =NPOI.OpenXmlFormats.Util.XmlHelper.ReadTrueFalseBlank(childNode.InnerText);
         else if (childNode.LocalName == "SizeWithCells")
             ctObj.sizeWithCells =NPOI.OpenXmlFormats.Util.XmlHelper.ReadTrueFalseBlank(childNode.InnerText);
         else if (childNode.LocalName == "Column")
             ctObj.column.Add(Int32.Parse(childNode.InnerText));
         else if (childNode.LocalName == "Row")
             ctObj.row.Add(Int32.Parse(childNode.InnerText));
     }
     return ctObj;
 }