public VariableGroupXml SaveToXml() { VariableGroupXml xml = new VariableGroupXml(); xml.Name = Name; xml.ShortName = ShortName; xml.Variables = this.Variables.Select(x => x.SaveToFile()).ToArray(); return xml; }
public VariableContainerXml() { Groups = new VariableGroupXml[] {}; }
public void LoadFromXml(VariableGroupXml xml) { this.Name = xml.Name; this.ShortName = xml.ShortName; Variables.Clear(); foreach (VariableXml variable in xml.Variables) { Variable var = new Variable(); var.LoadFromXml(variable); var.OnDelete += this.DeleteVariable; this.Variables.Add(var); } }