public StatusManager(Session session) { _userId = session.UserId; _peopleManager = PeopleManager.GetInstance(session); _userStatusList = new UserStatusList(_peopleManager); _userStatusList.StartWatching(new[] { _userId }); _statusMessageList = new StatusMessageList(_peopleManager); _statusMessageList.StartWatching(); }
protected void SetUserStatus(string statusId) { var peopleManager = PeopleManager.GetInstance(_session); var statusList = new StatusMessageList(peopleManager); statusList.StartWatching(); var userStatusUpdate = new UserStatusUpdate(peopleManager, _session.UserId) { StatusMessageDetails = statusList[statusId] }; userStatusUpdate.UpdateRequest(); statusList.StopWatching(); }
public CicStatusService(Session session, ITraceContext traceContext) { _userId = session.UserId; _traceContext = traceContext; _peopleManager = PeopleManager.GetInstance(session); _userStatusList = new UserStatusList(_peopleManager); _userStatusList.StartWatching(new[] { _userId }); _userStatusList.WatchedObjectsChanged += OnUserStatusChanged; _statusMessageList = new StatusMessageList(_peopleManager); _statusMessageList.StartWatching(); _filteredStatusList = new FilteredStatusMessageList(_peopleManager); _filteredStatusList.StartWatching(new[] { _userId }); }
public List <string> PopulateStatusList() { UserStatusList = new UserStatusList(PeopleManager); UpdateCurrentUserStatus(); StatusMessageList msgList = new StatusMessageList(PeopleManager); msgList.StartWatching(); StatusImageList = new System.Windows.Forms.ImageList(); List <string> items = new List <string>();//new object[msgList.GetList().Count]; string lvi; foreach (StatusMessageDetails d in msgList.GetList()) { StatusImageList.Images.Add(d.Icon); lvi = d.MessageText; items.Add(lvi); } return(items); }
public void ChangeUserStatus(string NewStatus) { UserStatusUpdate statusUpdate = new UserStatusUpdate(PeopleManager); StatusMessageList msgList = new StatusMessageList(PeopleManager); msgList.StartWatching(); foreach (StatusMessageDetails d in msgList.GetList()) { if (NewStatus == d.MessageText) { statusUpdate.StatusMessageDetails = d; } } if (statusUpdate.StatusMessageDetails != null) { //statusUpdate.UpdateRequest(); statusUpdate.UpdateRequestAsync(ConnectCompleted, null); } else { return; } UpdateCurrentUserStatus(); }