日期:2014-05-17 浏览次数:20433 次
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
static List<user> user1 = new List<user>();
private void btn_add_Click(object sender, EventArgs e)//添加按钮
{
listBox1.Items.Add(txb_user.Text);
user u = new user();
u.userName = txb_user.Text;
u.userpassword = txb_password.Text;
if (rdb_admin.Checked)
{
u.select = rdb_admin.Text;
}
if (rdb_read.Checked)
{
u.select = rdb_read.Text;
}
if (rdb_readwrite.Checked)
{
u.select = rdb_readwrite.Text;
}
if (rdb_write.Checked)
{
u.select = rdb_write.Text;
}