Exemplo n.º 1
0
 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);
         }
     }
 }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
        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);
        }