예제 #1
0
        public static CT_CustomWorkbookView Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_CustomWorkbookView ctObj = new CT_CustomWorkbookView();

            ctObj.name                   = XmlHelper.ReadString(node.Attributes["name"]);
            ctObj.guid                   = XmlHelper.ReadString(node.Attributes["guid"]);
            ctObj.autoUpdate             = XmlHelper.ReadBool(node.Attributes["autoUpdate"]);
            ctObj.mergeInterval          = XmlHelper.ReadUInt(node.Attributes["mergeInterval"]);
            ctObj.mergeIntervalSpecified = node.Attributes["mergeInterval"] != null;
            ctObj.changesSavedWin        = XmlHelper.ReadBool(node.Attributes["changesSavedWin"]);
            ctObj.onlySync               = XmlHelper.ReadBool(node.Attributes["onlySync"]);
            ctObj.personalView           = XmlHelper.ReadBool(node.Attributes["personalView"]);
            ctObj.includePrintSettings   = XmlHelper.ReadBool(node.Attributes["includePrintSettings"]);
            ctObj.includeHiddenRowCol    = XmlHelper.ReadBool(node.Attributes["includeHiddenRowCol"]);
            ctObj.maximized              = XmlHelper.ReadBool(node.Attributes["maximized"]);
            ctObj.minimized              = XmlHelper.ReadBool(node.Attributes["minimized"]);
            ctObj.showHorizontalScroll   = XmlHelper.ReadBool(node.Attributes["showHorizontalScroll"]);
            ctObj.showVerticalScroll     = XmlHelper.ReadBool(node.Attributes["showVerticalScroll"]);
            ctObj.showSheetTabs          = XmlHelper.ReadBool(node.Attributes["showSheetTabs"]);
            ctObj.xWindow                = XmlHelper.ReadInt(node.Attributes["xWindow"]);
            ctObj.yWindow                = XmlHelper.ReadInt(node.Attributes["yWindow"]);
            ctObj.windowWidth            = XmlHelper.ReadUInt(node.Attributes["windowWidth"]);
            ctObj.windowHeight           = XmlHelper.ReadUInt(node.Attributes["windowHeight"]);
            ctObj.tabRatio               = XmlHelper.ReadUInt(node.Attributes["tabRatio"]);
            ctObj.activeSheetId          = XmlHelper.ReadUInt(node.Attributes["activeSheetId"]);
            ctObj.showFormulaBar         = XmlHelper.ReadBool(node.Attributes["showFormulaBar"]);
            ctObj.showStatusbar          = XmlHelper.ReadBool(node.Attributes["showStatusbar"]);
            if (node.Attributes["showComments"] != null)
            {
                ctObj.showComments = (ST_Comments)Enum.Parse(typeof(ST_Comments), node.Attributes["showComments"].Value);
            }
            if (node.Attributes["showObjects"] != null)
            {
                ctObj.showObjects = (ST_Objects)Enum.Parse(typeof(ST_Objects), node.Attributes["showObjects"].Value);
            }
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "extLst")
                {
                    ctObj.extLst = CT_ExtensionList.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
예제 #2
0
        public static CT_CustomWorkbookViews Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_CustomWorkbookViews ctObj = new CT_CustomWorkbookViews();

            ctObj.customWorkbookView = new List <CT_CustomWorkbookView>();
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "customWorkbookView")
                {
                    ctObj.customWorkbookView.Add(CT_CustomWorkbookView.Parse(childNode, namespaceManager));
                }
            }
            return(ctObj);
        }
예제 #3
0
 public static CT_CustomWorkbookView Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_CustomWorkbookView ctObj = new CT_CustomWorkbookView();
     ctObj.name = XmlHelper.ReadString(node.Attributes["name"]);
     ctObj.guid = XmlHelper.ReadString(node.Attributes["guid"]);
     ctObj.autoUpdate = XmlHelper.ReadBool(node.Attributes["autoUpdate"]);
     ctObj.mergeInterval = XmlHelper.ReadUInt(node.Attributes["mergeInterval"]);
     ctObj.mergeIntervalSpecified = node.Attributes["mergeInterval"] != null;
     ctObj.changesSavedWin = XmlHelper.ReadBool(node.Attributes["changesSavedWin"]);
     ctObj.onlySync = XmlHelper.ReadBool(node.Attributes["onlySync"]);
     ctObj.personalView = XmlHelper.ReadBool(node.Attributes["personalView"]);
     ctObj.includePrintSettings = XmlHelper.ReadBool(node.Attributes["includePrintSettings"]);
     ctObj.includeHiddenRowCol = XmlHelper.ReadBool(node.Attributes["includeHiddenRowCol"]);
     ctObj.maximized = XmlHelper.ReadBool(node.Attributes["maximized"]);
     ctObj.minimized = XmlHelper.ReadBool(node.Attributes["minimized"]);
     ctObj.showHorizontalScroll = XmlHelper.ReadBool(node.Attributes["showHorizontalScroll"]);
     ctObj.showVerticalScroll = XmlHelper.ReadBool(node.Attributes["showVerticalScroll"]);
     ctObj.showSheetTabs = XmlHelper.ReadBool(node.Attributes["showSheetTabs"]);
     ctObj.xWindow = XmlHelper.ReadInt(node.Attributes["xWindow"]);
     ctObj.yWindow = XmlHelper.ReadInt(node.Attributes["yWindow"]);
     ctObj.windowWidth = XmlHelper.ReadUInt(node.Attributes["windowWidth"]);
     ctObj.windowHeight = XmlHelper.ReadUInt(node.Attributes["windowHeight"]);
     ctObj.tabRatio = XmlHelper.ReadUInt(node.Attributes["tabRatio"]);
     ctObj.activeSheetId = XmlHelper.ReadUInt(node.Attributes["activeSheetId"]);
     ctObj.showFormulaBar = XmlHelper.ReadBool(node.Attributes["showFormulaBar"]);
     ctObj.showStatusbar = XmlHelper.ReadBool(node.Attributes["showStatusbar"]);
     if (node.Attributes["showComments"] != null)
         ctObj.showComments = (ST_Comments)Enum.Parse(typeof(ST_Comments), node.Attributes["showComments"].Value);
     if (node.Attributes["showObjects"] != null)
         ctObj.showObjects = (ST_Objects)Enum.Parse(typeof(ST_Objects), node.Attributes["showObjects"].Value);
     foreach (XmlNode childNode in node.ChildNodes)
     {
         if (childNode.LocalName == "extLst")
             ctObj.extLst = CT_ExtensionList.Parse(childNode, namespaceManager);
     }
     return ctObj;
 }