Exemplo n.º 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            car Car = new car();

            Car.color        = "Blue";
            Car.speed        = 180;
            Car.motor        = 1201.32;
            Car.price        = 20000;
            Car.usagestatus  = 's';
            Car.YEAR         = -2017;
            Car.BRAND        = "fuji";
            Car.control      = 2018;
            Car.licencePlate = "34 KI 2099";
            Car.owner        = "Afife Jale";

            label1.Text           = Car.color;
            label2.Text           = Car.speed.ToString();
            label3.Text           = Car.motor.ToString();
            label4.Text           = Car.price.ToString();
            label5.Text           = Car.usagestatus.ToString();
            label6.Text           = Car.YEAR.ToString();
            label7.Text           = Car.BRAND;
            pictureBox1.BackColor = Color.CadetBlue;
            label8.Text           = Car.control.ToString();
            label9.Text           = Car.licencePlate;
            label10.Text          = Car.owner;
        }
Exemplo n.º 2
0
        private void Form2_Load(object sender, EventArgs e)
        {
            car Car2 = new car();

            Car2.color            = "Red";
            Car2.speed            = 240;
            Car2.motor            = 2901.12;
            Car2.price            = 120000;
            Car2.usagestatus      = 'n';
            label1.Text           = Car2.color;
            label2.Text           = Car2.speed.ToString();
            label3.Text           = Car2.motor.ToString();
            label4.Text           = Car2.price.ToString();
            label5.Text           = Car2.usagestatus.ToString();
            pictureBox1.BackColor = Color.IndianRed;
        }