Example #1
0
        public void FillNames()
        {
            deleteTableContent(Tables.Names);
            Debug("fill names");
            _cmd.CommandText = "ALTER TABLE `names` DISABLE KEYS;";
            _cmd.ExecuteNonQuery();

            int cnt = Mia.MaleNames.Rabnames.Count + Mia.FemaleNames.Rabnames.Count;
            int c   = 0;

            foreach (RabName nm in Mia.MaleNames.Rabnames)
            {
                this.InsertName(nm, true);
                c++;
                Mia.Setpb(c, cnt);
            }
            foreach (RabName nm in Mia.FemaleNames.Rabnames)
            {
                this.InsertName(nm, false);
                c++;
                Mia.Setpb(c, cnt);
            }
            _cmd.CommandText = "ALTER TABLE `names` ENABLE KEYS;";
            _cmd.ExecuteNonQuery();
        }
Example #2
0
        public void read(BinaryReader br, float ver)
        {
            count.read(br, ver);
            int cnt = (int)count.value();

            for (int i = 0; i < (int)count.value(); i++)
            {
                if (mf != null)
                {
                    mf.Setpb(i, cnt);
                }
                rabbits.Add(new Rabbit(br, ver, nmales, nfemales));
            }
        }
Example #3
0
        public void read(BinaryReader br, float ver, MiaFile mf)
        {
            size.read(br, ver);
            int cnt = (int)size.value();

            for (int i = 0; i < size.value(); i++)
            {
                if (mf != null)
                {
                    mf.Setpb(i, cnt);
                }
                items.Add(new MFListItem(br, ver));
            }
        }