private async void OnTimerOnTick(object sender, EventArgs args) { int?onlineCount = await Client.GetOnlineCountAsync(); if (_onlineCount == onlineCount) { return; } _onlineCount = onlineCount; UpdateOnlineCount(onlineCount); string[] names = await Client.GetNamesOnlineAsync(); UpdateNames(names.ToArray <object>()); }
public async void UpdateOnlineNames() { ObservableCollection <string> names = await _client.GetNamesOnlineAsync(); OnlineNames = names; }