예제 #1
0
        private static void Main()
        {
            IocContainer.AddMapping <IManualPeerList, ManualPeerList>(true);
            IocContainer.AddMapping <IAquarium, Aquarium>();
            IocContainer.AddMapping <IAquariumStore, LocalAquariumStore>();
            IocContainer.AddMapping <IBehaviour, FishBehaviour>();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new AquariumForm());
        }
예제 #2
0
        private static void Main(string[] args)
        {
            var clp = new CommandLineParser(args);

            IocContainer.AddMapping <IAquarium, Aquarium>();
            IocContainer.AddMapping <IAquariumStore, LocalAquariumStore>();
            IocContainer.AddMapping <IBehaviour, FishBehaviour>();

            Trace.Listeners.Add(new ConsoleTraceListener());

            var a = new Aquarium(string.Empty, 50);

            a.Properties.Algae     = 0;
            a.Properties.Occupants = 0;

            while (Console.ReadKey().KeyChar != 'x')
            {
                Console.WriteLine("Sending fish.");
                a.SendFishAway_Test();
            }

            a.Shutdown();
        }