Example #1
0
        public Floor()
        {
            ButtonFactory factory = new ButtonFactory();

            UpButton   = factory.GetButton(Direction.Up);
            DownButton = factory.GetButton(Direction.Down);
        }
Example #2
0
        internal static IControl GetUIElement(int uiElementType, int objectType)
        {
            IControl objUIElement;

            switch (uiElementType)
            {
            case 1:
                objUIElement = ButtonFactory.GetButton(objectType);
                break;

            case 2:
                objUIElement = TextBoxFactory.GetTextBox(objectType);
                break;

            default:
                objUIElement = null;
                break;
            }

            return(objUIElement);
        }