public void SawGames(GameBrowser browser, IList <NetworkGame> games)
        {
            // os_log(.info, "saw %d games!", games.count)
            var location = this.ProximityManager?.ClosestLocation;

            if (location != null && UserDefaults.GameRoomMode)
            {
                this.games = games.Where(game => game.Location == location).ToList();
            }
            else
            {
                this.games = games.ToList();
            }

            this.tableView.ReloadData();
        }
Example #2
0
        public override void PrepareForSegue(UIStoryboardSegue segue, NSObject sender)
        {
            if (!string.IsNullOrEmpty(segue.Identifier) &&
                Enum.TryParse <GameSegue>(segue.Identifier, true, out var segueType))
            {
                switch (segueType)
                {
                case GameSegue.EmbeddedGameBrowser:
                    if (segue.DestinationViewController is NetworkGameBrowserViewController browser)
                    {
                        this.gameBrowser         = new GameBrowser(this.myself);
                        browser.Browser          = this.gameBrowser;
                        browser.ProximityManager = this.proximityManager;
                    }

                    break;
                }
            }
        }