Пример #1
0
        public static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            EventBroker eventBroker = new EventBroker();

            // add log extension to the event broker to get log messages
            eventBroker.AddExtension(new DebugLogger());

            Pong oponent = new Pong();
            Ping form = new Ping();

            eventBroker.Register(oponent);
            eventBroker.Register(form);

            Application.Run(form);
        }
Пример #2
0
        public static void Main()
        {
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            EventBroker eventBroker = new EventBroker();

            // add log extension to the event broker to get log messages
            eventBroker.AddExtension(new DebugLogger());

            Pong oponent = new Pong();
            Ping form    = new Ping();

            eventBroker.Register(oponent);
            eventBroker.Register(form);

            Application.Run(form);
        }