• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# VehicleType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Vehicle

    private VehicleType _type; //the vehicle type

    #endregion Fields

    #region Constructors

    //the constructor
    public Vehicle(VehicleType type,float speed,float size, StreetDirection curDir, Street curStreet, Street nextStreet,int curStrNum, GamePath path, AudioClip theHorn)
    {
        _type = type;
        _speed = speed;
        _size = size;
        _currentDirection = curDir;
        _currentStreet = curStreet;
        _nextStreet = nextStreet;
        _curStreetNumber = curStrNum;
        _myPath = path;
        _horn = theHorn;
    }
开发者ID:AmeraCSD,项目名称:TrafficGame,代码行数:19,代码来源:Vehicle.cs


示例17: Save

        public VehicleModel Save(string code, string name, VehicleBrand brand, VehicleSize size, VehicleType type)
        {
            VehicleModel newModel = null;
            var session = NHibernateSessionManager.GetLocalSession();

            session.DoTransactional(sess =>
                {
                    newModel = _modelRepo.Insert(new VehicleModel(code, name, brand, size, type));
                });

            return newModel;
        }
开发者ID:gofixiao,项目名称:Macsauto-Backup,代码行数:12,代码来源:AddPresenter.cs


示例18: Vehicle

 //Vehicle(id, type, model, c, consum, city)
 public Vehicle(VehicleType type, string model, int c, float consum, City city)
 {
     this.ID = lastID;
     lastID++;
     this.Type = type;
     this.Model = model;
     this.Capacity = c;
     this.Consumption = consum;
     this.BasicLocation = city;
     this.Adress = "";
     this.IsAvailable = true;
 }
开发者ID:jcvitanovic,项目名称:CodeSamples,代码行数:13,代码来源:Vehicle.cs


示例19: SelectTheMoreSpecific

        private static int SelectTheMoreSpecific(ICongestionRate cp1, ICongestionRate cp2, Day day, VehicleType type)
        {
            //Check Vehicle
            if (cp1.Vehicle == type) return 1;
            if (cp2.Vehicle == type) return 0;

            //Check Day of the week
            if (cp1.Day == day) return 1;
            if (cp2.Day == day) return 0;

            //OtherWise ignore the 2nd
            return 1;
        }
开发者ID:adamcamlondon,项目名称:ccrabo,代码行数:13,代码来源:CongestionRateFinder.cs


示例20: Vehicle

 public Vehicle(string owner, VehicleType type, Object now = null)
 {
     if (owner == null)
         throw new ArgumentNullException();
     LastId += 1;
     Owner = owner;
     this.Type = type;
     Id = LastId;
     Color = ColorType.none;
     RegNr = null;
     Wheels = -1;
     checkInDate = now == null ? DateTime.Now : (DateTime)now;
 }
开发者ID:NiklasSonestedt,项目名称:garage2-1,代码行数:13,代码来源:Vehicle.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Vendor类代码示例发布时间:2022-05-24
下一篇:
C# VehicleMod类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap