private void button1_Click(object sender, EventArgs e) { XmlProcess xml = new XmlProcess(); DBProcess DB = new DBProcess(); if (TxtAddName.Text == "") { return; } if (xml.ItemCount(Type, TxtAddName.Text) == 0) { DB.AlterTableAdd("add", TxtAddName.Text); MessageBox.Show("该字段为首次添加"); } xml.AddItem(Type, TxtAddName.Text); TxtAddName.Text = ""; }