예제 #1
0
 public AircraftTypeDesignator(string iata, string icao, string manufacturer, string model, PLANECATEGORY cat, DateTime lastupdated) : this()
 {
     IATA         = iata;
     ICAO         = icao;
     Manufacturer = manufacturer;
     Model        = model;
     Category     = cat;
     LastUpdated  = lastupdated;
 }
예제 #2
0
        public static string GetShortStringValue(PLANECATEGORY cat)
        {
            string    output = null;
            FieldInfo fi     = typeof(PLANECATEGORY).GetField(cat.ToString());

            StringCustomAttribute[] attrs = fi.GetCustomAttributes(typeof(StringCustomAttribute), false) as StringCustomAttribute[];
            if (attrs.Length > 0)
            {
                output = attrs[0].Value.Substring(0, 1).ToUpper();
            }
            return(output);
        }
예제 #3
0
        public static PLANECATEGORY[] GetValuesExceptNone()
        {
            PLANECATEGORY[] cats           = (PLANECATEGORY[])Enum.GetValues(typeof(PLANECATEGORY));
            PLANECATEGORY[] catsexceptnone = new PLANECATEGORY[cats.Length - 1];
            int             i = 0;

            foreach (PLANECATEGORY cat in cats)
            {
                if (cat != PLANECATEGORY.NONE)
                {
                    catsexceptnone[i] = cat;
                    i++;
                }
            }
            return(catsexceptnone);
        }
예제 #4
0
 public PlaneInfo(DateTime time, string call, string reg, string hex, double lat, double lon, double track, double alt, double speed, string type, string manufacturer, string model, PLANECATEGORY category)
 {
     Time         = time.ToUniversalTime();
     Call         = call;
     Reg          = reg;
     Hex          = hex;
     Lat          = lat;
     Lon          = lon;
     Alt          = alt;
     Track        = track;
     Speed        = speed;
     Type         = type;
     Manufacturer = manufacturer;
     Model        = model;
     Category     = category;
 }
예제 #5
0
 public static string GetName(PLANECATEGORY cat)
 {
     return(Enum.GetName(typeof(PLANECATEGORY), cat));
 }
예제 #6
0
 public AircraftTypeDesignator(string iata, string icao, string manufacturer, string model, PLANECATEGORY cat) : this(iata, icao, manufacturer, model, cat, DateTime.UtcNow)
 {
 }