求纠正错误
using System;using System.Collections.Generic;
using
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Login
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
String name;
String password;
name = textBox1.Text;
password = textBox2.Text;
if (textBox1.Text.Equals("Admin") && textBox2.Text.Equals("123456"))
{
MessageBox.Show("登录成功!");
}
else
{
MessageBox.Show("用户或密码不正确! 请核对后重新登录!");
}
}
private void button2_Click(object sender, EventArgs e)
{
this.Hide();
}
private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
if (radioButton2.Checked)
{
name.Enabled = true;
password.Enabled = true;
textBox1.Enabled = true;
textBox2.Enabled = true;
}
else
name.Enabled = false;
password.Enabled = false;
textBox1.Enabled = false;
textBox2.Enabled = false;
}
}
}
}
错误: 应输入类型、命名空间定义或文件尾