private void _FindRadioGroup(UIContainer container, string group, List <UIRadioButton> targetList) { foreach (var child in container.GetChildren()) { if (child is UIRadioButton && ((UIRadioButton)child).RadioGroup == group) { targetList.Add((UIRadioButton)child); } else if (child is UIContainer) { _FindRadioGroup((UIContainer)child, group, targetList); } } }
public void RemoveCurrent() { /** Remove all dialogs **/ while (Dialogs.Count > 0) { RemoveDialog(Dialogs[0]); } var currentScreen = mainUI.GetChildren().OfType <UIScreen>().FirstOrDefault(); if (currentScreen != null) { ((UIScreen)currentScreen).OnHide(); mainUI.Remove(currentScreen); } }
private List <TreeNode> ExploreUIContainer(UIContainer container) { var result = new List <TreeNode>(); foreach (var child in container.GetChildren()) { var node = new TreeNode(child.ToString()); ItemMap.Add(node, child); if (child is UIContainer) { node.Nodes.AddRange(ExploreUIContainer((UIContainer)child).ToArray()); } result.Add(node); } return(result); }