当前位置: 首页>>代码示例>>C#>>正文


C# VehicleType类代码示例

本文整理汇总了C#中VehicleType的典型用法代码示例。如果您正苦于以下问题:C# VehicleType类的具体用法?C# VehicleType怎么用?C# VehicleType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


VehicleType类属于命名空间,在下文中一共展示了VehicleType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RegisterCallsign

        public async Task RegisterCallsign(string imei, string callsign = null, VehicleType? type = null)
        {
            var iToC = await dataContext.IMEIToCallsigns.FirstOrDefaultAsync(i => i.IMEI == imei);

            if (iToC != null)
            {
                if (iToC.CallSign != callsign)
                {
                    var oldLocations = dataContext.LocationRecords.Where(l => l.Callsign == iToC.CallSign && l.Expired == false);

                    foreach (var l in oldLocations)
                        l.Expired = true;
                }

                iToC.CallSign = callsign ?? iToC.CallSign;
                iToC.Type = type ?? iToC.Type;
                await dataContext.SaveChangesAsync();
            }
            else
            {
                iToC = new IMEIToCallsign
                {
                    CallSign = callsign ?? "WR???",
                    IMEI = imei,
                    Type = type ?? VehicleType.Unknown
                };

                dataContext.IMEIToCallsigns.Add(iToC);
                await dataContext.SaveChangesAsync();
            }
        }
开发者ID:trichards57,项目名称:bike-tracker,代码行数:31,代码来源:IIMEIService.cs

示例2: GetInsuranceRate

		public decimal GetInsuranceRate(VehicleType vehicleType, string vehicleManufacturer)
		{
			var basePremiumForVehicleType = this._configurationgService.GetInsuranceBasePremium(vehicleType);
			var factorForVehicleManufacturer = this._configurationgService.GetInsuranceFactor(vehicleManufacturer);

			return basePremiumForVehicleType * factorForVehicleManufacturer;
		}
开发者ID:skorunka,项目名称:Markel.TechnicalTask,代码行数:7,代码来源:InsuranceRatingService.cs

示例3: VehicleDef

        public VehicleDef(string line)
            : base(line)
        {
            Id = GetInt(0);

            ModelName = GetString(1);
            TextureDictionaryName = GetString(2);

            VehicleType = (VehicleType) Enum.Parse(typeof(VehicleType), GetString(3), true);

            HandlingName = GetString(4);
            GameName = GetString(5);
            AnimsName = GetString(6);
            ClassName = GetString(7);

            Frequency = GetInt(8);
            Flags = GetInt(9);
            CompRules = GetInt(10, NumberStyles.HexNumber);

            HasWheels = Parts >= 15;

            if (HasWheels) {
                WheelId = GetInt(11);
                WheelScaleFront = GetSingle(12);
                WheelScaleRear = GetSingle(13);
                UpgradeId = GetInt(14);
            }
        }
开发者ID:katalist5296,项目名称:SanAndreasUnity,代码行数:28,代码来源:VehicleDef.cs

示例4: VehicleModel

 public VehicleModel(string code, string name, VehicleBrand brand, VehicleSize size, VehicleType type)
     : base(code)
 {
     _name = name;
     _brand = brand;
     _size = size;
     _type = type;
 }
开发者ID:gofixiao,项目名称:Macsauto-Backup,代码行数:8,代码来源:VehicleModel.cs

示例5: GetInsuranceBasePremium

		public decimal GetInsuranceBasePremium(VehicleType vehicleType)
		{
			if (!this._configurationStorage.VehicleTypeBasePremiums.ContainsKey(vehicleType))
			{
				throw new ArgumentException(nameof(vehicleType));
			}

			return this._configurationStorage.VehicleTypeBasePremiums[vehicleType];
		}
开发者ID:skorunka,项目名称:Markel.TechnicalTask,代码行数:9,代码来源:ConfigurationgService.cs

示例6: VehicleRrAloha

 public VehicleRrAloha(Coordinate initialPosition, int numId, Color color, VehicleType type,
     MacTypes mac, Trajectories tray, Coordinate limit, int timeDivisions, int frequencyDivisions)
     : base(initialPosition, numId, color, type, mac, tray, limit)
 {
     this.timeSegments = timeDivisions;
     this.frequencySegments = frequencyDivisions;
     this.FrameInformation = new int[this.timeSegments, this.frequencySegments];
     this.AlreadyTx = false;
 }
开发者ID:AkashBaidya,项目名称:SIMITS,代码行数:9,代码来源:VehicleRrAloha.cs

示例7: SetOutputs

    protected override void SetOutputs(IGH_DataAccess da)
    {
      // We're set to create the output now. To keep the size of the SolveInstance() method small, 
      // The actual functionality will be in a different method:
      IVehicle vehicle = new VehicleType(agent, wheelRadius);

      // Finally assign the spiral to the output parameter.
      da.SetData(nextOutputIndex++, vehicle);
    }
开发者ID:lxfschr,项目名称:Quelea,代码行数:9,代码来源:VehicleComponent.cs

示例8: setVehicleStatus

 public void setVehicleStatus(int status)
 {
     System.Console.WriteLine("########################   " + status );
     if (status == 1)
     {
         System.Console.WriteLine("########################   " + status);
         VehicleStatus = VehicleType.Small_Vehicle;
     }
 }
开发者ID:BdGL3,项目名称:CXPortal,代码行数:9,代码来源:PortalViewModel.cs

示例9: Vehicle

 /// <summary>
 /// Dit is de constructor van de vehicle class. 
 /// </summary>
 public Vehicle(int x, int y,VehicleType t, Player t2)
 {
     vehicletype = t;
     StartPositionX = x;
     StartPositionY = y;
     player = t2;
     Base.gameTasks.Add(CheckShooting);
     Base.gameTasks.Add(CheckCollision);
 }
开发者ID:jornvanwier,项目名称:RacegameInformaticaNHL,代码行数:12,代码来源:Vehicle.cs

示例10: Vehicle

 public Vehicle(string make, string model, decimal price, VehicleType type)
 {
     this.make = make;
     this.model = model;
     this.wheelcount = (int)type;
     this.price = price;
     this.Comments = new List<IComment>();
     ValidateFields();
 }
开发者ID:thrusanova,项目名称:OOPBasics,代码行数:9,代码来源:Vehicle.cs

示例11: Vehicle

 public Vehicle()
 {
     _myLicensePlate = "";
     _myHiddenLicensePlate = "";
     _myType = VehicleType.Car;
     _myVehicleId = "0";
     WebData = new VehicleWebData();
     _isFromWebsite = false;
 }
开发者ID:Tadimsky,项目名称:PayByPhoneAPI,代码行数:9,代码来源:Vehicle.cs

示例12: CongestionRate

 public CongestionRate(string description, Day day, VehicleType vehicle, decimal rate, DateTime start, DateTime end)
 {
     Description = description;
     Day = day;
     Vehicle = vehicle;
     Rate = rate;
     Start = start;
     End = end;
 }
开发者ID:adamcamlondon,项目名称:ccrabo,代码行数:9,代码来源:CongestionRate.cs

示例13: Builder

 public IBuilder Builder(VehicleType vehicleType)
 {
     if (vehicleType == DesignPatterns.Builder.VehicleType.Car)
         return new CarBuilder();
     else if (vehicleType == DesignPatterns.Builder.VehicleType.Bike)
         return new BikeBuilder();
     else if (vehicleType == DesignPatterns.Builder.VehicleType.Cycle)
         return new CycleBuilder();
     else return new CycleBuilder();
 }
开发者ID:tushartyagi,项目名称:design-patterns-csharp,代码行数:10,代码来源:Director.cs

示例14: IsConflictOrOverLap

        /// <summary>
        /// Returns -1 no conflict, Return 0 ignore first Return 1 ignore 2nd
        /// </summary>
        private static int IsConflictOrOverLap(ICongestionRate cp1, ICongestionRate cp2, Day day, VehicleType type)
        {
            var cr1DateRange = new DateRange(cp1.Start, cp1.End);
            var cr2DateRange = new DateRange(cp2.Start, cp2.End);

            var intersect = DateTimeIntersect.FindIntersect(cr1DateRange, cr2DateRange);

            if (intersect == null) return -1;

            return SelectTheMoreSpecific(cp1, cp2, day, type);
        }
开发者ID:adamcamlondon,项目名称:ccrabo,代码行数:14,代码来源:CongestionRateFinder.cs

示例15: Vehicle

        public Vehicle(MpkObject mpkObject)
        {
            Name = mpkObject.Name.ToUpper();
            VehicleType = GetVehicleTypeFromString(mpkObject.Type);

            Position = new Position
            {
                Latitude = mpkObject.X,
                Longitude = mpkObject.Y,
            };
        }
开发者ID:WrocTracker,项目名称:WrocTracker,代码行数:11,代码来源:Vehicle.cs


注:本文中的VehicleType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。