private static void print(EOsType type) { IGuiFactory factory = null; switch (type) { case EOsType.Window: factory = new WindowGuiFactory(); break; case EOsType.Mac: factory = new MacGuiFactory(); break; } IButton button = factory.createButton(); IText text = factory.createText(); button.click_Button(); text.text_Description(); }
private static void print(EOsType type) { IButton button = null; IText text = null; switch (type) { case EOsType.Window: button = new WindowButton(); text = new WindowText(); break; case EOsType.Mac: button = new MacButton(); text = new MacText(); break; } button.click_Button(); text.text_Description(); }