Beispiel #1
0
    protected void UpdateRowsForCatClass(CategoryClass.CatClassID idCatClass)
    {
        bool fIsGlider = idCatClass == CategoryClass.CatClassID.Glider;

        divTMG.Visible       = fIsGlider;
        divTailwheel.Visible = CategoryClass.IsAirplane(idCatClass) && !CategoryClass.IsSeaClass(idCatClass);
        divMultiHeli.Visible = (idCatClass == CategoryClass.CatClassID.Helicopter);

        bool hasEngine = CategoryClass.HasEngine(idCatClass);

        rowEngineType.Visible    = hasEngine;
        pnlHighPerfBlock.Visible = ckConstantProp.Enabled = ckComplex.Enabled = hasEngine;

        divComplex.Style["display"] = hasEngine || fIsGlider ? "inline-block" : "none";
        if (!hasEngine)
        {
            ckComplex.Checked            = ckConstantProp.Checked = ckCowlFlaps.Checked = ckRetract.Checked = false;
            rblTurbineType.SelectedIndex = 0;
        }

        bool fIsLegacyEligible = (idCatClass == CategoryClass.CatClassID.AMEL || idCatClass == CategoryClass.CatClassID.AMES || idCatClass == CategoryClass.CatClassID.Helicopter);

        pnlLegacyHighPerf.Style["display"] = fIsLegacyEligible ? "inline" : "none";
        if (ckLegacyHighPerf.Checked && !fIsLegacyEligible)
        {
            HighPerfType = MakeModel.HighPerfType.NotHighPerf;
        }
    }