private void btnEditVehicle_Click(object sender, EventArgs e) { if (FilterList.SelectedIndices.Count > 0) { foreach (Object selecteditem in FilterList.SelectedItems) { Windows.XMLEditVehicle newMDIChild = new Windows.XMLEditVehicle(selecteditem as String); newMDIChild.MdiParent = MainWindow.ActiveForm; newMDIChild.Show(); } } else MainWindow.ErrorDisplayString("Error Editing Vehicle: no vehicle selected"); }
private void editVehicleToolStripMenuItem_Click(object sender, EventArgs e) { if (FilterList.SelectedIndices.Count > 0) { foreach (Object selecteditem in FilterList.SelectedItems) { Windows.XMLEditVehicle newMDIChild = new Windows.XMLEditVehicle(selecteditem as String); newMDIChild.MdiParent = MainWindow.ActiveForm; newMDIChild.Show(); } } else { MainWindow.ErrorDisplayString("Error Editing Vehicle: no vehicle selected"); } }