首页 > 代码库 > 十六周

十六周

观众界面:

技术分享

namespace 观众界面
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
textBox1.Enabled = false;
button1.Enabled = false;
}

private void textBox1_TextChanged(object sender, EventArgs e)
{
if (textBox1.Text == "")
{
button2.Enabled = false;
}
}

private void label2_Click(object sender, EventArgs e)
{

textBox2.Text = "比赛结果为:" + textBox1.Text + ":" + textBox1.Text + "胜利" + textBox1.Text + "失败";

}

private void button3_Click(object sender, EventArgs e)
{
textBox1.Text = "";
textBox2.Text = "";
button2.Enabled = false;
}

private void textBox2_TextChanged(object sender, EventArgs e)
{
if (textBox1.Text != "")
{
button2.Enabled = true;
}
else
{
button2.Enabled = false;
}
}

private void textBox2_TextChanged(object sender, EventArgs e)
{

}

private void button3_Click(object sender, EventArgs e)
{
this.Close();
index q = new index();
q.Show();
}
}

总结:代码掌握不行,知识欠缺很多。需多努力!

 

十六周