Example #1
0
        public static char ToChar(this FlightPlanType type)
        {
            char result;

            switch (type)
            {
            case FlightPlanType.IFR:
                result = 'I';
                break;

            case FlightPlanType.VFR:
                result = 'V';
                break;

            case FlightPlanType.DVFR:
                result = 'D';
                break;

            case FlightPlanType.SVFR:
                result = 'S';
                break;

            default:
                result = ' ';
                break;
            }
            return(result);
        }
Example #2
0
        public static FlightPlanType FromString(this FlightPlanType type, string typeString)
        {
            string         text = typeString.ToUpper();
            FlightPlanType result;

            switch (text)
            {
            case "IFR":
            case "I":
                result = FlightPlanType.IFR;
                break;

            case "VFR":
            case "V":
                result = FlightPlanType.VFR;
                break;

            case "DVFR":
            case "D":
                result = FlightPlanType.DVFR;
                break;

            case "SVFR":
            case "S":
                result = FlightPlanType.SVFR;
                break;

            default:
                result = FlightPlanType.IFR;
                break;
            }
            return(result);
        }
Example #3
0
 public FlightPlan(FlightPlanType flightType, string equipment, int cruiseAlt, int cruiseSpd, string dep, string dest, string alt, string route, string remarks) : this()
 {
     this.FlightType         = flightType;
     this.Equipment          = equipment;
     this.CruiseAltitude     = cruiseAlt;
     this.CruiseSpeed        = cruiseSpd;
     this.DepartureAirport   = dep;
     this.DestinationAirport = dest;
     this.AlternateAirport   = alt;
     this.Route   = route;
     this.Remarks = remarks;
 }