public OpretMonumentViewModel()
 {
     MonumentSingleton   = MonumentSingleton.Instance;
     MonumentHandler     = new MonumentHandler();
     NytMonumentOversigt = new MonumentOversigt();
     CreateCommand       = new RelayCommand(OpretMonument);
 }
Ejemplo n.º 2
0
        static void Main()
        {
            // Pizza
            Console.WriteLine("Yankees fan orders:");
            var yankees = new NyPizzaFactory();

            yankees.Order("Cheese");
            Console.WriteLine();
            Console.WriteLine("Cubs fan orders:");
            var cubs = new ChicagoPizzaFactory();

            cubs.Order("Clam");
            Console.WriteLine();
            //Monument
            MonumentHandler greekMonumentHandler =
                new MonumentHandler(new GreekMonumentFactory(), "Athena", "Pericles");

            greekMonumentHandler.IssueMessages();
            // The Olympian deity Athena demands tribute!
            // The noble Greek leader Pericles requests submission of taxes!

            MonumentHandler egyptianMonumentHandler =
                new MonumentHandler(new EgyptianMonumentFactory(), "Sekhmet", "Hatchepsut");

            egyptianMonumentHandler.IssueMessages();
            // Now accepting offerings to the Egyptian deity Sekhmet!
            // The mighty Egyptian pharaoh Hatchepsut demands payment of taxes!
        }