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(); }
private void ProduceTablet(AbstractFactory tabletfactory) { formtablet = new FormTablet(tabletfactory.createTablet()); formtablet.Text = tabletfactory.createTablet().GetType().Name; }