Exemplo n.º 1
0
        public static SavedTabGroupsState FromXml(XElement child)
        {
            var savedState = new SavedTabGroupsState();

            savedState.Index        = (int)child.Attribute("index");
            savedState.IsHorizontal = (bool)child.Attribute("is-horizontal");

            foreach (var group in child.Elements("TabGroup"))
            {
                savedState.Groups.Add(SavedTabGroupState.FromXml(group));
            }

            return(savedState);
        }
Exemplo n.º 2
0
        public static SavedTabGroupState FromXml(XElement child)
        {
            var savedState = new SavedTabGroupState();

            savedState.Index = (int)child.Attribute("index");

            foreach (var tab in child.Elements("Tab"))
            {
                var tabState = SavedTabState.FromXml(tab);
                if (tabState != null)
                {
                    savedState.Tabs.Add(tabState);
                }
            }

            return(savedState);
        }