public void OnStatusChanged(object sender, PropertiesChangedEventArgs e)
        {
            // Look for a status changed property event.

            var statusChangedEvents = e.PropertyChangedEvents.OfType <CandidateStatusChangedEventArgs>();

            foreach (var statusChangedEvent in statusChangedEvents)
            {
                HandleStatusChanged(e.InstanceId, statusChangedEvent.To);
            }
        }
示例#2
0
        private void Conversation_PropertiesChanged(object sender, PropertiesChangedEventArgs <ConversationProperties> e)
        {
            if (e.ChangedPropertyNames != null)
            {
                //Update the property from property changed event
                foreach (string propertyName in e.ChangedPropertyNames)
                {
                    switch (propertyName)
                    {
                    case ConversationProperties.ConversationIdPropertyName:
                        NonBlockingConsole.WriteLine("Conversation id changed to {0}", e.Properties.Id);
                        break;

                    case ConversationProperties.ConversationPriorityPropertyName:
                        NonBlockingConsole.WriteLine("Conversation priority changed to {0}", e.Properties.Priority);
                        break;

                    case ConversationProperties.ConversationSubjectPropertyName:
                        NonBlockingConsole.WriteLine("Conversation subject changed to {0}", e.Properties.Subject);
                        break;

                    case ConversationProperties.ConversationActiveMediaTypesPropertyName:
                        NonBlockingConsole.WriteLine("Conversation active media types property name changed to");
                        foreach (string activeMedia in e.Properties.ActiveMediaTypes)
                        {
                            NonBlockingConsole.WriteLine(activeMedia);
                            // TODO: Add calls for new active media types (and terminate calls for nonactive media types)
                        }
                        break;

                    default:
                        //Should not reach here
                        //Debug.Assert(false, "property name not expected");
                        break;
                    }
                }

                Message m = new Message("Conversation Properties changed. Properties changed: " + e.ChangedPropertyNames.ToString()
                                        + ". Participant Property Values: " + e.Properties.ToString() + ".",
                                        MessageType.ConversationInfo, _conversation.Id);
                _transcriptRecorder.OnMessageReceived(m);
            }
        }
        // Just to record the state transitions in the console.
        void ConferenceSession_PropertiesChanged(object sender,
            PropertiesChangedEventArgs<ConferenceSessionProperties> e)
        {
            ConferenceSession confSession = sender as ConferenceSession;
            string propertyValue = null;

            foreach (string property in e.ChangedPropertyNames)
            {
                // Record all ConferenceSession property changes.
                switch (property)
                {
                    case "AccessLevel":
                        propertyValue = e.Properties.AccessLevel.ToString();
                        break;
                    case "AutomaticLeaderAssignment":
                        propertyValue = e.Properties.AutomaticLeaderAssignment.ToString();
                        break;
                    case "ConferenceUri":
                        propertyValue = e.Properties.ConferenceUri;
                        break;
                    case "Disclaimer":
                        propertyValue = e.Properties.Disclaimer;
                        break;
                    case "DisclaimerTitle":
                        propertyValue = e.Properties.DisclaimerTitle;
                        break;
                    case "HostingNetwork":
                        propertyValue = e.Properties.HostingNetwork.ToString();
                        break;
                    case "LobbyBypass":
                        propertyValue = e.Properties.LobbyBypass.ToString();
                        break;
                    case "Organizer":
                        propertyValue = e.Properties.Organizer.UserAtHost;
                        break;
                    case "ParticipantData":
                        propertyValue = e.Properties.ParticipantData;
                        break;
                    case "RecordingPolicy":
                        propertyValue = e.Properties.RecordingPolicy.ToString();
                        break;
                    case "SchedulingTemplate":
                        propertyValue = e.Properties.SchedulingTemplate.ToString();
                        break;
                    case "Subject":
                        propertyValue = e.Properties.Subject;
                        break;
                }

                NonBlockingConsole.WriteLine("{0} is notified of ConferenceSession property change. {1}: {2}",
                    confSession.Conversation.LocalParticipant.UserAtHost,
                    property,
                    propertyValue);

                Message m = new Message("ConferenceSession property " + property + " changed to new value: " + propertyValue + ".",
                    confSession.Conversation.LocalParticipant.DisplayName, confSession.Conversation.LocalParticipant.UserAtHost, confSession.Conversation.LocalParticipant.Uri,
                    DateTime.Now, confSession.Conversation.Id, confSession.ConferenceUri, MessageType.ConferenceInfo, MessageDirection.Outgoing);
                _transcriptRecorder.OnMessageReceived(m);
            }

            NonBlockingConsole.WriteLine("");

            // TODO: If modalities added, establish calls on new modalities
        }
        private void Conversation_PropertiesChanged(object sender, PropertiesChangedEventArgs<ConversationProperties> e)
        {
            if (e.ChangedPropertyNames != null)
            {
                //Update the property from property changed event
                foreach (string propertyName in e.ChangedPropertyNames)
                {
                    switch (propertyName)
                    {
                        case ConversationProperties.ConversationIdPropertyName:
                            NonBlockingConsole.WriteLine("Conversation id changed to {0}", e.Properties.Id);
                            break;
                        case ConversationProperties.ConversationPriorityPropertyName:
                            NonBlockingConsole.WriteLine("Conversation priority changed to {0}", e.Properties.Priority);
                            break;
                        case ConversationProperties.ConversationSubjectPropertyName:
                            NonBlockingConsole.WriteLine("Conversation subject changed to {0}", e.Properties.Subject);
                            break;
                        case ConversationProperties.ConversationActiveMediaTypesPropertyName:
                            NonBlockingConsole.WriteLine("Conversation active media types property name changed to");
                            foreach (string activeMedia in e.Properties.ActiveMediaTypes)
                            {
                                NonBlockingConsole.WriteLine(activeMedia);
                                // TODO: Add calls for new active media types (and terminate calls for nonactive media types)
                            }
                            break;
                        default:
                            //Should not reach here
                            //Debug.Assert(false, "property name not expected");
                            break;
                    }
                }

                Message m = new Message("Conversation Properties changed. Properties changed: " + e.ChangedPropertyNames.ToString()
                    + ". Participant Property Values: " + e.Properties.ToString() + ".",
                    MessageType.ConversationInfo, _conversation.Id);
                _transcriptRecorder.OnMessageReceived(m);
            }
        }
示例#5
0
 public void OnCandidateStatusUpdated(object sender, PropertiesChangedEventArgs e)
 {
     Update(e.InstanceId);
 }
示例#6
0
 private void expandable_propertiesChanged(PropertiesChangedEventArgs e)
 {
     PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(e.propName));
 }
        // Just to record the state transitions in the console.
        void ConferenceSession_PropertiesChanged(object sender,
                                                 PropertiesChangedEventArgs <ConferenceSessionProperties> e)
        {
            ConferenceSession confSession   = sender as ConferenceSession;
            string            propertyValue = null;

            foreach (string property in e.ChangedPropertyNames)
            {
                // Record all ConferenceSession property changes.
                switch (property)
                {
                case "AccessLevel":
                    propertyValue = e.Properties.AccessLevel.ToString();
                    break;

                case "AutomaticLeaderAssignment":
                    propertyValue = e.Properties.AutomaticLeaderAssignment.ToString();
                    break;

                case "ConferenceUri":
                    propertyValue = e.Properties.ConferenceUri;
                    break;

                case "Disclaimer":
                    propertyValue = e.Properties.Disclaimer;
                    break;

                case "DisclaimerTitle":
                    propertyValue = e.Properties.DisclaimerTitle;
                    break;

                case "HostingNetwork":
                    propertyValue = e.Properties.HostingNetwork.ToString();
                    break;

                case "LobbyBypass":
                    propertyValue = e.Properties.LobbyBypass.ToString();
                    break;

                case "Organizer":
                    propertyValue = e.Properties.Organizer.UserAtHost;
                    break;

                case "ParticipantData":
                    propertyValue = e.Properties.ParticipantData;
                    break;

                case "RecordingPolicy":
                    propertyValue = e.Properties.RecordingPolicy.ToString();
                    break;

                case "SchedulingTemplate":
                    propertyValue = e.Properties.SchedulingTemplate.ToString();
                    break;

                case "Subject":
                    propertyValue = e.Properties.Subject;
                    break;
                }

                NonBlockingConsole.WriteLine("{0} is notified of ConferenceSession property change. {1}: {2}",
                                             confSession.Conversation.LocalParticipant.UserAtHost,
                                             property,
                                             propertyValue);

                Message m = new Message("ConferenceSession property " + property + " changed to new value: " + propertyValue + ".",
                                        confSession.Conversation.LocalParticipant.DisplayName, confSession.Conversation.LocalParticipant.UserAtHost, confSession.Conversation.LocalParticipant.Uri,
                                        DateTime.Now, confSession.Conversation.Id, confSession.ConferenceUri, MessageType.ConferenceInfo, MessageDirection.Outgoing);
                _transcriptRecorder.OnMessageReceived(m);
            }

            NonBlockingConsole.WriteLine("");

            // TODO: If modalities added, establish calls on new modalities
        }