Esempio n. 1
0
        private void printSpecsBtn_Click(object sender, EventArgs e)
        {
            if(businessRbtn.Checked)
            {
                newMachine = new BusinessComputerFactory();
            }
            else if(MultiRbtn.Checked)
            {
                newMachine = new MultimediaComputerFactory();
            }
            else if(gmaeRbtn.Checked)
            {
                newMachine = new GamingComputerFactory();
            }
            else
            {
                newMachine = new LaptopFactory();
            }

            SpecPrinter currSpecPrinter = new SpecPrinter(newMachine, displaySpecBox);
            currSpecPrinter.printSpec();
        }
Esempio n. 2
0
        private void printSpecsBtn_Click(object sender, EventArgs e)
        {
            if (businessRbtn.Checked)
            {
                newMachine = new BusinessComputerFactory();
            }
            else if (MultiRbtn.Checked)
            {
                newMachine = new MultimediaComputerFactory();
            }
            else if (gmaeRbtn.Checked)
            {
                newMachine = new GamingComputerFactory();
            }
            else
            {
                newMachine = new LaptopFactory();
            }

            SpecPrinter currSpecPrinter = new SpecPrinter(newMachine, displaySpecBox);

            currSpecPrinter.printSpec();
        }