Exemple #1
0
        public WidgetClient(WidgetCreatorName widgetCreaterName)
        {
            AbstractFactoryAgent objAbstractFactoryAgent = new AbstractFactoryAgent(widgetCreaterName);

            widgetFactoryObj = objAbstractFactoryAgent.GetFactoryObject();
            Window           = widgetFactoryObj.CreateWindow();
            Scrollbar        = widgetFactoryObj.CreateScrollBar();
            Toolbar          = widgetFactoryObj.CreateToolBar();
            Button           = widgetFactoryObj.CreateButtons();
        }
Exemple #2
0
 public Widget(IWidgetFactory widgetFactory)
 {
     _button    = widgetFactory.CreateButton();
     _scrollBar = widgetFactory.CreateScrollBar();
 }