public static SavedTabGroupState FromXml(XElement child) { var savedState = new SavedTabGroupState(); savedState.Index = (int)child.Attribute("index"); foreach (var tab in child.Elements("Tab")) savedState.Tabs.Add(SavedTabState.FromXml(tab)); return savedState; }
public static SavedTabGroupState FromXml(XElement child) { var savedState = new SavedTabGroupState(); savedState.Index = (int)child.Attribute("index"); foreach (var tab in child.Elements("Tab")) { savedState.Tabs.Add(SavedTabState.FromXml(tab)); } return(savedState); }
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); }
static SavedTabGroupState CreateSavedTabGroupState(TabManager<TabStateDecompile> tabManager) { var savedState = new SavedTabGroupState(); savedState.Index = tabManager.ActiveIndex; foreach (var tabState in tabManager.AllTabStates) savedState.Tabs.Add(CreateSavedTabState(tabState)); return savedState; }