Exemplo n.º 1
0
 public FirstCar(string carBrand, Options.Color carColor, Options.Engine carEngine)
     : base(carBrand, carColor, carEngine)
 {
     base.brand  = carBrand;
     base.color  = carColor;
     base.engine = carEngine;
 }
Exemplo n.º 2
0
 /// <summary>
 /// General car model constructor
 /// </summary>
 /// <param name="brand">Brand of the car</param>
 /// <param name="color">Color of the car</param>
 /// <param name="engine">Engine of the car</param>
 /// <param name="price">Price of the car</param>
 public MercedesCar(string brand, Options.Color color, Options.Engine engine, int price)
 {
     this.brand  = "Mercedes";
     this.color  = color;
     this.engine = engine;
     this.price  = price;
 }
Exemplo n.º 3
0
 public ThirdCar(string carBrand, Options.Color carColor, Options.Engine carEngine, int price)
     : base(carBrand, carColor, carEngine, price)
 {
     base.brand  = carBrand;
     base.color  = carColor;
     base.engine = carEngine;
     base.price  = price;
 }
Exemplo n.º 4
0
 private void engineChanged(object sender, SelectionChangedEventArgs e)
 {
     if (this.engineComboBox.SelectedIndex == 1)
     {
         this.price.Content = "1 290 000 $";
         engine             = Options.Engine.Entended1;
     }
     else if (this.engineComboBox.SelectedIndex == 2)
     {
         this.price.Content = "1 550 000 $";
         engine             = Options.Engine.Extended2;
     }
     else if (this.engineComboBox.SelectedIndex == 0)
     {
         this.price.Content = "900 000 $";
         engine             = Options.Engine.Default;
     }
 }
Exemplo n.º 5
0
 public ThirdCar(string brand, Options.Color color, Options.Engine engine, string name, int price)
     : base(brand, color, engine, price)
 {
     this.name = "CLA Coupe";
 }
Exemplo n.º 6
0
 public FirstCar(string brand, Options.Color color, Options.Engine engine, string name)
     : base(brand, color, engine)
 {
     this.name = "AMG A45";
 }
Exemplo n.º 7
0
 public SecondCar(string brand, Options.Color color, Options.Engine engine, string name, int price)
     : base(brand, color, engine, price)
 {
     this.name = "AMG GT";
 }