public void Start() { _button = _factory.CreateButton(); _checkbox = _factory.CreateCheckbox(); _button.Click(); Console.ReadKey(); }
public void ClientMethod(IGUIFactory factory) { var productA = factory.CreateButton(); var productB = factory.CreateCheckbox(); var productC = factory.CreateRadioButton(); Console.WriteLine(productB.UsefulFunctionB()); Console.WriteLine(productB.AnotherUsefulFunctionB(productA)); Console.WriteLine(productC.UsefulFunctionC()); }
public void ClientMethod(IGUIFactory factory) { var productA = factory.CreateButton(); var productB = factory.CreateCheckbox(); Console.WriteLine(productA.UsarButton()); Console.WriteLine(productB.UsarCheckBox()); Console.WriteLine(); Console.ReadLine(); }
public Application(IGUIFactory guiFactory) { button = guiFactory.CreateButton(); checkbox = guiFactory.CreateCheckbox(); }
public void CreateUI() { button = factory.CreateButton(); checkbox = factory.CreateCheckbox(); }