Exemple #1
0
 public Vehicle(string make, string model, string year, string vin, VehicleStatusType status)
 {
     Make          = make;
     Model         = model;
     Year          = year;
     Vin           = vin;
     VehicleStatus = status;
 }
Exemple #2
0
        /// <summary>
        /// 生成定位车辆的参数
        /// </summary>
        /// <param name="aLocation"></param>
        /// <param name="aShow">是否显示车辆</param>
        /// <returns></returns>
        public static object[] GetLocatedVehicleParams(JsonLastPosition aLocation, bool aShow = true)
        {
            int vehicleColor           = NORMAL_COLOR;
            VehicleStatusType tmpState = (VehicleStatusType)aLocation.VehicleStatus;

            if (tmpState == VehicleStatusType.LongOffline ||
                tmpState == VehicleStatusType.Offline)
            {
                vehicleColor = OFFLINE_COLOR;
            }
            else if (tmpState == VehicleStatusType.Alarm)
            {
                vehicleColor = WARN_COLOR;
            }
            return(new object[] { aLocation.LicensePlate,
                                  aLocation.BdLongitude, aLocation.BdLatitude, aLocation.Direction,
                                  vehicleColor, aShow ? GenInfoWindow(aLocation) : "" });
        }
 public Van(string make, string model, string year, string vin, VehicleStatusType status)
     : base(make, model, year, vin, status)
 {
 }