Ejemplo n.º 1
0
        public UserRacket(TennisGame tennisGame)
        {
            InitializeComponent();
            SetTopLevel(false);

            this.tennisGame = tennisGame;
            Size            = new Size(45, 15);
            Location        = new Point(tennisGame.TablePanel.Width / 2 - Size.Width / 2, tennisGame.TablePanel.Height - Size.Height);
        }
Ejemplo n.º 2
0
        public Ball(TennisGame tennisGame)
        {
            InitializeComponent();
            SetTopLevel(false);
            this.tennisGame = tennisGame;
            isStay          = true;

            Size = new Size(tennisGame.userRacket.Size.Width / 3, tennisGame.userRacket.Size.Height);
            backgroundWorker1.RunWorkerAsync();
        }
Ejemplo n.º 3
0
        public CompRacket(TennisGame tennisGame)
        {
            InitializeComponent();
            SetTopLevel(false);

            this.tennisGame = tennisGame;
            Size            = tennisGame.userRacket.Size;
            Location        = new Point(tennisGame.TablePanel.Width / 2 - Size.Width / 2, 0);
            backgroundWorker1.RunWorkerAsync();
        }
Ejemplo n.º 4
0
        public Ball(TennisGame tennisGame)
        {
            InitializeComponent();
            SetTopLevel(false);
            this.tennisGame = tennisGame;
            isStay          = true;

            Size     = new Size(tennisGame.UserRacket.Size.Width / 3, tennisGame.UserRacket.Size.Height);
            Location = new Point(tennisGame.TablePanel.Width / 2, tennisGame.TablePanel.Height / 2 - Size.Height / 2);
            backgroundWorker1.RunWorkerAsync();
        }
Ejemplo n.º 5
0
 private void TennisGameButton_Click(object sender, EventArgs e)
 {
     tennis.TennisGame tennis = new tennis.TennisGame(this);
     tennis.Show();
     Hide();
 }