예제 #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.RankingByDance);

            DanceSpinner.Initialise(this, Repo.GetAllDances(), Resource.Id.rankingByDanceSpinner, true, UpdateDanceRankingsListView);
        }
예제 #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.EditDance);

            InitialiseInputs(true);
            DanceSpinner.Initialise(this, Repo.GetAllDances(), Resource.Id.editDanceSpinner, true, PopulateInputs);
        }
예제 #3
0
        void ResetPage()
        {
            CoupleSpinner.Update(this, PossibleCouples, Resource.Id.coupleInput);
            DanceSpinner.Update(this, Repo.GetAllDances().ToList(), Resource.Id.danceInput);
            EditText scoreInput = FindViewById <EditText>(Resource.Id.scoreInput);

            scoreInput.Text = "0";
            UpdateWeekStatsButtonVis();
        }
예제 #4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.EditScore);

            InitialiseButtons();
            CoupleSpinner.Initialise(this, Repo.GetAllCouples(), Resource.Id.editScoreCoupleSpinner, true, PopulateScoresAndWeeks);
            WeekSpinner.Initialise(this, weeks, Resource.Id.editScoreWeekSpinner, true, PopulateDances);
            DanceSpinner.Initialise(this, Repo.GetAllDances(), Resource.Id.editScoreDanceSpinner, true, PopulateScore);
        }
예제 #5
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.ScoreEntry);

            DanceSpinner.Initialise(this, Repo.GetAllDances().ToList(), Resource.Id.danceInput);
            CoupleSpinner.Initialise(this, Repo.GetAllCouples(), Resource.Id.coupleInput);
            InitialiseScoreInput();
            InitialiseWeekInput();
            InitialiseConfirmButton();
            InitialiseCancelButton();
            InitialiseStatsButton();
        }
예제 #6
0
        public void PopulateDances()
        {
            var possibleDanceIds = CoupleScores.Where(x =>
                                                      x.CoupleID == Couple.CoupleID &&
                                                      x.WeekNumber == SelectedWeek)
                                   .Select(x => x.DanceID)
                                   .ToList();

            var possibleDances = Repo.GetAllDances().Where(x =>
                                                           possibleDanceIds.Contains(x.DanceId))
                                 .ToList();

            DanceSpinner.Update(this, possibleDances, Resource.Id.editScoreDanceSpinner);
        }