public ValueGroupCtl CreateValueGroup(string name) { Debug.Log("Adding Group:" + name); ValueGroupCtl c = new ValueGroupCtl(); c.SetName(name); AddGroup(c); return(c); }
public void Dispose() { isConnected = false; if (client != null) { client.Disconnect(); } _thread.Abort(); values = new ValueGroupCtl(); }
void ParseScheme(string scheme) { if (values != null) { values = new ValueGroupCtl(); } using (var r = new StringReader(scheme)) { XmlDocument doc = new XmlDocument(); doc.Load(r); XmlElement e = doc.DocumentElement; if (e != null) { XmlLoadGroup(e, null); } } }
public ValueControllerCtl GetValue(string path) { if (values == null) { return(null); } string[] objects = path.Split(".".ToCharArray()); ValueGroupCtl g = values; for (int i = 0; i < objects.Length - 1; ++i) { g = g.GetGroup(objects[i]); if (g == null) { break; } } if (g != null) { return(g.GetValue(objects[objects.Length - 1])); } return(null); }
void XmlLoadGroup(XmlElement reader, ValueGroupCtl parent) { ValueGroupCtl g = new ValueGroupCtl(); if (parent == null) { values = g; values.SetName("Values"); values.OnChanged += values_OnChanged; } else { parent.AddGroup(g); } // while (reader.MoveToNextAttribute()) // { // } g.SetName(reader.GetAttribute("Name")); XmlNode e; e = reader.FirstChild; while (e != null) { if (e.NodeType == XmlNodeType.Element) { if (e.Name == "ValueGroup") { XmlLoadGroup(e as XmlElement, g); } else if (e.Name == "Value") { XmlLoadValue(e as XmlElement, g); } } e = e.NextSibling; } }
public ValueGroupCtl CreateValueGroup(string name) { Debug.Log ("Adding Group:" + name); ValueGroupCtl c = new ValueGroupCtl(); c.SetName(name); AddGroup(c); return c; }
public void AddGroup(ValueGroupCtl v) { groups.Add(v); v.OnChanged += c_OnChanged; }
public NetValueObject() { _thread = new ReceiveThread (this); values = new ValueGroupCtl (); }
void XmlLoadValue(XmlElement reader,ValueGroupCtl parent) { parent.CreateValue(reader.GetAttribute("Name"), reader.GetAttribute("Type"), reader.GetAttribute("Value")); }
void XmlLoadGroup(XmlElement reader, ValueGroupCtl parent) { ValueGroupCtl g=new ValueGroupCtl(); if(parent==null) { values=g; values.SetName("Values"); values.OnChanged += values_OnChanged; } else { parent.AddGroup(g); } // while (reader.MoveToNextAttribute()) // { // } g.SetName(reader.GetAttribute("Name")); XmlNode e; e = reader.FirstChild; while(e!=null) { if (e.NodeType == XmlNodeType.Element) { if (e.Name == "ValueGroup") { XmlLoadGroup(e as XmlElement, g); } else if (e.Name == "Value") { XmlLoadValue(e as XmlElement, g); } } e = e.NextSibling; } }
void ParseScheme(string scheme) { if(values!=null) { values = null; } using (var r = new StringReader(scheme)) { XmlDocument doc = new XmlDocument(); doc.Load(r); XmlElement e = doc.DocumentElement; if (e!=null) { XmlLoadGroup(e,null); } } }
void XmlLoadValue(XmlElement reader, ValueGroupCtl parent) { parent.CreateValue(reader.GetAttribute("Name"), reader.GetAttribute("Type"), reader.GetAttribute("Value")); }
public NetValueObject() { _thread = new ReceiveThread(this); values = new ValueGroupCtl(); }