public void FromJson(string content) { PMT.RE.ListTmp tmp = new PMT.RE.ListTmp(); src = tmp.Get(0); width = tmp.GetAsFloat(1); height = tmp.GetAsFloat(2); }
public override string ToString() { PMT.RE.ListTmp tmp = new PMT.RE.ListTmp(); for (int i = 0; i < Count; i++) { tmp.Add(this[i].ToString()); } return(CML.ComUtility.ToJson(tmp)); }
public virtual void FromJson(string content) { Clear(); PMT.RE.ListTmp tmp = new PMT.RE.ListTmp(content); for (int i = 0; i < tmp.Count; i++) { PMT.RE.IEntity entity = Activator.CreateInstance(typeof(T)) as PMT.RE.IEntity; if (entity != null) { entity.FromJson(tmp[i]); Add((T)entity); } } }
public void FromJson(string content) { PMT.RE.ListTmp tmp = new PMT.RE.ListTmp(content); type = (UnitType)tmp.GetAsInt(0); fieldtype = (FieldType)tmp.GetAsInt(1); isMulti = tmp.GetAsBool(2); isMultilingual = tmp.GetAsBool(3); isArrayContainer = tmp.GetAsBool(4); isArrayElement = tmp.GetAsBool(5); key = tmp.Get(6); parent = tmp.Get(7); name = tmp.Get(8); sort = tmp.GetAsInt(9); no = tmp.GetAsInt(10); lang = tmp.GetAsInt(11); content = tmp.Get(12); attribute = tmp.Get(13); }