/* * Switchboard operator for getting match Ranks * PRE: Rank type is provided * POST: Dictionary<String,double> type * Used for populating the listView in Rankings Page */ public Dictionary <int, double> getRank(MatchFormat.CHOOSE_RANK_TYPE x) { refresh(); switch (x) { case MatchFormat.CHOOSE_RANK_TYPE.pick1: //hatch return(timeFixer(hatchData)); case MatchFormat.CHOOSE_RANK_TYPE.drop1: return(timeFixer(drop1_4Data)); case MatchFormat.CHOOSE_RANK_TYPE.drop2: return(timeFixer(drop2Data)); case MatchFormat.CHOOSE_RANK_TYPE.drop3: return(timeFixer(drop3Data)); case MatchFormat.CHOOSE_RANK_TYPE.climb: return(climbData); case MatchFormat.CHOOSE_RANK_TYPE.overallRank: return(overallData); default: Console.WriteLine("ERROR: WRONG RANK TYPE"); return(new Dictionary <int, double> ()); } }
//void settingsClicked (object sender, System.EventArgs e) { // Navigation.PushAsync (new Settings ()); //} void rankTypeDelta(object sender, System.EventArgs e) { switch (rankPicker.SelectedIndex) { case 0: rankChoice = MatchFormat.CHOOSE_RANK_TYPE.overallRank; break; case 1: rankChoice = MatchFormat.CHOOSE_RANK_TYPE.pick1; //Hatch break; case 2: rankChoice = MatchFormat.CHOOSE_RANK_TYPE.pick2; //Cargo break; case 3: rankChoice = MatchFormat.CHOOSE_RANK_TYPE.climb; //Climb break; case 4: rankChoice = MatchFormat.CHOOSE_RANK_TYPE.drop1; //Lvl1 break; case 5: rankChoice = MatchFormat.CHOOSE_RANK_TYPE.drop2; //lvl2 break; case 6: rankChoice = MatchFormat.CHOOSE_RANK_TYPE.drop3; //lvl3 break; case 7: rankChoice = MatchFormat.CHOOSE_RANK_TYPE.overallRank; // teamNum break; default: rankChoice = MatchFormat.CHOOSE_RANK_TYPE.overallRank; break; } updateEvents(); }