private void btn_UploadBatch_Click(object sender, EventArgs e) { bool flag = false; NBatchInfoGroup nBatchInfoGroup = new NBatchInfoGroup(); foreach (ListViewItem listViewItem in this.listView1.Items) { bool flag2 = listViewItem.Checked && listViewItem.SubItems[1].Text != "成功"; if (flag2) { NBatchInfo nBatchInfo = listViewItem.Tag as NBatchInfo; nBatchInfo.SetupBatchInfo(); nBatchInfoGroup.Batchs.Add(nBatchInfo); flag = true; } } bool flag3 = !flag; if (flag3) { MessageBox.Show("请勾选影像批次"); } else { foreach (NBatchInfo current in nBatchInfoGroup.Batchs) { this._transfer = INetTransferFactory.GetNetTransfer(); this._transfer.OnNotify -= new EventHandler <TEventArg <NetTransferNotifyMsg> >(this.OnTransferNotify); this._transfer.OnNotify += new EventHandler <TEventArg <NetTransferNotifyMsg> >(this.OnTransferNotify); this._transfer.UploadBatch(current); } } }