예제 #1
0
        private void OnConversationPropertyChanged(object sender, ConversationPropertyChangedEventArgs e)
        {
            Conversation conference = (Conversation)sender;

            switch (e.Property)
            {
            case ConversationProperty.ConferenceAcceptingParticipant:
                Contact acceptingContact = (Contact)e.Value;
                break;

            case ConversationProperty.ConferencingUri:
                break;

            case ConversationProperty.ConferenceAccessInformation:

                try
                {
                    var conferenceKey = CreateConferenceKey();
                }
                catch (NullReferenceException nr)
                {
                    _log.ErrorException("Null ref Eception on ConferenceAccessInformation changed ", nr);
                }
                catch (LyncClientException lce)
                {
                    _log.ErrorException("Exception on ConferenceAccessInformation changed ", lce);
                }
                break;
            }
        }
예제 #2
0
        /// <summary>
        /// Handles event raised when interesting conversation properties changed.
        /// Handler is only interested in conference properties
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void _Conversation_PropertyChanged(object sender, ConversationPropertyChangedEventArgs e)
        {
            Conversation          conference        = (Conversation)sender;
            LoadTextBlockDelegate textBlockDelegate = new LoadTextBlockDelegate(LoadTextBlock);
            LoadTextBoxDelegate   textBoxDelegate   = new LoadTextBoxDelegate(LoadTextBox);

            switch (e.Property)
            {
            case ConversationProperty.ConferenceAcceptingParticipant:
                Contact acceptingContact = (Contact)e.Value;
                this.Dispatcher.Invoke(
                    textBlockDelegate,
                    new object[] { ConferenceAcceptingParticipant_block, "AcceptingParticipant:" + acceptingContact.GetContactInformation(ContactInformationType.DisplayName).ToString() });
                break;

            case ConversationProperty.ConferencingUri:
                if (_MeetingKey == null)
                {
                    _MeetingKey = new StringBuilder();
                }
                _MeetingKey.Append("Meeting Uri: " + "conf:" + e.Value.ToString() + "?conversation-id=null");
                _MeetingKey.Append(System.Environment.NewLine);
                break;

            case ConversationProperty.ConferenceAccessInformation:

                try
                {
                    if (_MeetingKey == null)
                    {
                        _MeetingKey = new StringBuilder();
                    }

                    _MeetingKey.Append(CreateConferenceKey());


                    this.Dispatcher.Invoke(
                        new EnableDisableButtonDelegate(EnableDisableButton),
                        new object[] { PostMeetingKey_Button, true });
                }
                catch (System.NullReferenceException nr)
                {
                    System.Diagnostics.Debug.WriteLine("Null ref Eception on ConferenceAccessInformation changed " + nr.Message);
                }
                catch (LyncClientException lce)
                {
                    System.Diagnostics.Debug.WriteLine("Exception on ConferenceAccessInformation changed " + lce.Message);
                }
                break;
            }

            this.Dispatcher.Invoke(
                textBoxDelegate,
                new object[] { ConferenceAccessInformation_block, _MeetingKey.ToString() });
            _MeetingKey.Clear();
        }
예제 #3
0
        static void Conversation_PropertyChanged(object sender, ConversationPropertyChangedEventArgs e)
        {
            Trace.WriteLine($"{GetRunningMethodName}:{e.Property}={e.Value}");

            if ((long)e.Property == 1342701598)  // IM last received timestamp
            {
                var lastTimeStamp = new DateTime(((DateTime)e.Value).Ticks, DateTimeKind.Utc).ToLocalTime();
                FindContainerOf((Conversation)sender)?.DumpConversation(lastTimeStamp);
            }
        }