Example #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);
            }
        }
Example #2
0
 private ControlState(ControlState p)
 {
     parent = p;
 }
Example #3
0
 /// <summary>
 /// Clears all current control bindings.
 /// </summary>
 public void ClearBindings()
 {
     rootcstate = new ControlState();
 }
Example #4
0
 private ControlState(ControlState p)
 {
     parent = p;
 }
Example #5
0
 public ControlState()
 {
     parent = null;
 }
Example #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;
        }
Example #7
0
 /// <summary>
 /// Clears all current control bindings.
 /// </summary>
 public void ClearBindings()
 {
     rootcstate = new ControlState();
 }