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()); } }
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(); }