void SendInitialData() { contextInfo = new ConversationContextualInfo(); contextInfo.ApplicationId = AppID; contextInfo.ApplicationData = "initial context data"; IMButton.ContextualInformation = contextInfo; IMButton.Source = "sip:[email protected]"; }
private void cboContacts_SelectionChanged (object sender, SelectionChangedEventArgs e) { // Set the sipAddress of the selected item as the // source for the presence indicator lyncPresence.Source = cboContacts.SelectedValue; // Set the start instant message button lyncStartMessage.Source = cboContacts.SelectedValue; // Setup the contextual information ConversationContextualInfo info = new ConversationContextualInfo(); info.ApplicationId = "{F03A7197-5E52-49FF-B28C-3ADA7636D02F}"; info.ApplicationData = "\"Can you see this?\" "; info.Subject = "Hello " + ((Contact)cboContacts.SelectedItem).name + ", take a look at this program!"; lyncStartMessage.ContextualInformation = info; }
private void accountsList_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (accountsList.SelectedIndex != -1) { Account selectedAccount = accountsList.SelectedItem as Account; secondaryLabUser.Text = _secondaryLabUserId; presenceIndicator.Source = _secondaryLabUserId; startInstantMessagingButton.Source = _secondaryLabUserId; startAudioCallButton.Source = _secondaryLabUserId; // TODO: 3.2.1 Create conversation context ConversationContextualInfo context = new ConversationContextualInfo(); context.Subject = selectedAccount.AccountName; context.ApplicationId = _applicationGuid; context.ApplicationData = "AccountId:" + selectedAccount.ID.ToString(); startInstantMessagingButton.ContextualInformation = context; startAudioCallButton.ContextualInformation = context; } }