Example #1
0
        public PageHandler(string gatewayServerAddress)
        {
            shuffUIManager = new ShuffUIManager();

            gameDrawer = new GameDrawer();
            TimeTracker = new TimeTracker();

            var gateway = new Gateway(gatewayServerAddress,false);
            ClientGameManager = new ClientGameManager(gateway);
            ClientSiteManager = new ClientSiteManager(gateway);
            ClientDebugManager = new ClientDebugManager(gateway);
            ClientChatManager = new ClientChatManager(gateway);

            ClientInfo = new ClientInformation();
            this.GameManager = new GameManager(this);

            LoginUI = new LoginUI(shuffUIManager, this);
            HomeUI = new HomeUI(shuffUIManager, this);
            QuestionUI = new QuestionUI(shuffUIManager, this);

            /*gateway.On("Area.Lobby.ListCardGames.Response", (data) => { });
            gateway.On("Area.Lobby.ListRooms.Response", (data) => { Logger.Log });*/

            //ie8
            /*   {
                   dynamic d2 = (Action<string, ElementEventHandler>)Document.Body.AttachEvent;

                   var m = (Action<string, ElementEventHandler>)d2;
                   m("contextmenu", () =>
                       {

                       });
               }*/
        }