예제 #1
0
 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);
 }
예제 #2
0
 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));
 }
예제 #3
0
 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);
         }
     }
 }
예제 #4
0
파일: Unit.cs 프로젝트: kjm00king/FEH-TEAM
        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);
        }