Exemple #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.window = ((SnakeWPF.MainWindow)(target));

            #line 10 "..\..\MainWindow.xaml"
                this.window.ContentRendered += new System.EventHandler(this.Window_ContextRendered);

            #line default
            #line hidden

            #line 10 "..\..\MainWindow.xaml"
                this.window.KeyDown += new System.Windows.Input.KeyEventHandler(this.Window_KeyDown);

            #line default
            #line hidden

            #line 11 "..\..\MainWindow.xaml"
                this.window.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Window_MouseDown);

            #line default
            #line hidden
                return;

            case 2:
                this.pnlTItleBar = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.tbStatusScore = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 4:
                this.tbStatusSpeed = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 5:
                this.btnClose = ((System.Windows.Controls.Button)(target));

            #line 46 "..\..\MainWindow.xaml"
                this.btnClose.Click += new System.Windows.RoutedEventHandler(this.BtnClose_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.GameArea = ((System.Windows.Controls.Canvas)(target));
                return;

            case 7:
                this.bdrWelcomeMessage = ((System.Windows.Controls.Border)(target));
                return;

            case 8:
                this.btnShowHighscoreList = ((System.Windows.Controls.Button)(target));

            #line 55 "..\..\MainWindow.xaml"
                this.btnShowHighscoreList.Click += new System.Windows.RoutedEventHandler(this.BtnShowHighscoreList_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.bdrHighscoreList = ((System.Windows.Controls.Border)(target));
                return;

            case 10:
                this.bdrNewHighscore = ((System.Windows.Controls.Border)(target));
                return;

            case 11:
                this.txtPlayerName = ((System.Windows.Controls.TextBox)(target));
                return;

            case 12:
                this.btnAddToHighscoreList = ((System.Windows.Controls.Button)(target));

            #line 82 "..\..\MainWindow.xaml"
                this.btnAddToHighscoreList.Click += new System.Windows.RoutedEventHandler(this.BtnAddToHighscoreList_Click);

            #line default
            #line hidden
                return;

            case 13:
                this.bdrEndOfGame = ((System.Windows.Controls.Border)(target));
                return;

            case 14:
                this.tbFinalScore = ((System.Windows.Controls.TextBlock)(target));
                return;
            }
            this._contentLoaded = true;
        }
Exemple #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.window = ((SnakeWPF.MainWindow)(target));

            #line 12 "..\..\MainWindow.xaml"
                this.window.KeyDown += new System.Windows.Input.KeyEventHandler(this.GameField_KeyDown);

            #line default
            #line hidden
                return;

            case 2:
                this.GameGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.TimeValue = ((System.Windows.Controls.MenuItem)(target));
                return;

            case 4:
                this.ScoreValue = ((System.Windows.Controls.MenuItem)(target));
                return;

            case 5:
                this.GameField = ((System.Windows.Controls.Canvas)(target));

            #line 26 "..\..\MainWindow.xaml"
                this.GameField.KeyDown += new System.Windows.Input.KeyEventHandler(this.GameField_KeyDown);

            #line default
            #line hidden
                return;

            case 6:
                this.debug_snakeX = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.debug_snakeY = ((System.Windows.Controls.Label)(target));
                return;

            case 8:
                this.debug_snakePointsNum = ((System.Windows.Controls.Label)(target));
                return;

            case 9:
                this.debug_lastButton = ((System.Windows.Controls.Label)(target));
                return;

            case 10:
                this.MenuGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 11:
                this.languageList = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 12:
                this.MenuStatus = ((System.Windows.Controls.Label)(target));
                return;

            case 13:

            #line 68 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Menu_Play_Click);

            #line default
            #line hidden
                return;

            case 14:

            #line 72 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Menu_Exit_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }