Exemplo n.º 1
0
        public void Macosx_Uretimi()
        {
            ToolFactory factory = new MacosxFactory();

            IDialog dialog = factory.CreateDialog();

            dialog.GetDialog();

            IToolbar toolbar = factory.CreateToolbar();

            toolbar.GetToolbar();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            "Merhaba Dünya!".WriteToConsole();
            "Abstract Factory Pattern Örneği\n".WriteToConsole();

            bool isMacosx = false;

            ToolFactory factory = isMacosx ?
                                  factory = new MacosxFactory()
                    : factory             = new WindowsFactory();

            IDialog dialog = factory.CreateDialog();

            dialog.GetDialog().WriteToConsole();

            IToolbar toolbar = factory.CreateToolbar();

            toolbar.GetToolbar().WriteToConsole();

            "\nDevam etmek için enter e basınız".WriteToConsole();
            System.Console.ReadLine();
        }