示例#1
0
        async Task OnActivateInternal()
        {
            await RefreshFilterCommand.ExecuteAsyncTask().ConfigureAwait(false);

            var ag = DomainEvilGlobal.SelectedGame.ActiveGame;

            if (ag.CalculatedSettings.InitialSynced && !ServerList.InitialSync)
            {
                await _contentManager.InitialServerSync().ConfigureAwait(false);

                return;
            }

            var am = ag == null ? null : ag.CalculatedSettings.Collection;

            if (_lastContent == am && _lastGame == ag)
            {
                return;
            }
            _lastGame    = ag;
            _lastContent = am;
            if (ServerList.InitialSync)
            {
                await ServerList.UpdateServers().ConfigureAwait(false);
            }
        }
示例#2
0
 public void Handle(ServersUpdated message)
 {
     RefreshFilterCommand.Execute(null);
 }
示例#3
0
 Task OnCgsUpdate(object x)
 {
     RefreshFilterCommand.Execute(null);
     return(ServerList.UpdateServers());
 }
示例#4
0
 IDisposable SetupServerFilters(ISupportServers game)
 {
     ServerFilter = game.GetServerFilter();
     return(ServerFilter.FilterChanged.Subscribe(x => RefreshFilterCommand.Execute(null)));
 }