public FinderForm <T> CreateForm(IList <T> list, IList <ColumnDescriptor> columnDescriptors, bool allowMultiSelection, string filterSettingsContext = null) { Assert.ArgumentNotNull(list, nameof(list)); var form = new FinderForm <T>(GetColumnDescriptors(columnDescriptors), list, allowMultiSelection, filterSettingsContext: filterSettingsContext); new FinderPresenter <T>(form); return(form); }
public FinderForm <T> CreateForm(IEnumerable <FinderQuery <T> > finderQueries, IList <ColumnDescriptor> columnDescriptors, bool allowMultiSelection, string filterSettingsContext = null) { Assert.ArgumentNotNull(finderQueries, nameof(finderQueries)); var form = new FinderForm <T>(GetColumnDescriptors(columnDescriptors), finderQueries, allowMultiSelection, filterSettingsContext: filterSettingsContext); new FinderPresenter <T>(form); return(form); }
public IList <T> ShowDialog(IWin32Window owner, IList <T> list, bool allowMultiSelection, IList <ColumnDescriptor> columnDescriptors, string filterSettingsContext = null) { Assert.ArgumentNotNull(owner, nameof(owner)); Assert.ArgumentNotNull(list, nameof(list)); FinderForm <T> form = CreateForm(list, columnDescriptors, allowMultiSelection, filterSettingsContext); DialogResult result = form.ShowDialog(owner); return(result == DialogResult.OK ? form.Selection : null); }