示例#1
0
 private void calculateSumPlayerPoint()
 {
     if (!isConverttableToInt(playerBasedPoint.Text))
     {
         playerBasedPoint.Text = ZERO.ToString();
     }
     if (!isConverttableToInt(playerExtraPoint.Text))
     {
         playerExtraPoint.Text = ZERO.ToString();
     }
     sumPlayerPoint.Text = (Convert.ToInt32(playerBasedPoint.Text) + Convert.ToInt32(playerExtraPoint.Text)).ToString();
 }
        private String Step(SV s, String inp)
        {
            Char c = PreStep(ref inp);

            if (POINT.Contains(c))
            {
                return("0." + Step(new I0(), inp));
            }
            else if (ZERO.Contains(c))
            {
                return("0" + Step(new T2(), inp));
            }
            else if (DECIMAL.Contains(c))
            {
                return(c.ToString() + Step(new T4(), inp));
            }
            throw new CannotParseException();
        }
示例#3
0
        private void loadLanguageTexts()
        {
            this.Text                  = resourceManager.GetString("rolePlayBoard", actualCultureInfo);
            narrationButton.Text       = resourceManager.GetString("narration", actualCultureInfo);
            actualEvent.Text           = resourceManager.GetString("actualEvent", actualCultureInfo);
            diceLabel.Text             = resourceManager.GetString("diceInstruction", actualCultureInfo);
            throwDice.Text             = resourceManager.GetString("throwDice", actualCultureInfo);
            basePontLabel.Text         = resourceManager.GetString("basePoint", actualCultureInfo);
            extraPointLabel.Text       = resourceManager.GetString("extraPoint", actualCultureInfo);
            sumPointLabel.Text         = resourceManager.GetString("sumPoint", actualCultureInfo);
            opponentPointLabel.Text    = resourceManager.GetString("opponentPoint", actualCultureInfo);
            vsLabel.Text               = resourceManager.GetString("vs", actualCultureInfo);
            opponenetThrowDiceToo.Text = resourceManager.GetString("opponentThrowToo", actualCultureInfo);
            languageGroupBox.Text      = resourceManager.GetString("languageTag", actualCultureInfo);
            languageRadioButtonHu.Text = resourceManager.GetString("hu", actualCultureInfo);
            languageRadioButtonEn.Text = resourceManager.GetString("en", actualCultureInfo);
            loadGame.Text              = resourceManager.GetString("loadGame", actualCultureInfo);;
            generateGame.Text          = resourceManager.GetString("generateGame", actualCultureInfo);
            historyLabel.Text          = resourceManager.GetString("story", actualCultureInfo);
            playersComboBox.Text       = resourceManager.GetString("playerName", actualCultureInfo);
            playerSkillComboBox.Text   = resourceManager.GetString("skill", actualCultureInfo);
            notSavedGameLabel.Text     = resourceManager.GetString("gameIsNotSaved", actualCultureInfo);

            playerDiceLabel.Text   = resourceManager.GetString("playerDiceRoll", actualCultureInfo);
            opponentDiceLabel.Text = resourceManager.GetString("opponentDiceRoll", actualCultureInfo);

            ladderRadioButton.Text   = resourceManager.GetString("task", actualCultureInfo);
            opponentRadioButton.Text = resourceManager.GetString("opponent", actualCultureInfo);
            ladderComboBox.Text      = resourceManager.GetString("ladderTask", actualCultureInfo);
            opponentGroupBox.Text    = resourceManager.GetString("eventType", actualCultureInfo);

            diceType.Items.Clear();
            foreach (string actualDiceType in gameCoordinator.dicesList)
            {
                diceType.Items.Add(actualDiceType);
            }
            diceType.SelectedIndex = 0;
            playerBasedPoint.Text  = ZERO.ToString();
            playerExtraPoint.Text  = ZERO.ToString();
            opponentPoint.Text     = ZERO.ToString();
            numberOfDice.Text      = ZERO.ToString();
            reloadDefaultImage();
        }