Exemplo n.º 1
0
        private bool isCurrentPageValid()
        {
            bool isValid = false;

            switch (WM.CurrentState)
            {
            case WizardState.race:
                isValid = raceComponent.isValid() && alignmentComponent.isValid();
                break;

            case WizardState.appearance:
                isValid = ageComponent.isValid() && bodyComponent.isValid() && appearanceComponent.isValid();
                break;

            case WizardState.classBackground:
                isValid = classComponent.isValid() && backgroundComponent.isValid();
                break;

            case WizardState.stats:
                isValid = abilityComponent.isValid();
                break;

            case WizardState.languages:
                isValid = languageComponent.isValid();
                break;

            case WizardState.skillEquipment:
                isValid = skillComponent.isValid() && equipmentComponent.isValid();
                break;

            case WizardState.spells:
                isValid = spellComponent.isValid();
                break;

            case WizardState.extraRaceChoices:
                isValid = extraRaceChoiceComponent.isValid();
                break;

            case WizardState.extraClassChoices:
                isValid = extraClassChoiceComponent.isValid();
                break;

            case WizardState.extraSubclassChoices:
                isValid = extraSubclassChoiceComponent.isValid();
                break;

            case WizardState.story:
                isValid = nameComponent.isValid() && storyComponent.isValid();
                break;

            case WizardState.export:
                isValid = exportComponent.isValid();
                break;

            default:     //WizardState.intro
                isValid = introComponent.isValid();
                break;
            }

            return(isValid);
        }