Esempio n. 1
0
        private void ObserveClientStatusChanged(EventPattern <EventArgs> eventPattern)
        {
            SetUiButtonState();
            SetUiDeviceConnectedState();
            var clientStatus = SharedResources.ConnectionManager.Clients;

            try
            {
                ClientStatus.BeginUpdate();
                ClientStatus.Items.Clear();
                foreach (var client in clientStatus)
                {
                    ClientStatus.Items.Add(client);
                }
            }
            finally
            {
                ClientStatus.EndUpdate();
            }
            registeredClientCount.Text = clientStatus.Count().ToString();
            OnlineClients.Text         = clientStatus.Count(p => p.Online).ToString();
            ConfigureUiPropertyNotifications();
        }