private void Page_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            const int BOARD_SIZE = 4;
            Grid grid = new Grid(BOARD_SIZE);
            gameManager = new GameManager(grid);
            this.DataContext = gameManager;
            GameBoardPanel.ItemsSource = gameManager.Board.TileCollection;

            System.Windows.Application.Current.MainWindow.KeyDown += new KeyEventHandler(Page_KeyUp);

            framesHandler = new GameSignNumPlayFramesHandler(this, GameBoardPanel);
            framesHandler.RegisterCallbackToSensor(KinectState.Instance.CurrentKinectSensor);
        }
Example #2
0
        private void Page_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            const int BOARD_SIZE = 4;
            Grid      grid       = new Grid(BOARD_SIZE);

            gameManager                = new GameManager(grid);
            this.DataContext           = gameManager;
            GameBoardPanel.ItemsSource = gameManager.Board.TileCollection;

            System.Windows.Application.Current.MainWindow.KeyDown += new KeyEventHandler(Page_KeyUp);

            framesHandler = new GameSignNumPlayFramesHandler(this, GameBoardPanel);
            framesHandler.RegisterCallbackToSensor(KinectState.Instance.CurrentKinectSensor);
        }