Exemplo n.º 1
0
        private void btnStart_Click(object sender, EventArgs e)
        {
            this.btnAdd.Enabled       = true;
            this.btnFinalize.Enabled  = true;
            this.rbAirco.Enabled      = true;
            this.rbSnowTires.Enabled  = true;
            this.rbPushBumper.Enabled = true;
            this.rbEntsys.Enabled     = true;
            this.rbPerform.Enabled    = true;
            this.rbNav.Enabled        = true;


            _myFordTaurus = new NonDecoratedFord();
            _counter      = 0;

            this.label1.Text = "Final Result: ";
            this.listBox1.Items.Clear();
        }
Exemplo n.º 2
0
 public SnowTires(IFordTaurus c)
 {
     base.FordTaurus = c;
 }
Exemplo n.º 3
0
 public Airco(IFordTaurus c)
 {
     base.FordTaurus = c;
 }
Exemplo n.º 4
0
 public EntertainmentPkg(IFordTaurus c)
 {
     base.FordTaurus = c;
 }
Exemplo n.º 5
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            IFordTaurus x;

            if (this.rbAirco.Checked)
            {
                x             = _myFordTaurus;
                _myLayer      = new Airco(x);
                _myFordTaurus = _myLayer;

                FillListbox(((Airco)_myLayer).GetLayerInfo());
                _counter++;
            }

            else if (this.rbSnowTires.Checked)
            {
                x             = _myFordTaurus;
                _myLayer      = new SnowTires(x);
                _myFordTaurus = _myLayer;

                FillListbox(((SnowTires)_myLayer).GetLayerInfo());
                _counter++;
            }

            else if (this.rbPushBumper.Checked)
            {
                x             = _myFordTaurus;
                _myLayer      = new PushBumper(x);
                _myFordTaurus = _myLayer;

                FillListbox(((PushBumper)_myLayer).GetLayerInfo());
                _counter++;
            }
            else if (this.rbEntsys.Checked)
            {
                x             = _myFordTaurus;
                _myLayer      = new EntertainmentPkg(x);
                _myFordTaurus = _myLayer;

                FillListbox(((EntertainmentPkg)_myLayer).GetLayerInfo());
                _counter++;
            }
            else if (this.rbPerform.Checked)
            {
                x             = _myFordTaurus;
                _myLayer      = new V8Performance(x);
                _myFordTaurus = _myLayer;

                FillListbox(((V8Performance)_myLayer).GetLayerInfo());
                _counter++;
            }
            else if (this.rbNav.Checked)
            {
                x             = _myFordTaurus;
                _myLayer      = new Navsystem(x);
                _myFordTaurus = _myLayer;

                FillListbox(((Navsystem)_myLayer).GetLayerInfo());
                _counter++;
            }
        }
Exemplo n.º 6
0
 public Navsystem(IFordTaurus c)
 {
     base.FordTaurus = c;
 }
Exemplo n.º 7
0
 public V8Performance(IFordTaurus c)
 {
     base.FordTaurus = c;
 }
Exemplo n.º 8
0
 public PushBumper(IFordTaurus c)
 {
     base.FordTaurus = c;
 }