本文整理汇总了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();
}
}
示例2: GetInsuranceRate
public decimal GetInsuranceRate(VehicleType vehicleType, string vehicleManufacturer)
{
var basePremiumForVehicleType = this._configurationgService.GetInsuranceBasePremium(vehicleType);
var factorForVehicleManufacturer = this._configurationgService.GetInsuranceFactor(vehicleManufacturer);
return basePremiumForVehicleType * factorForVehicleManufacturer;
}
示例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);
}
}
示例4: VehicleModel
public VehicleModel(string code, string name, VehicleBrand brand, VehicleSize size, VehicleType type)
: base(code)
{
_name = name;
_brand = brand;
_size = size;
_type = type;
}
示例5: GetInsuranceBasePremium
public decimal GetInsuranceBasePremium(VehicleType vehicleType)
{
if (!this._configurationStorage.VehicleTypeBasePremiums.ContainsKey(vehicleType))
{
throw new ArgumentException(nameof(vehicleType));
}
return this._configurationStorage.VehicleTypeBasePremiums[vehicleType];
}
示例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;
}
示例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);
}
示例8: setVehicleStatus
public void setVehicleStatus(int status)
{
System.Console.WriteLine("######################## " + status );
if (status == 1)
{
System.Console.WriteLine("######################## " + status);
VehicleStatus = VehicleType.Small_Vehicle;
}
}
示例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);
}
示例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();
}
示例11: Vehicle
public Vehicle()
{
_myLicensePlate = "";
_myHiddenLicensePlate = "";
_myType = VehicleType.Car;
_myVehicleId = "0";
WebData = new VehicleWebData();
_isFromWebsite = false;
}
示例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;
}
示例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();
}
示例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);
}
示例15: Vehicle
public Vehicle(MpkObject mpkObject)
{
Name = mpkObject.Name.ToUpper();
VehicleType = GetVehicleTypeFromString(mpkObject.Type);
Position = new Position
{
Latitude = mpkObject.X,
Longitude = mpkObject.Y,
};
}