public static SearchDetails retrieve(IWin32Window ownerWindow) { using (PriorSearchDetailsRetriever priorSearchDetailsRetriever = new PriorSearchDetailsRetriever()) { priorSearchDetailsRetriever.populate(); if (DialogResult.OK != priorSearchDetailsRetriever.ShowDialog(ownerWindow)) { return(null); } return( (0 == priorSearchDetailsRetriever.listView.SelectedItems.Count) ? null : (SearchDetails)(priorSearchDetailsRetriever.listView.SelectedItems[0].Tag) ); } }