private void btnExportIED_Click(object sender, EventArgs e) { string strRoutineName = "btnExportIED_Click"; try { if (uciec101.lvIEDList.CheckedItems.Count != 1) { MessageBox.Show("Select single IED for export!!!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } ListViewItem lvi = uciec101.lvIEDList.CheckedItems[0]; IED expObj = null; //Now get the IED object... foreach (IED iedObj in iedList) { if (iedObj.UnitID == lvi.Text) { expObj = iedObj; break; } } Utils.SaveIEDFile(expObj.exportIED()); } catch (Exception ex) { MessageBox.Show(strRoutineName + ": " + "Error: " + ex.Message.ToString(), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnExportIED_Click(object sender, EventArgs e) { if (ucmod.lvIEDList.CheckedItems.Count != 1) { MessageBox.Show("Select single IED for export!!!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } ListViewItem lvi = ucmod.lvIEDList.CheckedItems[0]; IED expObj = null; //Now get the IED object... foreach (IED iedObj in iedList) { if (iedObj.UnitID == lvi.Text) { expObj = iedObj; break; } } Utils.SaveIEDFile(expObj.exportIED());// exportIED }