private void Button_Click(object sender, RoutedEventArgs e) { Window w = new Tetris.MainWindow(); this.Close(); w.Show(); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.MainWindow1 = ((Tetris.MainWindow)(target)); return; case 2: this.NewGameButton = ((System.Windows.Controls.Button)(target)); #line 9 "..\..\MainWindow.xaml" this.NewGameButton.Click += new System.Windows.RoutedEventHandler(this.NewGameButton_Click); #line default #line hidden return; case 3: this.ExitButton = ((System.Windows.Controls.Button)(target)); #line 10 "..\..\MainWindow.xaml" this.ExitButton.Click += new System.Windows.RoutedEventHandler(this.ExitButton_Click); #line default #line hidden return; case 4: this.CustomButton = ((System.Windows.Controls.Button)(target)); #line 11 "..\..\MainWindow.xaml" this.CustomButton.Click += new System.Windows.RoutedEventHandler(this.CustomButton_Click); #line default #line hidden return; case 5: this.RecordsButton = ((System.Windows.Controls.Button)(target)); #line 12 "..\..\MainWindow.xaml" this.RecordsButton.Click += new System.Windows.RoutedEventHandler(this.RecordsButton_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.window = ((Tetris.MainWindow)(target)); #line 4 "..\..\..\MainWindow.xaml" this.window.Loaded += new System.Windows.RoutedEventHandler(this.window_Loaded); #line default #line hidden #line 4 "..\..\..\MainWindow.xaml" this.window.KeyDown += new System.Windows.Input.KeyEventHandler(this.window_KeyDown); #line default #line hidden return; case 2: this.Grid2 = ((System.Windows.Controls.Grid)(target)); return; case 3: this.label1 = ((System.Windows.Controls.Label)(target)); return; case 4: this.image1 = ((System.Windows.Controls.Image)(target)); return; case 5: this.label2 = ((System.Windows.Controls.Label)(target)); return; case 6: this.label3 = ((System.Windows.Controls.Label)(target)); return; case 7: this.label2_Copy = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Window = ((Tetris.MainWindow)(target)); #line 8 "..\..\MainWindow.xaml" this.Window.KeyDown += new System.Windows.Input.KeyEventHandler(this.Window_KeyDown); #line default #line hidden return; case 2: this.LayoutRoot = ((System.Windows.Controls.Grid)(target)); return; case 3: this.gameGrid = ((System.Windows.Controls.Grid)(target)); return; case 4: this.Scoring_Board = ((System.Windows.Controls.Label)(target)); return; case 5: this.PreviewImage = ((System.Windows.Controls.Image)(target)); return; case 6: #line 28 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.StartBtn_Click); #line default #line hidden return; case 7: #line 31 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.PauseBtn_Click); #line default #line hidden return; case 8: #line 34 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.StopBtn_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.TetrisWindow = ((Tetris.MainWindow)(target)); #line 4 "..\..\..\Graphical Interface\MainWindow.xaml" this.TetrisWindow.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Window_MouseLeftButtonDown); #line default #line hidden return; case 2: this.MainGamePanel = ((System.Windows.Controls.StackPanel)(target)); return; case 3: #line 16 "..\..\..\Graphical Interface\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.NewGame_Click); #line default #line hidden return; case 4: #line 17 "..\..\..\Graphical Interface\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Exit_Click); #line default #line hidden return; } this._contentLoaded = true; }