首页 > 代码库 > 本周软件进程

本周软件进程

u

}
}
}

技术分享

技术分享

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace app
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
Form2 fr = new Form2();
fr.Show();

this.Hide();
}

private void Form1_Load(object sender, EventArgs e)
{

}

private void button3_Click(object sender, EventArgs e)
{
this.Close();
}

private void button2_Click(object sender, EventArgs e)
{


button2.Enabled = false;

}
}
}技术分享

sing System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace app
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
this.Close();
Form1 r = new Form1();
r.Show();
}

private void Form2_Load(object sender, EventArgs e)
{
textBox3.Enabled = false ;
button2.Enabled = false;
}

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

}

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

private void button2_Click(object sender, EventArgs e)
{
textBox3.Text ="比赛结果为:" +textBox1.Text + ":" + textBox2.Text +"=26:24 "+textBox1.Text +": 胜利"+textBox2 .Text +": 惜败";
}

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

本周软件进程