public BoardViewer() { InitializeComponent(); squareViewers = new BoardSquareViewer[Board.Size][]; for (int row = 0; row < Board.Size; ++row) { squareViewers[row] = new BoardSquareViewer[Board.Size]; for (int column = 0; column < Board.Size; ++column) { var viewer = new BoardSquareViewer(); Grid.SetRow(viewer, 2 * row); Grid.SetColumn(viewer, 2 * column); squareViewers[row][column] = viewer; } } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 6 "..\..\MainWindow.xaml" ((Microsoft.Samples.Kinect.TicTacToe.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.WindowLoaded); #line default #line hidden #line 6 "..\..\MainWindow.xaml" ((Microsoft.Samples.Kinect.TicTacToe.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.WindowClosing); #line default #line hidden return; case 2: this.layoutGrid = ((System.Windows.Controls.Grid)(target)); return; case 3: this.NoRulesText = ((System.Windows.Controls.TextBlock)(target)); return; case 4: this.SensorChooserUI = ((Microsoft.Kinect.Toolkit.KinectSensorChooserUI)(target)); return; case 5: this.WelcomePanel = ((System.Windows.Controls.Grid)(target)); return; case 6: this.WelcomeTextX = ((Microsoft.Samples.Kinect.TicTacToe.BoardSquareViewer)(target)); return; case 7: this.WelcomeTextO = ((Microsoft.Samples.Kinect.TicTacToe.BoardSquareViewer)(target)); return; case 8: this.WelcomeBoard = ((Microsoft.Samples.Kinect.TicTacToe.BoardViewer)(target)); return; case 9: this.WelcomeStartButton = ((System.Windows.Controls.Button)(target)); #line 106 "..\..\MainWindow.xaml" this.WelcomeStartButton.Click += new System.Windows.RoutedEventHandler(this.WelcomeStartButtonClicked); #line default #line hidden return; case 10: this.GamePanel = ((System.Windows.Controls.Grid)(target)); return; case 11: this.GameBoard = ((Microsoft.Samples.Kinect.TicTacToe.BoardViewer)(target)); return; case 12: this.Image = ((System.Windows.Controls.Image)(target)); return; case 13: this.XViewer = ((Microsoft.Samples.Kinect.TicTacToe.PlayerViewer)(target)); return; case 14: this.OViewer = ((Microsoft.Samples.Kinect.TicTacToe.PlayerViewer)(target)); return; case 15: this.StatusText = ((System.Windows.Controls.TextBlock)(target)); return; case 16: this.RematchButton = ((System.Windows.Controls.Button)(target)); #line 127 "..\..\MainWindow.xaml" this.RematchButton.Click += new System.Windows.RoutedEventHandler(this.RematchButtonClicked); #line default #line hidden return; } this._contentLoaded = true; }