public Floor() { ButtonFactory factory = new ButtonFactory(); UpButton = factory.GetButton(Direction.Up); DownButton = factory.GetButton(Direction.Down); }
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); }