Esempio n. 1
0
 private void panel1_Paint(object sender, PaintEventArgs e)
 {
     for (int i = 0; i < storage.getCount(); i++)
     {
         storage.GetObject(i).draw(e.Graphics);
     }
     for (int i = 0; i < storage2.getCount(); i++)
     {
         storage2.GetObject(i).draw(e.Graphics);
     }
 }
Esempio n. 2
0
        public void addShape(shape shape)
        {
            int s = _shapes.getCount();

            shape[] _shapes1;
            _shapes1 = new shape[++s];
            for (int i = 0; i < s - 1; i++)
            {
                _shapes1[i] = _shapes.GetObject(i);
            }
            _shapes1[s - 1] = shape;
            _shapes         = new MyStorage(s);
            for (int i = 0; i < s; i++)
            {
                _shapes.SetObject(i, _shapes1[i]);
            }
        }