/// <summary> /// Gets the participant id. It is used for operations onto participant profile (delete, edit, new). /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void lbId_TextChanged(object sender, TextChangedEventArgs e) { ParticipantsViewModel participant = (ParticipantsViewModel)this.DataContext; TextBox txt = (TextBox)sender; if (txt.Text != "") { participant.SessionId = Int32.Parse(txt.Text); } }
private void TabControl_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.Source is TabControl) { ApplicationViewModel app = (ApplicationViewModel)DataContext; if (TabItemConfiguration.IsSelected) { if (_configurationViewModel == null) { _configurationViewModel = new ConfigurationViewModel(app); } app.CurrentPageViewModel = _configurationViewModel; } else if (TabItemParticipants.IsSelected) { if (_participantsViewModel == null) { _participantsViewModel = new ParticipantsViewModel(app); } app.CurrentPageViewModel = _participantsViewModel; } else if (TabItemDoubleStance.IsSelected) { if (_doubleViewModel == null) { _doubleViewModel = new DoubleViewModel(app); } app.CurrentPageViewModel = _doubleViewModel; } else if (TabItemSingleStance.IsSelected) { } else if (TabItemTandemStance.IsSelected) { } } }