コード例 #1
0
 public PointsCounter(int bid, int scored, int pointsInPair, Enums.Colors color, bool afterGame, bool enemyAfterGame, Enums.Doubles doubles)
 {
     this.bid            = bid;
     this.scored         = scored;
     this.pointsInPair   = pointsInPair;
     this.color          = color;
     this.afterGame      = afterGame;
     this.enemyAfterGame = enemyAfterGame;
     this.doubles        = doubles;
 }
コード例 #2
0
        private void submit_Click(object sender, EventArgs e)
        {
            int bid          = (int)bidBox.Value;
            int scored       = (int)scoredBox.Value;
            int pointsInPair = (int)pairPointsBox.Value;

            Enums.Colors  color   = GetColor(colorBox.Text);
            Enums.Doubles doubles = GetRadioButtonsState();
            int           row     = GetRow();

            if (row == -1)
            {
                return;
            }
            Tuple <bool, bool> afterGames = GetAfterGameValues(row, whoBox.Text);
            PointsCounter      counter    = new PointsCounter(bid, scored, pointsInPair, color, afterGames.Item1, afterGames.Item2, doubles);
            int score = counter.Calculate();

            PrintScore(score, row);
        }