关于注册表中设定项目和键值的详细说明?
该注册表的项目和键值信息可参考: http://msdn.microsoft.com/en-us/library/hh378557.aspx 目前,该注册表项目并没有发现针对某个特定用户的CWE实现。因此关于该需求,可考虑以下方式:
ApplicationRegistration myApplicationRegistration = LyncClient.GetClient().CreateApplicationRegistration(_strApplicationId, appname);
// Set the Conversation Window Extension properties. Ensure that the internalURL parameter is valid on your computer.
myApplicationRegistration.SetExtensibilityWindowProperties( strInternalURL ,string.Empty ,ConversationWindowExtensionSize.Large);
// Register the application.
myApplicationRegistration.AddRegistration();
//获取当前Lync客户端的相关信息
Automation automation = LyncClient.GetAutomation();
//遍历当前用户的所有对话
foreach (Conversation conversation in LyncClient.GetClient().ConversationManager.Conversations)
{
//如果当前对话只有2个联系人
if (conversation.Participants.Count == 2)
{
//并且参会者包括系统管理员
foreach (Participant p in conversation.Participants)
{
if (p.Contact.Uri.Equals(account))
{
//获取当前会话窗口,并打开长城办公助手
ConversationWindow window = automation.GetConversationWindow(conversation);
IAsyncResult OpenExtensibilityResult = window.BeginOpenExtensibilityWindow(_strApplicationId, null, null);
_bIsOpen = true;
}
}
}