void OnButtonClick_DelMethodItem(object sender, EventArgs e) { for (int i = 0; i < _lstBtDel.Count; i++) { if (sender == _lstBtDel[i]) { if (DialogResult.OK == MessageBox.Show("确定删除方法节点:" + _methodFlow.GetItem(i).Name + "?", "警告", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning)) { _methodFlow.RemoveAt(i); UpdateFlow2UI(); } } } }