Example #1
0
        static void Test7()
        {
            Database db  = new Database("MyDatabase", "D://");
            byte     adr = db.MakeSection("Тест группировки");

            Group group1 = new Group();
            Group group2 = new Group();
            Group group3 = new Group();
            Group group4 = new Group();

            db.CurrentSection.AddRange(group1, group2, group3);
            group4.Label = "НазваниеГруппы";
            grp          = db.CurrentSection.Add(group4).AsPosition();
            Console.WriteLine(grp.AsAddress(db.CurrentSection));

            for (int i = 1; i <= 400; i++)
            {
                DataString s = new DataString();
                s.Label = "Объект " + i.ToString();
                s.Insert("Был создан объект с этой строкой");

                if (i >= 0 && i < 100)
                {
                    group1.Insert(db.CurrentSection.Add(s).AsPosition());
                }
                if (i >= 100 && i < 200)
                {
                    group2.Insert(db.CurrentSection.Add(s).AsPosition());
                }
                if (i >= 200 && i < 300)
                {
                    group3.Insert(db.CurrentSection.Add(s).AsPosition());
                }
                if (i >= 300 && i < 400)
                {
                    group4.Insert(db.CurrentSection.Add(s).AsPosition());
                }
            }

            Console.WriteLine("saving...");

            db.CurrentSection.Update();

            Console.WriteLine("! saved.");
        }
Example #2
0
        static void Test1()
        {
            Database db  = new Database("MyDatabase", "D://");
            byte     adr = db.MakeSection("ABC");

            for (int i = 1; i <= 256; i++)
            {
                DataString s = new DataString();
                s.Label = "Объект " + i.ToString();
                s.Insert("[Данные удалены]");
                Console.WriteLine("ok = " + db.CurrentSection.Add(s).ToString());
            }

            Console.WriteLine("saving...");

            db.CurrentSection.Update();

            Console.WriteLine("! saved.");
        }