Exemple #1
0
        public static string TitleForType(OptionalColumnType type)
        {
            switch (type)
            {
            case OptionalColumnType.CustomProp:
            case OptionalColumnType.None:
                return(string.Empty);

            case OptionalColumnType.Complex:
                return(Resources.Makes.IsComplex);

            case OptionalColumnType.Retract:
                return(Resources.Makes.IsRetract);

            case OptionalColumnType.Tailwheel:
                return(Resources.Makes.IsTailwheel);

            case OptionalColumnType.HighPerf:
                return(Resources.Makes.IsHighPerf);

            case OptionalColumnType.TAA:
                return(Resources.Makes.IsTAA);

            case OptionalColumnType.Turbine:
                return(Resources.Makes.IsTurbine);

            case OptionalColumnType.Jet:
                return(Resources.Makes.IsJet);

            case OptionalColumnType.TurboProp:
                return(Resources.Makes.IsTurboprop);

            case OptionalColumnType.ASEL:
                return(CategoryClass.CategoryClassFromID(CategoryClass.CatClassID.ASEL).CatClass);

            case OptionalColumnType.AMEL:
                return(CategoryClass.CategoryClassFromID(CategoryClass.CatClassID.AMEL).CatClass);

            case OptionalColumnType.ASES:
                return(CategoryClass.CategoryClassFromID(CategoryClass.CatClassID.ASES).CatClass);

            case OptionalColumnType.AMES:
                return(CategoryClass.CategoryClassFromID(CategoryClass.CatClassID.AMES).CatClass);

            case OptionalColumnType.Glider:
                return(CategoryClass.CategoryClassFromID(CategoryClass.CatClassID.Glider).CatClass);

            case OptionalColumnType.Helicopter:
                return(CategoryClass.CategoryClassFromID(CategoryClass.CatClassID.Helicopter).CatClass);

            case OptionalColumnType.ATD:
            case OptionalColumnType.FTD:
            case OptionalColumnType.FFS:
                return(type.ToString());
            }
            throw new ArgumentOutOfRangeException(nameof(type), "Unknown OptionalColumnType: " + type.ToString());
        }
Exemple #2
0
        public OptionalColumn(OptionalColumnType type) : this()
        {
            ColumnType = type;
            if (type == OptionalColumnType.CustomProp || type == OptionalColumnType.None)
            {
                throw new ArgumentOutOfRangeException(nameof(type));
            }

            ValueType = OptionalColumnValueType.Decimal;
            Title     = TitleForType(type);
        }
Exemple #3
0
        public static string TitleForType(OptionalColumnType type)
        {
            switch (type)
            {
            case OptionalColumnType.CustomProp:
            case OptionalColumnType.None:
                return(string.Empty);

            case OptionalColumnType.Complex:
                return(Resources.Makes.IsComplex);

            case OptionalColumnType.Retract:
                return(Resources.Makes.IsRetract);

            case OptionalColumnType.Tailwheel:
                return(Resources.Makes.IsTailwheel);

            case OptionalColumnType.HighPerf:
                return(Resources.Makes.IsHighPerf);

            case OptionalColumnType.TAA:
                return(Resources.Makes.IsTAA);

            case OptionalColumnType.Turbine:
                return(Resources.Makes.IsTurbine);

            case OptionalColumnType.Jet:
                return(Resources.Makes.IsJet);

            case OptionalColumnType.TurboProp:
                return(Resources.Makes.IsTurboprop);

            case OptionalColumnType.ASEL:
                return(CategoryClass.CategoryClassFromID(CategoryClass.CatClassID.ASEL).CatClass);

            case OptionalColumnType.AMEL:
                return(CategoryClass.CategoryClassFromID(CategoryClass.CatClassID.AMEL).CatClass);

            case OptionalColumnType.ASES:
                return(CategoryClass.CategoryClassFromID(CategoryClass.CatClassID.ASES).CatClass);

            case OptionalColumnType.AMES:
                return(CategoryClass.CategoryClassFromID(CategoryClass.CatClassID.AMES).CatClass);

            case OptionalColumnType.Glider:
                return(CategoryClass.CategoryClassFromID(CategoryClass.CatClassID.Glider).CatClass);

            case OptionalColumnType.Helicopter:
                return(CategoryClass.CategoryClassFromID(CategoryClass.CatClassID.Helicopter).CatClass);

            case OptionalColumnType.Gyroplane:
                return(CategoryClass.CategoryClassFromID(CategoryClass.CatClassID.Gyroplane).CatClass);

            case OptionalColumnType.HotAirBalloon:
                return(CategoryClass.CategoryClassFromID(CategoryClass.CatClassID.HotAirBalloon).CatClass);

            case OptionalColumnType.GasBalloon:
                return(CategoryClass.CategoryClassFromID(CategoryClass.CatClassID.GasBalloon).CatClass);

            case OptionalColumnType.UAS:
                return(CategoryClass.CategoryClassFromID(CategoryClass.CatClassID.UnmannedAerialSystem).CatClass);

            case OptionalColumnType.ATD:
            case OptionalColumnType.FTD:
            case OptionalColumnType.FFS:
                return(type.ToString());

            case OptionalColumnType.CrossCountry:
                return(Resources.LogbookEntry.PrintHeaderCrossCountry);
            }
            throw new ArgumentOutOfRangeException(nameof(type), "Unknown OptionalColumnType: " + type.ToString());
        }