C#按钮判断问题
来源:百度知道 编辑:UC知道 时间:2024/05/13 04:08:09
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication14
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
public int butt=0;
private void Form2_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
butt = 1;
}
private void button2_Click(object sender, EventArgs e)
{
butt = 2;
}
private void button3_Click(object sender, EventArgs e)
{
if(butt==1)
{
MessageBox.Show("1");