예제 #1
0
        public Form1()
        {
            Korzina korzina = new Korzina();
            Tablo   tablo   = new Tablo();

            for (int i = 0; i < 2; i++)
            {
                ball[i]          = new Ball(i * 20 + 40, i * 20 + 40);
                this.Dvig1      += new Delegat1(ball[i].Start);
                this.Paint      += new PaintEventHandler(ball[i].DrawBall);
                ball[i].evTablo += new Delegat1(tablo.plus);
            }

            //this.Paint += new PaintEventHandler(ball1.DrawBall);
            //this.Paint += new PaintEventHandler(ball2.DrawBall);

            //ball1.evTablo += new Delegat1(tablo.plus);
            //ball2.evTablo += new Delegat1(tablo.plus);

            this.Paint      += new PaintEventHandler(korzina.DrawKorzina);
            this.Paint      += new PaintEventHandler(tablo.risov_tablo);
            this.MouseClick += new MouseEventHandler(this.Form1_MouseClick);


            System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer();
            timer.Interval = 100;

            timer.Tick += new EventHandler(this.Pereris_Okno);

            timer.Start();
            InitializeComponent();
        }