Example #1
0
    public void radioButtonPressed(FMC_RadioButton pressedButton)
    {
        currentlyCheckedButton = pressedButton;
        if (resultIsRangeOfNumberText)
        {
            resultIsRangeOfNumberText.text = "=" + pressedButton.text;
        }

        foreach (FMC_RadioButton b in radioButtons)
        {
            if (b != currentlyCheckedButton)
            {
                b.uncheckButton(false);
            }
        }
    }
    private void checkInformation(allInformation i, FMC_RadioButton button, bool ntFront, bool ntBack)
    {
        switch (i)
        {
        case allInformation.ron10:
            Int32.TryParse(button.text, out rangeOfNumbers);
            break;

        case allInformation.ron20:
            Int32.TryParse(button.text, out rangeOfNumbers);
            break;

        case allInformation.ron100:
            Int32.TryParse(button.text, out rangeOfNumbers);
            break;

        case allInformation.ron1000:
            Int32.TryParse(button.text, out rangeOfNumbers);
            break;

        case allInformation.ntCore:
            if (ntFront)
            {
                numberTypeFront = FMC_Settings.numberType.core;
            }
            if (ntBack)
            {
                numbeTypeBack = FMC_Settings.numberType.core;
            }
            break;

        case allInformation.ntNeighbour01:
            if (ntFront)
            {
                numberTypeFront = FMC_Settings.numberType.neighbour01;
            }
            if (ntBack)
            {
                numbeTypeBack = FMC_Settings.numberType.neighbour01;
            }
            break;

        case allInformation.ntNeighbour02:
            if (ntFront)
            {
                numberTypeFront = FMC_Settings.numberType.neighbour02;
            }
            if (ntBack)
            {
                numbeTypeBack = FMC_Settings.numberType.neighbour02;
            }
            break;

        //case allInformation.ntEven:
        //    numberTypeFront = FMC_Settings.numberType.even;
        //    break;
        //case allInformation.ntUneven:
        //    numberTypeFront = FMC_Settings.numberType.uneven;
        //    break;
        case allInformation.ntMixed:
            if (ntFront)
            {
                numberTypeFront = FMC_Settings.numberType.mixed;
            }
            if (ntBack)
            {
                numbeTypeBack = FMC_Settings.numberType.mixed;
            }
            break;

        case allInformation.opPlus:
            operationPlusIsPossible = true;
            break;

        case allInformation.opTimes:
            operationTimesIsPossible = true;
            break;

        case allInformation.opMinus:
            operationMinusIsPossible = true;
            break;

        case allInformation.opDivided:
            operationDividedIsPossible = true;
            break;

        case allInformation.ttGreater:
            taskTypeGreaterIsPossible = true;
            break;

        case allInformation.ttSame:
            taskTypeSameIsPossible = true;
            break;

        case allInformation.ttSmaler:
            taskTypeSmallerIsPossible = true;
            break;

        case allInformation.ttEquals:
            taskTypeEqualsIsPossible = true;
            break;

        case allInformation.ttOneTimesOne:
            taskTypeOneTimesOneIsPossible = true;
            break;

        case allInformation.tInfinite:
            timeSpecification = -1;
            break;

        case allInformation.t5:
            int x = 0;
            Int32.TryParse(button.text, out x);
            timeSpecification = (float)x;
            //timeSpecification = 5;
            break;

        case allInformation.t15:
            int y = 0;
            Int32.TryParse(button.text, out y);
            timeSpecification = (float)y;
            //timeSpecification = 15;
            break;

        case allInformation.t30:
            int z = 0;
            Int32.TryParse(button.text, out z);
            timeSpecification = (float)z;
            //timeSpecification = 30;
            break;
        }
    }