Пример #1
0
        public FactoryForm()
        {
            InitializeComponent();
            phone   = 0;
            tablet  = 0;
            phablet = 0;

            //create forms
            formphone   = new FormPhone();
            formtablet  = new FormTablet();
            formphablet = new FormPhablet();

            //create factories
            samsung = new SamsungFactory();
            apple   = new AppleFactory();
            nokia   = new NokiaFactory();
        }
Пример #2
0
 private void ProducePhablet(AbstractFactory phabletfactory)
 {
     formphablet      = new FormPhablet(phabletfactory.createPhablet());
     formphablet.Text = phabletfactory.createPhablet().GetType().Name;
 }