Пример #1
0
 private void TabView_DataSourceChanging(object sender, GameFileListEventArgs e)
 {
     if (sender is ITabView tabView)
     {
         e.GameFiles = GetViewSort(tabView.GameFileViewControl, e.GameFiles);
     }
 }
Пример #2
0
        protected void SetDataSource(IEnumerable <IGameFile> gameFiles)
        {
            if (FilterIWads && !(Adapter is IdGamesDataAdapater))
            {
                gameFiles = gameFiles.Except(Adapter.GetGameFileIWads());
            }

            var args = new GameFileListEventArgs(gameFiles);

            DataSourceChanging?.Invoke(this, args);

            gameFiles = args.GameFiles;

            if (!gameFiles.Any())
            {
                GameFileView.DataSource = null;
                GameFileView.SetDisplayText("No Results Found");
            }
            else
            {
                GameFileView.DataSource = gameFiles.ToList();
            }
        }