예제 #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Window = ((SnakeGame.MainWindow)(target));

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

            #line default
            #line hidden

            #line 10 "..\..\..\MainWindow.xaml"
                this.Window.KeyUp += new System.Windows.Input.KeyEventHandler(this.Window_KeyUp);

            #line default
            #line hidden

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

            #line default
            #line hidden
                return;

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

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

            case 4:
                this.TextBlockSpeedValue = ((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_OnClick);

            #line default
            #line hidden
                return;

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

            case 7:
                this.BorderWelcomeMessage = ((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.BorderHighScoreList = ((System.Windows.Controls.Border)(target));
                return;

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

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

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

            #line 87 "..\..\..\MainWindow.xaml"
                this.BtnAddToHighScoreList.Click += new System.Windows.RoutedEventHandler(this.BtnAddToHighScoreList_Click);

            #line default
            #line hidden
                return;

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

            case 14:
                this.TextBlockFinalScore = ((System.Windows.Controls.TextBlock)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #2
0
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     MainWindow wnd = new MainWindow();
     wnd.WindowState = WindowState.Maximized;
     wnd.Show();
 }