/// <summary> /// Click event handler for the change user button /// </summary> /// <param name="sender">Sender object</param> /// <param name="e">Event object</param> private void ChangeUserBtn_Click(object sender, RoutedEventArgs e) { try { //Change to the UserInfo form UserInfoForm userInfoForm = new UserInfoForm(); App.Current.MainWindow = userInfoForm; this.Close(); userInfoForm.Show(); } catch (Exception ex) { HandleError(MethodInfo.GetCurrentMethod().DeclaringType.Name, MethodInfo.GetCurrentMethod().Name, ex.Message); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.PlayerDetails = ((CS3280A5.UserInfoForm)(target)); return; case 2: this.NameEntryBox = ((System.Windows.Controls.TextBox)(target)); return; case 3: this.NameEntryLabel = ((System.Windows.Controls.Label)(target)); return; case 4: this.AgeEntryLabel = ((System.Windows.Controls.Label)(target)); return; case 5: this.AgeEntryBox = ((System.Windows.Controls.TextBox)(target)); #line 17 "..\..\..\Forms\UserInfoForm.xaml" this.AgeEntryBox.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.AgeEntry_Changed); #line default #line hidden return; case 6: this.PlayerInfoBtn = ((System.Windows.Controls.Button)(target)); #line 19 "..\..\..\Forms\UserInfoForm.xaml" this.PlayerInfoBtn.Click += new System.Windows.RoutedEventHandler(this.PlayerInfoBtn_Click); #line default #line hidden return; case 7: this.AgeEntryErrLbl = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }