/// <summary> /// Called when a participant property is changed. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void OnParticipantPropertyChanged(object sender, ParticipantPropertyChangedEventArgs e) { if (e.Property == ParticipantProperty.IsPresenter) { //Enable or disable the Start Sharing Resource button according to the participant role // this.Invoke(new EnableDisableButtonDelegate(EnableDisableButton), new object[] { StartSharingResource_Button, (Boolean)e.Value }); } }
void SelfParticipant_PropertyChanged(object sender, ParticipantPropertyChangedEventArgs e) { this.Dispatcher.Invoke(new Action(() => { IsInLobby = (bool)SelfParticipant.Properties[ParticipantProperty.IsInLobby]; SelfParticipantStatus.Text = "In Lobby: " + IsInLobby.ToString(); }), null); }
private void OnPropertyChanged(object sender, ParticipantPropertyChangedEventArgs e) { _log.Debug("OnPropertyChanged DisplayName:{2} Type:{0} Value:{1}", e.Property, e.Value, DisplayName); if (e.Property == ParticipantProperty.IsPresenter) { IsPresenter = (bool)e.Value; } }
/// <summary> /// Participant Property Changed Event. We want to know when the PinnedState is changed /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void participant_PropertyChanged(object sender, ParticipantPropertyChangedEventArgs e) { try { //If the pinned state changes, update the pinned state label. A delegate is needed because this happens on a seperate thread if (e.Property == ParticipantProperty.IsPinned) { labelPinnedState.BeginInvoke(new UpdatePinnedStateDelegate(this.UpdatePinnedState), e.Value); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// Handles event raised when participant property (IsInLobby) changes /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void Participant_PropertyChanged(object sender, ParticipantPropertyChangedEventArgs e) { Participant participant = (Participant)sender; //If the IsInLobby property changes and user is no longer in the lobby //then remove the user's name from the lobby list if (e.Property == ParticipantProperty.IsInLobby && (bool)e.Value == false) { string displayName = participant.Contact.GetContactInformation(ContactInformationType.DisplayName).ToString(); this.Dispatcher.Invoke(new RemoveListItemDelegate(RemoveListItem), new object[] { Lobby_ListBox, displayName }); //MeetingRoster_Listbox //Add the user's name to the lobby listbox this.Dispatcher.Invoke( new LoadListBoxDelegate(LoadListBox), new object[] { MeetingRoster_Listbox, displayName }); } }