コード例 #1
0
        private void competitionCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            CompetitionGroupType ctype = (CompetitionGroupType)(Enum.Parse(typeof(CompetitionGroupType), competitionCombo.SelectedItem.ToString()));

            DataManager.CurrentCompetition = ctype;
            setupScoringControls();
        }
コード例 #2
0
 public GroupScore(CompetitionGroupType competition, Group g)
 {
     CompetitionGroupType = competition;
     group = g;
     foreach (Registrant r in getRegistrants())
     {
         internalScoring.Add(r, new Score(CompetitionGroupType));
     }
 }
コード例 #3
0
        public Score(Score sc)
        {
            competitionType = sc.competitionType;

            foreach (KeyValuePair <Judge, Dictionary <ScoringEntry, float> > judge in sc.Scores)
            {
                Dictionary <ScoringEntry, float> newJudgeScore = new Dictionary <ScoringEntry, float>();
                foreach (KeyValuePair <ScoringEntry, float> kvp in judge.Value)
                {
                    newJudgeScore.Add(kvp.Key, kvp.Value);
                }
                // Clear old data
                if (internalScores.ContainsKey(judge.Key))
                {
                    internalScores.Remove(judge.Key);
                }
                //Set new data
                internalScores.Add(judge.Key, newJudgeScore);
            }
        }
コード例 #4
0
 public List <ScoringEntry> getRows()
 {
     return(CompetitionGroupType.getScoringEntries());
 }
コード例 #5
0
        public static List <ScoringEntry> getScoringEntries(this CompetitionGroupType t)
        {
            switch (t)
            {
            case CompetitionGroupType.Kitei:
                return(new List <ScoringEntry>
                {
                    ScoringEntry.Shomenuchi_Kokyunage,
                    ScoringEntry.Yokomenuchi_Shihonage,
                    ScoringEntry.Munetsuki_Kotegaeshi,
                    ScoringEntry.Katatetori_Tenkan_Ikkyo,
                    ScoringEntry.Katadori_Nikyo,
                    ScoringEntry.Ushiro_Tekubidori_Sankyo
                });

            case CompetitionGroupType.JoNage:
                return(new List <ScoringEntry>
                {
                    ScoringEntry.Kokyunage,
                    ScoringEntry.Kokyunage_Zenponage,
                    ScoringEntry.Sakatemochi_Kokyunage_Zenponage,
                    ScoringEntry.Shihonage,
                    ScoringEntry.Nikyo,
                    ScoringEntry.Kotegaeshi,
                    ScoringEntry.Kokyunage_Kirikaeshi,
                    ScoringEntry.Kokyunage_Ashisuki
                });

            case CompetitionGroupType.Tantodori:
                return(new List <ScoringEntry>
                {
                    ScoringEntry.Syomenuchi_Kotegaeshi,
                    ScoringEntry.Syomenuchi_Kokyunage,
                    ScoringEntry.Sakatemochi_Yokomenuchi_irimi_Gokyo,
                    ScoringEntry.Sakatemochi_Kokyunage,
                    ScoringEntry.Yokomenuchi_Kokyunage,
                    ScoringEntry.Munetsuki_Kotegaeshi,
                    ScoringEntry.Munetsuki_ikkyo_irimi,
                    ScoringEntry.Munetsuki_Kokyunage_Zenponage,
                    ScoringEntry.Munetsuki_Kokyunage_Hijuchi_Menuchi,
                    ScoringEntry.Munetsuki_Kokyunage_Keitenage,
                });

            case CompetitionGroupType.Taigi_5:
                return(new List <ScoringEntry>
                {
                    ScoringEntry.Shomenuchi_Kokyunage,
                    ScoringEntry.Yokomenuchi_Shihonage,
                    ScoringEntry.Munetsuki_Koteoroshi_Katameru,
                    ScoringEntry.Katatori_Ikkyo_Irimi,
                    ScoringEntry.Koyku_Dosa
                });

            case CompetitionGroupType.Taigi_12:
                return(new List <ScoringEntry>
                {
                    ScoringEntry.Kokyunage_Irimi,
                    ScoringEntry.Kokyunage_Tenkan,
                    ScoringEntry.Nikyo,
                    ScoringEntry.Ikkyo,
                    ScoringEntry.Kokyunage_Zempo_Nage,
                    ScoringEntry.Kokyunage_Ball_Nage
                });

            case CompetitionGroupType.Taigi_13:
                return(new List <ScoringEntry>
                {
                    ScoringEntry.Kokyunage_Irimi,
                    ScoringEntry.Kokyunage_Juji_Irimi,
                    ScoringEntry.Kokyunage_Atemi,
                    ScoringEntry.Shihonage_Irimi_Tobikomi,
                    ScoringEntry.Kotegaeshi_Enundo,
                    ScoringEntry.Kokyunage_KiriKaeshi
                });

            default:
                return(new List <ScoringEntry>
                {
                    ScoringEntry.Entry
                });
            }
        }
コード例 #6
0
 public Score(CompetitionGroupType competitionType)
 {
     this.competitionType = competitionType;
 }