void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Registracion = ((Ejercicio7.RegistrarWindow)(target)); return; case 2: this.TituloTemporadaTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 3: this.NumTemporadaTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 4: this.NumJornadaTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 5: this.NumJornadaComboBox = ((System.Windows.Controls.ComboBox)(target)); #line 26 "..\..\RegistrarWindow.xaml" this.NumJornadaComboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.NumJornadaComboBox_SelectionChanged); #line default #line hidden return; case 6: this.consultarTemporadaEquiposTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 7: this.DatosDataGrid = ((System.Windows.Controls.DataGrid)(target)); return; case 8: this.VerButton = ((System.Windows.Controls.Button)(target)); #line 38 "..\..\RegistrarWindow.xaml" this.VerButton.Click += new System.Windows.RoutedEventHandler(this.VerButton_Click); #line default #line hidden return; case 9: this.AnadirButton = ((System.Windows.Controls.Button)(target)); #line 39 "..\..\RegistrarWindow.xaml" this.AnadirButton.Click += new System.Windows.RoutedEventHandler(this.AnadirButton_Click); #line default #line hidden return; } this._contentLoaded = true; }
private void registrarButton_Click(object sender, RoutedEventArgs e) { if (TemporadaAnoTextBox.Text != "") { ano = TemporadaAnoTextBox.Text; RegistrarWindow registrarWindow = new RegistrarWindow(ano); registrarWindow.Show(); } else { MessageBox.Show("Debes introducir el año de la temporada", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } }