示例#1
0
        public void read(BinaryReader br, float ver)
        {
            TreeNode curnode  = tr;
            Byte     depth    = br.ReadByte();
            Byte     predepth = 0;

            while (depth != 0)
            {
                MFString nm = new MFString("");
                nm.read(br, ver);
                TreeNode nd = new TreeNode(nm.value());
                if (depth == predepth)
                {
                    curnode.Parent.Nodes.Add(nd);
                }
                else if (depth > predepth)
                {
                    curnode.Nodes.Add(nd);
                }
                else
                {
                    int      dd  = predepth - depth;
                    TreeNode snd = curnode.Parent;
                    while (dd > 0)
                    {
                        snd = snd.Parent;
                        dd--;
                    }
                    snd.Nodes.Add(nd);
                }
                curnode  = nd;
                predepth = depth;
                depth    = br.ReadByte();
            }
        }
示例#2
0
 public void read(BinaryReader br, float ver)
 {
     live.read(br, ver);
     if (live.value() != 0)
     {
         name_key = new MFUShort("name_key");
         name_key.read(br, ver);
     }
     else
     {
         gecnt   = new MFUShort("genesis_count");
         genesis = new List <ushort>();
         name    = new MFString("name");
         gecnt.read(br, ver);
         for (int i = 0; i < (int)gecnt.value(); i++)
         {
             genesis.Add(br.ReadUInt16());
         }
         name.read(br, ver);
     }
     breed.read(br, ver);
     f***s.read(br, ver);
     children.read(br, ver);
     my_fuck_is_last.read(br, ver);
 }
示例#3
0
        public IMFCommon Getobj(char code, bool create)
        {
            IMFCommon obj = null;

            switch (code)
            {
            case 'a': if (create)
                {
                    Age = new MFUShort("age");
                }
                obj = Age; break;

            case 'w': if (create)
                {
                    Sweight = new MFUShort("weight");
                }
                obj = Sweight; break;

            case 'W': if (create)
                {
                    Lweight = new MFULong("weight");
                }
                obj = Lweight; break;

            case 'P': if (create)
                {
                    Price = new MFString("price");
                }
                obj = Price; break;

            case 'p': if (create)
                {
                    Partner = new MFString("partner");
                }
                obj = Partner; break;

            case 'S': if (create)
                {
                    Issold = new MFByte("is_sold");
                }
                obj = Issold; break;

            case 's': if (create)
                {
                    Skintype = new MFByte("skintype");
                }
                obj = Skintype; break;

            case 'n': if (create)
                {
                    Name = new MFString("name");
                }
                obj = Name; break;

            case 'b': if (create)
                {
                    Breed = new MFUShort("breed");
                }
                obj = Breed; break;

            case 'k': if (create)
                {
                    Kind = new MFString("kind");
                }
                obj = Kind; break;

            case 'm': if (create)
                {
                    Murder = new MFDate("murder");
                }
                obj = Murder; break;

            case 'B': if (create)
                {
                    Brutto = new MFUShort("brutto");
                }
                obj = Brutto; break;

            case 'N': if (create)
                {
                    Netto = new MFUShort("netto");
                }
                obj = Netto; break;

            case 'A': if (create)
                {
                    Address = new MFString("address");
                }
                obj = Address; break;

            case 'X': if (create)
                {
                    Sex = new MFByte("sex");
                }
                obj = Sex; break;
            }
            return(obj);
        }