示例#1
0
        public String GetTextView(Int32 indentLevel)
        {
            String        i  = HttpClientHelper.Indent(indentLevel);
            StringBuilder sb = new StringBuilder()
                               .Append(i).Append("Id:                    ").Append(Id)
                               .Append(i).Append("Id_External:           ").Append(Id_External)
                               .Append(i).Append("CreatedAt:             ").Append(CreatedAt.F("yyyy.MM.dd HH:mm:ss"))
                               .Append(i).Append("UpdatedAt:             ").Append(UpdatedAt.F("yyyy.MM.dd HH:mm:ss"))
                               .Append(i).Append("Name:                  ").Append(Name)
                               .Append(i).Append("CustomName:            ").Append(CustomName)
                               .Append(i).Append("Model:                 ").Append(Model)
                               .Append(i).Append("Manufacturer:          ").Append(Manufacturer)
                               .Append(i).Append("Year:                  ").Append(Year)
                               .Append(i).Append("RegistrationNumber:    ").Append(RegistrationNumber)
                               .Append(i).Append("InventoryNumber:       ").Append(InventoryNumber)
                               .Append(i).Append("Id_MachineGroup:       ").Append(Id_MachineGroup)
                               .Append(i).Append("MachineType:           ").Append(MachineType)
                               .Append(i).Append("MachineSubtype:        ").Append(MachineSubtype)
                               .Append(i).Append("Id_Avatar:             ").Append(Id_Avatar)
                               .Append(i).Append("SerialNumberOfChassis: ").Append(SerialNumberOfChassis)
                               .Append(i).Append("SerialNumberOfEngine:  ").Append(SerialNumberOfEngine)
                               .Append(i).Append("EnginePower:           ").Append(EnginePower.F("0.00"))
                               .Append(i).Append("FuelType:              ").Append(FuelType)
                               .Append(i).Append("FuelTankSize:          ").Append(FuelTankSize.F("0.00"))
                               .Append(i).Append("FuelConsumptionNorm:   ").Append(FuelConsumptionNorm.F("0.00"))
                               .Append(i).Append("LegalCompany:          ").Append(LegalCompany)
                               .Append(i).Append("Description:           ").Append(Description)
                               .Append(i).Append("Id_DefaultImplement:   ").Append(Id_DefaultImplement)
                               .Append(i).Append("Additional_1:          ").Append(Additional_1)
                               .Append(i).Append("Additional_2:          ").Append(Additional_2)
                               .Append(i).Append("AdditionalInfo:        ").Append(AdditionalInfo);

            return(sb.ToString());
        }
示例#2
0
        void FillBackSideTextByDrawText(Graphics gr)
        {
            const int textMainMargin = 468;
            const int textMargin     = textMainMargin + 41;
            const int textWidth      = 450;

            GraphicsHelper.DrawText(gr, "9.", textMainMargin, 38);
            GraphicsHelper.DrawText(gr, YearOfManufacture.ToUpper(), textMargin, 38, textWidth);
            GraphicsHelper.DrawText(gr, "10.", textMainMargin, 88);
            GraphicsHelper.DrawText(gr, Type.ToUpper(), textMargin, 88, textWidth);
            GraphicsHelper.DrawText(gr, "11.", textMainMargin, 138);
            GraphicsHelper.DrawText(gr, VehicleIdentificationNumber.ToUpper(), textMargin, 138, textWidth);
            GraphicsHelper.DrawText(gr, "12.", textMainMargin, 190);
            GraphicsHelper.DrawText(gr, GrossWeight.ToString("n2"), textMargin, 190, textWidth);
            GraphicsHelper.DrawText(gr, "13.", textMainMargin, 242);
            GraphicsHelper.DrawText(gr, CurbWeight.ToString("n2"), textMargin, 242, textWidth);
            GraphicsHelper.DrawText(gr, "14.", textMainMargin, 293);
            GraphicsHelper.DrawText(gr, EngineNumber.ToUpper(), textMargin, 293, textWidth);
            GraphicsHelper.DrawText(gr, "15.", textMainMargin, 345);
            GraphicsHelper.DrawText(gr, EnginePower.ToUpper(), textMargin, 345, textWidth);
            GraphicsHelper.DrawText(gr, "16.", textMainMargin, 395);
            GraphicsHelper.DrawText(gr, FuelType.ToUpper(), textMargin, 395, textWidth);
            GraphicsHelper.DrawText(gr, "17.", textMainMargin, 448);
            GraphicsHelper.DrawText(gr, NumberOfSeats.ToSafeString(), textMargin, 448, textWidth);
            GraphicsHelper.DrawText(gr, "18.", textMainMargin, 499);
            GraphicsHelper.DrawText(gr, NumberOfStandees.ToSafeString(), textMargin, 499, textWidth);
            GraphicsHelper.DrawText(gr, "19.", textMainMargin, 549);
            GraphicsHelper.DrawText(gr, SpecialMarks.ToUpper(), textMargin, 549, textWidth);
        }
示例#3
0
 /// <summary>
 /// Метод возвращает хэш-код объекта.
 /// </summary>
 /// <returns>Хэш-код объекта.</returns>
 public override int GetHashCode()
 {
     return
         (CarAge.GetHashCode()
          + DrivingExperience.GetHashCode()
          + DriverAge.GetHashCode()
          + EnginePower.GetHashCode());
 }
示例#4
0
 /// <summary>
 /// Метод возвращает хэш-код объекта.
 /// </summary>
 /// <returns>Хэш-код объекта.</returns>
 public override int GetHashCode()
 {
     return
         (CarNumber.GetHashCode()
          + Model.GetHashCode()
          + ManufacturedYear.GetHashCode()
          + CarCost.GetHashCode()
          + EnginePower.GetHashCode());
 }
示例#5
0
        public override int GetHashCode()
        {
            var hashCode = 877455370;

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Type);

            hashCode = hashCode * -1521134295 + EnginePower.GetHashCode();
            hashCode = hashCode * -1521134295 + Seats.GetHashCode();
            return(hashCode);
        }
示例#6
0
        /// <summary>
        /// Определяет, равны ли значения этого экземпляра и указанного объекта MainRepository.Models.RatioModel.
        /// </summary>
        /// <param name="obj">Объект для сравнения с данным экземпляром.</param>
        /// <returns>true, если значение параметра obj совпадает со значением данного экземпляра;
        /// в противном случае — false. Если значением параметра obj является null, метод возвращает false.</returns>
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            var ratioModel = obj as RatioModel;

            return
                (CarAge.Equals(ratioModel.CarAge) &&
                 DrivingExperience.Equals(ratioModel.DrivingExperience) &&
                 DriverAge.Equals(ratioModel.DriverAge) &&
                 EnginePower.Equals(ratioModel.EnginePower));
        }
示例#7
0
        /// <summary>
        /// Определяет, равны ли значения этого экземпляра и указанного объекта MainRepository.Models.CarModels
        /// </summary>
        /// <param name="obj">Объект для сравнения с данным экземпляром.</param>
        /// <returns>true, если значение параметра obj совпадает со значением данного экземпляра;
        /// в противном случае — false. Если значением параметра obj является null, метод возвращает false.</returns>
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            var carModel = obj as CarModel;

            return
                (CarNumber.Equals(carModel.CarNumber) &&
                 Model.Equals(carModel.Model) &&
                 ManufacturedYear.Equals(carModel.ManufacturedYear) &&
                 CarCost.Equals(carModel.CarCost) &&
                 EnginePower.Equals(carModel.EnginePower));
        }
示例#8
0
        public override string ToString()
        {
            var engine_code = (EngineCode?.Any() ?? false) ? string.Join(",", EngineCode) : "";
            var version = (Version?.Any() ?? false) ? string.Join(",", Version) : "";
            var engine_capacity = (EngineCapacity?.Any() ?? false) ? string.Join(",", EngineCapacity) : "";
            var vin = (Vin?.Any() ?? false) ? string.Join(",", Vin) : "";
            var engine_power = (EnginePower?.Any() ?? false) ? string.Join(",", EnginePower) : "";
            var gearbox = (Gearbox?.Any() ?? false) ? string.Join(",", Gearbox) : "";
            var transmission = (Transmission?.Any() ?? false) ? string.Join(",", Transmission) : "";
            var door_count = (DoorCount?.Any() ?? false) ? string.Join(",", DoorCount) : "";
            var nr_seats = (NrSeats?.Any() ?? false) ? string.Join(",", NrSeats) : "";
            var color = (Color?.Any() ?? false) ? string.Join(",", Color) : "";
            var registration = (Registration?.Any() ?? false) ? string.Join(",", Registration) : "";
            //var features = (Features?.Any() ?? false) ? string.Join(",", Features) : "";

            return string.Format("ID: " + AdId +
                "\nCena: " + PriceRaw +
                "\nTytul: " + Title +
                "\nOferta od: " + PrivateBusiness +
                "\nKategoria: " + Category +
                "\nWojewodztwo: " + Region +
                "\nMiasto: " + City +
                "\nMarka pojazdu: " + Make +
                "\nModel pojazdu: " + Model +
                "\nKod silnika: " + engine_code +
                "\nWersja: " + version +
                "\nRok produkcji: " + Year +
                "\nPrzebieg: " + Mileage +
                "\nPojemnosc skokowa: " + engine_capacity +
                "\nVin: " + vin +
                "\nRodzaj paliwa: " + FuelType +
                "\nMoc: " + engine_power +
                "\nSkrzynia biegow: " + gearbox +
                "\nNaped: " + transmission +                
                "\nTyp: " + BodyType +
                "\nLiczba drzwi: " + door_count +
                "\nLiczba miejsc: " + nr_seats +
                "\nKolor: " + color +
                "\nNumer rejestracyjny pojazdu: " + registration //+
                //"\nWyposazenie: " + features
            );
        }       
示例#9
0
 public void ReceiveFromHelmStation(FromHelmStation payload)
 {
     EnginePower.SetPowerLevel(payload.enginePower, payload.enginePendingPower);
     JumpPower.SetPowerLevel(payload.jumpPower, payload.jumpPendingPower);
     ThrusterPower.SetPowerLevel(payload.thrusterPower, payload.thrusterPendingPower);
     Crew.SetToNumber(payload.crew);
     Jump.SetLampColor(payload.jumpIsAvailable);
     Evac.SetLampColor(payload.crewIsEvac);
     Action1.interactable = payload.action1IsAvailable;
     Action2.interactable = payload.action2IsAvailable;
     Action3.interactable = payload.action3IsAvailable;
     Shields.SetShields(
         payload.maxShields,
         payload.foreShields,
         payload.aftShields,
         payload.portShields,
         payload.starShields
         );
     ReservePower.SetPowerLevel(payload.reserve, payload.maxReserve);
 }
示例#10
0
        private void ControlThrottle()
        {
            m_ThrottleChangeSpeed = (float)((HumanPower / (float)10.0)) * 300f;

            // override throttle if immobilized
            if (m_Immobilized)
            {
                ThrottleInput = -0.5f;
            }

            Debug.Log("Throttle Change Speed is " + m_ThrottleChangeSpeed.ToString());

            // Adjust throttle based on throttle input (or immobilized state)
            Throttle = Mathf.Clamp01(Throttle + ThrottleInput * Time.deltaTime * m_ThrottleChangeSpeed);

            Debug.Log("Throttle is " + Throttle.ToString());

            // current engine power is just:
            EnginePower = Throttle * m_MaxEnginePower;

            Debug.Log("Engine Power is " + EnginePower.ToString());
        }
示例#11
0
        public void Initialize()
        {
            _enginePowerService = Substitute.For <IEnginePowerService>();
            _mapper             = Substitute.For <IMapper>();
            _log = Substitute.For <ILogService>();

            _enginePower = new EnginePower
            {
                IDEnginePower = 1,
                Power         = 10
            };

            _enginePowerService.AllEnginePower()
            .Returns(Task.FromResult((IEnumerable <EnginePower>) new List <EnginePower>()
            {
                _enginePower
            })
                     );

            _enginePowerService.FindById(Arg.Is <int>(x => x == 1))
            .Returns(_enginePower);
        }
示例#12
0
 public void DeleteEnginePower(EnginePower enginePower)
 {
     _context.EnginePowers.Remove(enginePower);
 }
 public void UpdateEnginePower(EnginePower enginePower)
 {
     _enginePowerRepository.UpdateEnginePower(enginePower);
 }
 public void DeleteEnginePower(EnginePower enginePower)
 {
     _enginePowerRepository.DeleteEnginePower(enginePower);
 }
 public void AddEnginePower(EnginePower enginePower)
 {
     _enginePowerRepository.AddEnginePower(enginePower);
 }
示例#16
0
 public void AddEnginePower(EnginePower enginePower)
 {
     _context.EnginePowers.Add(enginePower);
 }
示例#17
0
 public void UpdateEnginePower(EnginePower enginePower)
 {
 }
示例#18
0
        public void ResetCarInfo()
        {
            textBoxGenBegin.Clear();
            textBoxGenEnd.Clear();


            comboBoxTransmission.Items.Clear();
            comboBoxTransmission.Items.AddRange(Strings.StrTransmission);

            EnginePower.Clear();

            textBoxMaxSpeed.Clear();
            textBoxTimeTo100.Clear();

            comboBoxBodyType.Items.Clear();
            comboBoxBodyType.Items.AddRange(Strings.StrBodyType);

            textBoxLength.Clear();

            textBoxWidth.Clear();
            textBoxHeight.Clear();
            textBoxMaxWeight.Clear();

            textBoxFullEquiepedWeight.Clear();
            textBoxAmountOfDoors.Clear();
            comboBoxFuelType.Items.Clear();
            comboBoxFuelType.Items.AddRange(Strings.StrFuelType);
            textBoxFuelPer100_Town.Clear();
            textBoxFuelPer100_Road.Clear();

            checkBoxABS.CheckState                  = CheckState.Unchecked;
            checkBoxESP.CheckState                  = CheckState.Unchecked;
            checkBoxAntiSlip.CheckState             = CheckState.Unchecked;
            checkBoxABS.CheckState                  = CheckState.Unchecked;
            checkBoxAirbagDriver.CheckState         = CheckState.Unchecked;
            checkBoxAirbagAheadPassenger.CheckState = CheckState.Unchecked;

            checkBoxCruiseControl.CheckState   = CheckState.Unchecked;
            checkBoxServoWheel.CheckState      = CheckState.Unchecked;
            checkBoxOnBoardComputer.CheckState = CheckState.Unchecked;
            checkBoxParkingSystem.CheckState   = CheckState.Unchecked;
            checkBoxTintedGlass.CheckState     = CheckState.Unchecked;
            comboBoxClimateControl.Items.Clear();
            comboBoxClimateControl.Items.AddRange(Strings.StrClimateControl);

            checkBoxAudioSystem.CheckState      = CheckState.Unchecked;
            checkBoxNavigationSystem.CheckState = CheckState.Unchecked;

            checkBoxRainSensors.CheckState          = CheckState.Unchecked;
            checkBoxLightSensors.CheckState         = CheckState.Unchecked;
            checkBoxXenonLights.CheckState          = CheckState.Unchecked;
            checkBoxMirrorHeating.CheckState        = CheckState.Unchecked;
            checkBoxLightsAutowashing.CheckState    = CheckState.Unchecked;
            checkBoxElectricMirrorTuning.CheckState = CheckState.Unchecked;

            checkBoxCentralLock.CheckState   = CheckState.Unchecked;
            checkBoxSignalisation.CheckState = CheckState.Unchecked;

            textBoxAmountOfSeats.Clear();

            comboBoxMaterial.Items.Clear();
            comboBoxMaterial.Items.AddRange(Strings.StrMaterial);
            checkBoxWheelHeating.CheckState = CheckState.Unchecked;
            checkBoxSeatHeating.CheckState  = CheckState.Unchecked;
            checkBoxSunroof.CheckState      = CheckState.Unchecked;

            comboBoxDriverSeatTuning.Items.Clear();
            comboBoxOtherSeatsTuning.Items.Clear();
            comboBoxDriverSeatTuning.Items.AddRange(Strings.StrSeatsTuning);
            comboBoxOtherSeatsTuning.Items.AddRange(Strings.StrSeatsTuning);
        }
 public MicrowaveFacade(Driver driver, EnginePower enginePower, Notification notification)
 {
     _driver       = driver;
     _enginePower  = enginePower;
     _notification = notification;
 }
示例#20
0
 public MainPage InputEnginePower(string power)
 {
     EnginePower.Click();
     EnginePower.SendKeys(power);
     return(this);
 }