Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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();
        }