예제 #1
0
    public List <VideoData> GetVideoList(CarType carType)
    {
        List <VideoData> videoDatas;

        if (gameConfig.video.ContainsKey(carType.ToString().ToUpper()))
        {
            videoDatas = gameConfig.video[carType.ToString().ToUpper()];
        }
        else
        {
            videoDatas = new List <VideoData>();
        }
        return(videoDatas);
    }
예제 #2
0
        public void EnumExercise()
        {
            CarType myCarType = CarType.Toyota;

            Console.WriteLine(myCarType + " " + myCarType.ToString());
            Console.ReadLine();
        }
예제 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Car" /> class.
        /// </summary>
        /// <param name="transform">The transform.</param>
        /// <param name="id">The identifier.</param>
        /// <param name="carType">Type of the car.</param>
        public Car(Transform transform, int id, CarType carType)
            : base(transform, id, carType.ToString())
        {
            this.Type = carType;

            ServerHandler.SendMessage(this.ToJSon());
        }
예제 #4
0
 public override string ToString()
 {
     return("CarBrand: " + CarBrand +
            " CarType: " + CarType.ToString() +
            " Color: " + Color +
            " VIN: " + VIN +
            " LicensePlate: " + LicensePlate + "\n");
 }
예제 #5
0
        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        public override string ToString()
        {
            return(
                "Tester's name: " + FirstName + " " + LastName + "\n" +
                "Gender: " + Gender.ToString() + "\n" +
                "Tester's ID: " + ID.ToString() + "\n" +
                "Seniority: " + Seniority.ToString() + " years\n" +
                "Vehicle type: " + CarType.ToString() + "\n" +
                "Address: " + Address.ToString() + "\n" +
                "Phone: " + Phone);
        }
 public override string ToString()
 {
     return(
         "Trainee's name: " + FirstName + " " + LastName + "\n" +
         "Gender: " + Gender.ToString() + "\n" +
         "Trainee's ID: " + ID.ToString() + "\n" +
         "Vehicle type: " + CarType.ToString() + "\n" +
         "Transmission type: " + GearBoxType.ToString() + "\n" +
         "Number of lessons taken: " + NumberOfLessons.ToString() + "\n" +
         "Address: " + Address.ToString() + "\n" +
         "Phone: " + Phone);
 }
        public static int Main(string[] args)
        {
            // Begin by making a car.
            CoCarClass viper = new CoCarClass();

            // Rig into event.
            viper.Exploded += new _ICarEvents_ExplodedEventHandler(ExplodedHandler);

            // Set (and get) the driver name.
            viper.DriverName = "Fred";
            Console.WriteLine("Driver is named: (COM property)\n->" +
                              viper.DriverName + "\n");

            // List type of car.
            CarType t = viper.GetCarType();

            Console.WriteLine("Car type is: (COM enum)\n->"
                              + t.ToString() + "\n");

            // Get engine & cylinders.
            IEngine e = viper.GetEngine();
            object  o = e.GetCylinders();

            // Get array of strings.
            String[] cylinders = (string[])o;
            Console.WriteLine("o is really this type: " + o);

            // Print each item.
            Console.WriteLine("Your cylinders are: (COM SAFEARRAY and contained coclass) ");
            foreach (string s in cylinders)
            {
                Console.WriteLine("->" + s);
            }
            Console.WriteLine();

            // Now speed up the car a bunch and get event.
            for (int i = 0; i < 5; i++)
            {
                try
                {
                    viper.SpeedUp(50);
                    Console.WriteLine("->Curr speed is: "
                                      + viper.GetCurSpeed());
                }
                catch (Exception ex)
                {
                    Console.WriteLine("->COM error! " + ex.Message + "\n");
                }
            }

            return(0);
        }
예제 #8
0
        public async Task <HomeSearchServiceModel> GetSearchModelAsync(IQueryable <BaseCar> cars, CarType carType)
        {
            var filterTypeServiceModels = await this.carInventoriesService.GetInventoryFilterModelsAsync(cars);

            var carsOfType           = cars.Where(c => c.GetType().Name == carType.ToString());
            var carYearServiceModels = await this.carYearService.GetYearFilterModelsAsync(carsOfType);

            var carModelServiceModels = await this.carModelTypeService.GetModelTypeFilterModelsAsync(carsOfType);

            var carPriceServiceModels = await this.carPriceService.GetPriceFilterModelsAsync(carsOfType);

            var model = new HomeSearchServiceModel()
            {
                CarTypes    = filterTypeServiceModels,
                Years       = carYearServiceModels,
                ModelTypes  = carModelServiceModels,
                PriceRanges = carPriceServiceModels
            };

            return(model);
        }
예제 #9
0
 public override string ToString()
 {
     return(String.Format($"Type: {CarType.ToString()}\tId: {Id}\tBalance:{Balance}"));
 }
예제 #10
0
파일: Car.cs 프로젝트: fdagher/MyProjects
 public override string ToString()
 {
     //return "Make: " + Make.ToString() + ". Model: " + Model + ". Transmission: " + Transmission + ". Engine: " + Engine + ". Body: " + Body.ToString() + ". Price: " + Price + ". Kilometers: " + KilometersDriven;
     return("<tr><td>" + Make.ToString() + "</td><td>" + Model + "</td><td>" + Transmission + "</td><td>" + Engine + "</td><td>" + Body.ToString() + "</td><td>" + string.Format("{0:n0}", Price) + "</td><td>" + string.Format("{0:n0}", KilometersDriven) + "</td><td>" + string.Format("{0:n0}", RegistrationNumber) + "</td><td><a target='_blank' href='" + URL + "'>Details...</a></td>");
 }
예제 #11
0
 public override string ToString()
 {
     return("CarModel - " + CarType.ToString() + "  located in " + Location.ToString());
 }
예제 #12
0
    /// <summary>
    ///		Upgrade Player's Data
    /// </summary>
    /// <param name="Config"></param>
    /// <param name="Type"></param>
    public void ApplyUpgrade(PlayerConfig Config, CarType Type)
    {
        var data = Config.ListTypeUpgrade.Find(element => element.MyType.ToString() == Type.ToString());

        if (data != null)
        {
            var upgrades = data.ListUpgrade;
            int index;
            for (int i = 0; i < upgrades.Count; i++)
            {
                index = upgrades[i].CurrentIndexValue;
                if (index == 0)
                {
                    continue;
                }
                --index;
                if (upgrades[i].NameAbility == "HP")
                {
                    CarData.HP += (int)(upgrades[i].Values[index].Value);
                }
                else if (upgrades[i].NameAbility == "Speed")
                {
                    CarData.Speed += (int)(upgrades[i].Values[index].Value);
                }
                else if (upgrades[i].NameAbility == "Control")
                {
                    CurveControl = CarData.CurveControl[index + 1];
                }
                else if (upgrades[i].NameAbility == "Ultime")
                {
                    UltimeEnable = true;
                }
            }
        }
        data = Config.ListTypeUpgrade.Find(element => element.MyType.ToString() == "Ghost");
        if (data != null)
        {
            var upgrades = data.ListUpgrade;
            int index;
            for (int i = 0; i < upgrades.Count; i++)
            {
                index = upgrades[i].CurrentIndexValue;
                if (index == 0)
                {
                    continue;
                }
                --index;
                if (upgrades[i].NameAbility == "BegPowerCharge")
                {
                    BegPowerCharge += (upgrades[i].Values[index].Value);
                }
                else if (upgrades[i].NameAbility == "Explo")
                {
                    ExploEnable = true;
                }
            }
        }
    }
예제 #13
0
 public Car(CarType type, CarColor color)
 {
     this.TypeOfCar  = type.ToString();
     this.ColorOfCar = color.ToString();
 }
예제 #14
0
 public override string ToString()
 {
     return($"CarModel - {CarType.ToString()} located in {Location.ToString()}");
 }
예제 #15
0
 public static GameObject LoadCar(CarType CarType)
 {
     return(UnityEngine.GameObject.Instantiate(Resources.Load(Cars + "/" + CarType.ToString())) as GameObject);
 }