public void Load(DocumentReader reader) { items = new Dictionary <string, object>(); int count = reader.ReadInt(); for (int i = 0; i < count; i++) { var name = reader.ReadString(); string valueType = reader.ReadString(); object value = null; if (valueType == "bool") { value = reader.ReadBoolean(); } else if (valueType == "int") { value = reader.ReadInt(); } else if (valueType == "color") { value = reader.ReadColor(); } items.Add(name, value); } UpdateSettings(); }
public void Load(DocumentReader reader) { Name = reader.ReadString(); Style = new Style(); Style.Load(reader); Visible = reader.ReadBoolean(); }