//Handlers
        private void CbBowStyle_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            switch (cbBowStyle.SelectedItem)
            {
            case "Olympic Recurve":
                eBowStyle = EBowStyle.Recurve;
                break;

            case "Compound":
                eBowStyle = EBowStyle.Compound;         //TODO: add a compound 10 ring, especially in 5 zone
                break;

            case "Barebow Recurve":
                eBowStyle = EBowStyle.Barebow;
                break;

            case "Longbow":
                eBowStyle = EBowStyle.Longbow;
                break;

            default:
                eBowStyle = EBowStyle.Other;
                break;
            }
        }
Exemple #2
0
        private string[] validScores = { "M", "m", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" };        //TODO: Add X for 10, and 11 for relevant imperial rounds

        public ScoreEntry(ERound round, EBowStyle bowStyle, int archers, RoundSelect rs)
        {
            InitializeComponent();

            this.rs   = rs;
            eRound    = round;
            eBowStyle = bowStyle;
            nArchers  = archers;
            if (round == ERound.Fita18 || round == ERound.Portsmouth)
            {
                nArrows    = 3;
                nTotalEnds = 20;
            }
            else
            {
                nArrows = 6;
                if (round == ERound.WA1440)
                {
                    nTotalEnds = 24;
                }
                else
                {
                    nTotalEnds = 12;
                }
            }
            nEnd             = 1;
            labelEnd.Content = "End " + nEnd + " of " + nTotalEnds;
            lArrows          = new UIRing <FletchedGraphic>(nArrows);

            if (nArchers == 1)
            {
                bnNextArcher.Content = "Score";
            }

            archer    = new Archer();    //TODO: add more depending on nArchers
            tempScore = new Ring <int>(nArrows);

            SetupTargetGraphics();
            SetupScoreEntryBoxes();
        }