/// <summary> /// This function adds a new trainee when we press on the button "Add Trainee" /// This is a sighnup function for a click event /// </summary> /// <param name="sender">Who is sensing the event</param> /// <param name="e">Details of the event occurred</param> private void TraineeAddButton_Click(object sender, RoutedEventArgs e) { AddTrainee addTraineeWind = new AddTrainee(); addTraineeWind.ShowDialog(); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.buttons = ((System.Windows.Controls.Grid)(target)); return; case 2: #line 21 "..\..\CreatNewTraineeUser.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 3: #line 22 "..\..\CreatNewTraineeUser.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_2); #line default #line hidden return; case 4: this.createTrainee = ((System.Windows.Controls.Grid)(target)); return; case 5: this.addTraineeUsercontol = ((PLWPF.AddTrainee)(target)); return; case 6: this.create1 = ((System.Windows.Controls.Grid)(target)); return; case 7: this.inputId = ((System.Windows.Controls.ComboBox)(target)); return; case 8: this.inputUsername = ((System.Windows.Controls.TextBox)(target)); return; case 9: this.inputPassword = ((PLWPF.myPasswordBox)(target)); return; case 10: this.mail = ((System.Windows.Controls.TextBox)(target)); #line 52 "..\..\CreatNewTraineeUser.xaml" this.mail.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.mail_TextChanged); #line default #line hidden return; case 11: this.messageError = ((System.Windows.Controls.Label)(target)); return; case 12: this.createUser = ((System.Windows.Controls.Button)(target)); #line 56 "..\..\CreatNewTraineeUser.xaml" this.createUser.Click += new System.Windows.RoutedEventHandler(this.Button_Click_1); #line default #line hidden return; } this._contentLoaded = true; }
private void button_Click(object sender, RoutedEventArgs e) { var window = new AddTrainee(); window.ShowDialog(); }