Example #1
0
        public void Start()
        {
            _button   = _factory.CreateButton();
            _checkbox = _factory.CreateCheckbox();

            _button.Click();
            Console.ReadKey();
        }
Example #2
0
        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());
        }
Example #3
0
        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();
        }
Example #4
0
 public Application(IGUIFactory guiFactory)
 {
     button   = guiFactory.CreateButton();
     checkbox = guiFactory.CreateCheckbox();
 }
 public void CreateUI()
 {
     button   = factory.CreateButton();
     checkbox = factory.CreateCheckbox();
 }