private void UpdateBase(IGameFileDataSourceAdapter adapter, GameFileViewControl ctrl, GameFileGetOptions options, IEnumerable <GameFileSearchField> searchFields) { IEnumerable <IGameFileDataSource> first = new IGameFileDataSource[0]; GameFileFieldType[] defaultGameFileSelectFields = this.DefaultGameFileSelectFields; if (options == null) { foreach (GameFileSearchField field in searchFields) { first = first.Union <IGameFileDataSource>(adapter.GetGameFiles(new GameFileGetOptions(defaultGameFileSelectFields, field))); } } else { foreach (GameFileSearchField field2 in searchFields) { options.SearchField = field2; first = first.Union <IGameFileDataSource>(adapter.GetGameFiles(options)); } if (options.SearchField != null) { first = first.Union <IGameFileDataSource>(adapter.GetGameFiles(new GameFileGetOptions(defaultGameFileSelectFields, options.SearchField))); } } this.SetDataSource(ctrl, first.ToList <IGameFileDataSource>()); }
public override void SetGameFiles(IEnumerable <GameFileSearchField> searchFields) { if (this.Options != null) { GameFileGetOptions options = new GameFileGetOptions { Limit = 0x19, OrderBy = 1, OrderField = 7, SelectFields = base.m_selectFields }; if ((searchFields != null) && (searchFields.Count <GameFileSearchField>() > 0)) { IEnumerable <IGameFileDataSource> first = new IGameFileDataSource[0]; foreach (GameFileSearchField field in searchFields) { options.SearchField = field; first = first.Union <IGameFileDataSource>(base.m_adapter.GetGameFiles(options)); } base.SetDataSource(first); } else { base.SetDataSource(base.m_adapter.GetGameFiles(options)); } } else { base.SetGameFiles(searchFields); } }
public virtual void SetGameFiles(IEnumerable <GameFileSearchField> searchFields) { IEnumerable <IGameFileDataSource> first = new IGameFileDataSource[0]; foreach (GameFileSearchField field in searchFields) { first = first.Union <IGameFileDataSource>(this.m_adapter.GetGameFiles(new GameFileGetOptions(this.m_selectFields, field))); } this.SetDataSource(first); }
public override void SetGameFiles(IEnumerable <GameFileSearchField> searchFields) { IEnumerable <IGameFileDataSource> first = new IGameFileDataSource[0]; foreach (GameFileSearchField field in searchFields) { first = first.Union <IGameFileDataSource>(this.m_tagAdapter.GetGameFiles(new GameFileGetOptions(base.m_selectFields, field), this.TagDataSource)); } base.SetDataSource(first); }
private void UpdateIdGamesView_Worker(object sender, DoWorkEventArgs e) { try { this.IdGamesDataSource = null; IEnumerable <GameFileSearchField> argument = e.Argument as IEnumerable <GameFileSearchField>; if ((argument == null) || (argument.Count <GameFileSearchField>() == 0)) { this.IdGamesDataSource = base.m_adapter.GetGameFiles(); } else { IEnumerable <IGameFileDataSource> first = new IGameFileDataSource[0]; foreach (GameFileSearchField field in argument) { first = first.Union <IGameFileDataSource>(base.m_adapter.GetGameFiles(new GameFileGetOptions(field))); } this.IdGamesDataSource = first; } } catch { } }