private void BlackListForm_Load(object sender, EventArgs e) { //清空listBox listBox.Items.Clear(); //反序列化xml,获取内容 processList = XmlControl.GetBlack(GlobalConstants.BLACK_LIST_PATH); //获取白名单进程列表,增加到listBox中 foreach (MyProcess p in processList.processes) { listBox.Items.Add(p.processName); } }