Пример #1
0
        public static CT_TableStyleInfo Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_TableStyleInfo ctObj = new CT_TableStyleInfo();

            ctObj.name = XmlHelper.ReadString(node.Attributes["name"]);
            if (node.Attributes["showFirstColumn"] != null)
            {
                ctObj.showFirstColumn = XmlHelper.ReadBool(node.Attributes["showFirstColumn"]);
            }
            if (node.Attributes["showLastColumn"] != null)
            {
                ctObj.showLastColumn = XmlHelper.ReadBool(node.Attributes["showLastColumn"]);
            }
            if (node.Attributes["showRowStripes"] != null)
            {
                ctObj.showRowStripes = XmlHelper.ReadBool(node.Attributes["showRowStripes"]);
            }
            if (node.Attributes["showColumnStripes"] != null)
            {
                ctObj.showColumnStripes = XmlHelper.ReadBool(node.Attributes["showColumnStripes"]);
            }
            return(ctObj);
        }
Пример #2
0
        public static CT_Table Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Table ctObj = new CT_Table();

            if (node.Attributes["id"] != null)
            {
                ctObj.id = XmlHelper.ReadUInt(node.Attributes["id"]);
            }
            ctObj.name        = XmlHelper.ReadString(node.Attributes["name"]);
            ctObj.displayName = XmlHelper.ReadString(node.Attributes["displayName"]);
            ctObj.comment     = XmlHelper.ReadString(node.Attributes["comment"]);
            ctObj.@ref        = XmlHelper.ReadString(node.Attributes["ref"]);
            if (node.Attributes["tableType"] != null)
            {
                ctObj.tableType = (ST_TableType)Enum.Parse(typeof(ST_TableType), node.Attributes["tableType"].Value);
            }
            if (node.Attributes["headerRowCount"] != null)
            {
                ctObj.headerRowCount = XmlHelper.ReadUInt(node.Attributes["headerRowCount"]);
            }
            if (node.Attributes["insertRow"] != null)
            {
                ctObj.insertRow = XmlHelper.ReadBool(node.Attributes["insertRow"]);
            }
            if (node.Attributes["insertRowShift"] != null)
            {
                ctObj.insertRowShift = XmlHelper.ReadBool(node.Attributes["insertRowShift"]);
            }
            if (node.Attributes["totalsRowCount"] != null)
            {
                ctObj.totalsRowCount = XmlHelper.ReadUInt(node.Attributes["totalsRowCount"]);
            }
            if (node.Attributes["totalsRowShown"] != null)
            {
                ctObj.totalsRowShown = XmlHelper.ReadBool(node.Attributes["totalsRowShown"]);
            }
            if (node.Attributes["published"] != null)
            {
                ctObj.published = XmlHelper.ReadBool(node.Attributes["published"]);
            }
            if (node.Attributes["headerRowDxfId"] != null)
            {
                ctObj.headerRowDxfId = XmlHelper.ReadUInt(node.Attributes["headerRowDxfId"]);
            }
            if (node.Attributes["dataDxfId"] != null)
            {
                ctObj.dataDxfId = XmlHelper.ReadUInt(node.Attributes["dataDxfId"]);
            }
            if (node.Attributes["totalsRowDxfId"] != null)
            {
                ctObj.totalsRowDxfId = XmlHelper.ReadUInt(node.Attributes["totalsRowDxfId"]);
            }
            if (node.Attributes["headerRowBorderDxfId"] != null)
            {
                ctObj.headerRowBorderDxfId = XmlHelper.ReadUInt(node.Attributes["headerRowBorderDxfId"]);
            }
            if (node.Attributes["tableBorderDxfId"] != null)
            {
                ctObj.tableBorderDxfId = XmlHelper.ReadUInt(node.Attributes["tableBorderDxfId"]);
            }
            if (node.Attributes["totalsRowBorderDxfId"] != null)
            {
                ctObj.totalsRowBorderDxfId = XmlHelper.ReadUInt(node.Attributes["totalsRowBorderDxfId"]);
            }
            ctObj.headerRowCellStyle = XmlHelper.ReadString(node.Attributes["headerRowCellStyle"]);
            ctObj.dataCellStyle      = XmlHelper.ReadString(node.Attributes["dataCellStyle"]);
            ctObj.totalsRowCellStyle = XmlHelper.ReadString(node.Attributes["totalsRowCellStyle"]);
            if (node.Attributes["connectionId"] != null)
            {
                ctObj.connectionId = XmlHelper.ReadUInt(node.Attributes["connectionId"]);
            }
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "autoFilter")
                {
                    ctObj.autoFilter = CT_AutoFilter.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "sortState")
                {
                    ctObj.sortState = CT_SortState.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "tableColumns")
                {
                    ctObj.tableColumns = CT_TableColumns.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "tableStyleInfo")
                {
                    ctObj.tableStyleInfo = CT_TableStyleInfo.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "extLst")
                {
                    ctObj.extLst = CT_ExtensionList.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Пример #3
0
 public CT_TableStyleInfo AddNewTableStyleInfo()
 {
     this.tableStyleInfoField = new CT_TableStyleInfo();
     return(this.tableStyleInfoField);
 }
Пример #4
0
 public static CT_TableStyleInfo Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_TableStyleInfo ctObj = new CT_TableStyleInfo();
     ctObj.name = XmlHelper.ReadString(node.Attributes["name"]);
     if (node.Attributes["showFirstColumn"] != null)
         ctObj.showFirstColumn = XmlHelper.ReadBool(node.Attributes["showFirstColumn"]);
     if (node.Attributes["showLastColumn"] != null)
         ctObj.showLastColumn = XmlHelper.ReadBool(node.Attributes["showLastColumn"]);
     if (node.Attributes["showRowStripes"] != null)
         ctObj.showRowStripes = XmlHelper.ReadBool(node.Attributes["showRowStripes"]);
     if (node.Attributes["showColumnStripes"] != null)
         ctObj.showColumnStripes = XmlHelper.ReadBool(node.Attributes["showColumnStripes"]);
     return ctObj;
 }