void chuyenvitri() { Random rd = new Random(); int x = rd.Next(panelMain.Width - 108); int y = rd.Next(panelMain.Height - 50); label1.Location = new Point(x, y); label1.Text = WordGenerator.GetRandomWord(); }
private void timer1_Tick(object sender, EventArgs e) { Random rd = new Random(); int x = rd.Next(panelMain.Width - 108); int y = rd.Next(panelMain.Height - 50); label1.Location = new Point(x, y); label1.Text = WordGenerator.GetRandomWord(); progressBar1.PerformStep(); if (progressBar1.Value >= progressBar1.Maximum) { EndGame(); } }