private void button3_Click(object sender, EventArgs e) { if (ListOfCheckBox == null) { ListOfCheckBox = new List <CheckBox>(); } else { foreach (CheckBox checkBox in ListOfCheckBox) { Controls.Remove(checkBox); } ListOfCheckBox.Clear(); } Height = 242; this.Text = "EnterpriseArchitect to OpenERP : Ongoing ..."; SetTaskText("Initialization ..."); string file = textBox1.Text.Trim(); string folder = textBox2.Text.Trim(); if (XmlUtility.FileExists(file)) { XmlNode xmlNode = XmlUtility.GetXmlDocument(file); List <XmlNode> lst = XmlUtility.GetXmlNode(xmlNode, "EAID_F10F202F_3A57_464a_B98A_8DA512A5BE07"); Program.ProjectData = new ProjectData(xmlNode); } int i = 0; foreach (ModuleData moduleData in Program.ProjectData.ListOfModuleData) { if (!moduleData.Native) { CheckBox checkBox = new CheckBox(); checkBox.Text = moduleData.Name; checkBox.Location = new Point(12, 138 + i); if (moduleData.ListOfClass.Count == 0) { checkBox.Enabled = false; } Controls.Add(checkBox); ListOfCheckBox.Add(checkBox); Height = 242 + i; i += 20; } } button2.Enabled = true; this.Text = "EnterpriseArchitect to OpenERP"; SetTaskText("Finished loading."); }