Пример #1
0
        private void btnDisplaySpec_Click(object sender, EventArgs e)
        {
            if (rbGaming.Checked)
                componentsFactory = new GamingFactory();
            else if (rbBusiness.Checked)
                componentsFactory = new BusinessFactory();
            else if (rbMultimedia.Checked)
                componentsFactory = new MultimediaFactory();

            MachineSpecPrinter currentSpec = new MachineSpecPrinter(componentsFactory, rtbDisplay);
            currentSpec.print();
        }
Пример #2
0
        private void btnDisplaySpec_Click(object sender, EventArgs e)
        {
            if (rbGaming.Checked)
            {
                componentsFactory = new GamingFactory();
            }
            else if (rbBusiness.Checked)
            {
                componentsFactory = new BusinessFactory();
            }
            else if (rbMultimedia.Checked)
            {
                componentsFactory = new MultimediaFactory();
            }

            MachineSpecPrinter currentSpec = new MachineSpecPrinter(componentsFactory, rtbDisplay);

            currentSpec.print();
        }