private void DocumentLibrarySelectionForm_Closing( object sender, CancelEventArgs e ) { if (DialogResult.OK == DialogResult) { if (!documentLibraryListControl.HasSelected) e.Cancel = true; else _selectedDocument = documentLibraryListControl.SelectedObject as Document; } }