Esempio n. 1
0
        public async Task UpdateUI(MusicEndpoint pimpEndpoint)
        {
            var index = PimpEndpoints.FindIndex(e => e.Name == pimpEndpoint.Name);

            if (index >= 0)
            {
                //pimpEndpointIndex = index;
                ResetClient(pimpEndpoint);
                UpdateToggleSilently(Push.IsChannelOpen());
                if (IsPushEnabled)
                {
                    try {
                        await SubscribeToPush(silent : true);
                    } catch (Exception) { }
                }
                await UpdateAlarmList(client);

                OnPropertyChanged("EnableEndpoints");
                PimpEndpointIndex = index;
                //OnPropertyChanged("PimpEndpointIndex");
            }
            else
            {
                await UpdateUI();
            }
        }