2

我正在编写启用 UI 抑制的自定义 Lync 客户端。客户需要拥有的组件之一是员工搜索表单,该表单将用于添加联系人和邀请员工进行对话。此表单将在 DataGridView 中加载员工并显示他们的可用性(在线、离线、空闲等)。

然而,问题是可用性似乎只对我已经联系过的用户正确显示。其他所有人都将其 ContactAvailability 设置为 None。

是否可以获得不是联系人的 Lync 用户的可用性?提前致谢。

4

2 回答 2

1

我找到了解决方案。我需要使用 ContactSubscription 类:http: //msdn.microsoft.com/en-us/library/hh380135.aspx

这个链接也被证明有帮助:http ://rcosic.wordpress.com/2011/11/02/starting-with-lync-clients-api/

于 2012-04-13T21:08:36.187 回答
0

查询存在:

    _appEndPoint.PresenceServices.BeginPresenceQuery(new List<string>() {  "UriToQuery"  }, new string[] { "state" }, EndgetNotification, null, null);


    protected void EndgetNotification(object sender, RemotePresentitiesNotificationEventArgs e)
    {

       if (e.Notifications.Count > 0)
            {
              string strPresence =e.Notifications[0].AggregatedPresenceState.Availability.ToString();
             }
     }
于 2012-05-03T10:30:10.230 回答