Beispiel #1
0
        protected override void OnResume()
        {
            base.OnResume();
            Name.Text      = ViewModel.Tournament.Name;
            Sponsor.Text   = ViewModel.Tournament.Sponsor;
            Status.Text    = ViewModel.Tournament.Status;
            StartDate.Text = ViewModel.Tournament.StartDate.ToShortDateString();
            EntryFee.Text  = "$" + ViewModel.Tournament.EntryFee;

            PrizeAdapter = new TextViewWithDeleteActionAdapter(ViewModel.Tournament.Prizes.ToList());
            PrizeAdapter.ItemDeleteClick += DeletePrize;
            PrizeRecyclerView.SetAdapter(PrizeAdapter);

            FacilityAdapter = new TextViewWithDeleteActionAdapter(ViewModel.Tournament.Facilities.ToList());
            FacilityAdapter.ItemDeleteClick += DeleteFacility;
            FacilityRecyclerView.SetAdapter(FacilityAdapter);

            VenueAdapter = new TextViewWithDeleteActionAdapter(ViewModel.Tournament.Venues.ToList());
            VenueAdapter.ItemDeleteClick += DeleteVenue;
            VenueRecyclerView.SetAdapter(VenueAdapter);

            TeamAdapter = new TeamAdapter(ViewModel.Tournament.Teams.ToList());
            TeamAdapter.ItemDeleteClick += OnItemDeleteClick;
            TeamRecyclerView.SetAdapter(TeamAdapter);
        }
Beispiel #2
0
        protected override void OnResume()
        {
            base.OnResume();
            Name.Text = ViewModel.Team.Name;

            PlayerAdapter = new TextViewWithDeleteActionAdapter(ViewModel.Team.Players.ToList());
            PlayerAdapter.ItemViewClick   += OnItemViewClick;
            PlayerAdapter.ItemDeleteClick += OnItemDeleteClick;
            PlayerRecyclerView.SetAdapter(PlayerAdapter);
        }