public void deleteInspector(object sender, EventArgs e) { BoundMenuItem <Inspector> item = (BoundMenuItem <Inspector>)sender; Inspector inspector = item.BoundObject; Inspector.DeleteInspector(inspector); ResetInspectors(); }