Ejemplo n.º 1
0
        internal ControlState GetChild(String location, bool create)
        {
            if (location == null)
            {
                return(this);
            }

            int    dotindex  = location.IndexOf('.');
            String childname = null;
            String childns   = null;

            if (dotindex == -1)
            {
                childname = location;
            }
            else
            {
                childname = location.Substring(0, dotindex);
                childns   = location.Substring(dotindex + 1);
            }

            if (!children.ContainsKey(childname) && create)
            {
                ControlState cs = new ControlState(this);
                children[childname] = cs;
            }

            if (children.ContainsKey(childname))
            {
                return(children[childname].GetChild(childns, create));
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 2
0
 private ControlState(ControlState p)
 {
     parent = p;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Clears all current control bindings.
 /// </summary>
 public void ClearBindings()
 {
     rootcstate = new ControlState();
 }
Ejemplo n.º 4
0
 private ControlState(ControlState p)
 {
     parent = p;
 }
Ejemplo n.º 5
0
 public ControlState()
 {
     parent = null;
 }
Ejemplo n.º 6
0
        internal ControlState GetChild(String location, bool create)
        {
            if (location == null)
                return this;

            int dotindex = location.IndexOf('.');
            String childname = null;
            String childns = null;
            if (dotindex == -1)
                childname = location;
            else
            {
                childname = location.Substring(0, dotindex);
                childns = location.Substring(dotindex + 1);
            }

            if (!children.ContainsKey(childname) && create)
            {
                ControlState cs = new ControlState(this);
                children[childname] = cs;
            }

            if (children.ContainsKey(childname))
                return children[childname].GetChild(childns, create);
            else
                return null;
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Clears all current control bindings.
 /// </summary>
 public void ClearBindings()
 {
     rootcstate = new ControlState();
 }