private void btn_save_Click(object sender, EventArgs e) { ArrayList tempArr = getChangeUserControl(); UserControl1 uc = null; VerifyEntity ve = null; for (int i = 0; i < tempArr.Count; i++) { uc = (UserControl1)tempArr[i]; ve = (VerifyEntity)ConfigStore.codeTable[uc.GetAttr1()]; ve.Code = uc.GetText(); uc.SetChange(false); uc.SetChecked(false); } tempArr.Clear(); tempArr = null; MessageBox.Show(Program.mainForm, "保存成功!"); }