Exemplo n.º 1
0
        public static IWizardForm CreateWizard()
        {
            switch (WizStyle)
            {
            case WizardStyle.Aero:
                return(new W3b.Wizards.WindowsForms.Aero.AeroWizardForm());

            case WizardStyle.Wizard97:
                return(new W3b.Wizards.WindowsForms.Wizard97.Wizard97WizardForm());

            case WizardStyle.PlatformDefault:
            default:
                return(WizardFactory.Create());
            }
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            ICharacterFactory factory;

            Character character;

            //// Create archer
            factory   = new ArcherFactory();
            character = factory.Create();

            //// Create warrior
            factory   = new WarriorFactory();
            character = factory.Create();

            //// Create wizard
            factory   = new WizardFactory();
            character = factory.Create();
        }