コード例 #1
0
 private void CboFavoriteTeam_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     SelectedFavoriteTeam           = cboFavoriteTeam.SelectedItem as TeamFifaData;
     Configuration.FavoriteTeamCode = (cboFavoriteTeam.SelectedItem as TeamFifaData).FifaCode;
     LoadOppositiontoFavorite();
     SoccerCanvas.Children.Clear();
 }
コード例 #2
0
        private async void CboFavoriteTeam_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                var Teams = await repo.FetchTeamsAsync();

                cboFavoriteTeam.ItemsSource = Teams;
                if (Configuration.FavoriteTeamCode != String.Empty && Configuration.FavoriteTeamCode != null && Configuration.FavoriteTeamCode != "")
                {
                    SelectedFavoriteTeam         = Teams.Where(x => x.FifaCode == Configuration.FavoriteTeamCode).First();
                    cboFavoriteTeam.SelectedItem = SelectedFavoriteTeam;
                    LoadOppositiontoFavorite();
                }
                else
                {
                    cboFavoriteTeam.SelectedIndex = 0;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #3
0
 public MatchupDetails(TeamFifaData favorite, TeamFifaData opposition)
 {
     Favorite   = favorite;
     Opposition = opposition;
     InitializeComponent();
 }