Exemple #1
0
        public void DrawVagon(int x, int y, int wid, int heig)
        {
            Graphics g     = CreateGraphics();
            MyVagon  vagon = new MyVagon(x, y, wid, heig);

            figure.Add(vagon);
        }
Exemple #2
0
        public MyTrain(int x, int y, int widht, int height, int count)
        {
            CountVagons = count;

            int widVag  = widht / count - 1;
            int heigVag = height;

            for (int i = 0; i < CountVagons; i++)
            {
                MyVagon vag = new MyVagon(x + i * widVag, y, widVag - 14, heigVag);
                vagons.Add(vag);
            }
        }