Esempio n. 1
0
        private void UpdateSelected(TrackObjectBase track)
        {
            var item = _countriesInformationList.FirstOrDefault(x => x.DisplayName == track.Country);

            if (item == null)
            {
                return;
            }
            CountriesListBox.SelectedItem = item;
            CountriesListBox.ScrollIntoView(item);
        }
Esempio n. 2
0
 public void RemoveError(AcErrorType type)
 {
     if (!HasError(type))
     {
         return;
     }
     _errors.Remove(_errors.FirstOrDefault(x => x.Type == type));
     if (Errors.Count == 0)
     {
         OnPropertyChanged(nameof(HasErrors));
         CommandManager.InvalidateRequerySuggested();
     }
 }
Esempio n. 3
0
            public async void SetSteamId(string steamId)
            {
                if (steamId == null)
                {
                    return;
                }

                _cancellationTokenSource?.Cancel();

                var existing = SteamProfiles.FirstOrDefault(x => x.SteamId == steamId);

                if (existing != null)
                {
                    SteamProfile = existing;
                    return;
                }

                var profile = new SteamProfile(steamId);

                SteamProfiles.Add(profile);
                SteamProfile = profile;

                profile.ProfileName = await SteamIdHelper.GetSteamName(steamId);
            }