Beispiel #1
0
        private void ActionImageAdded(object sender, ActionImageEventArgs e)
        {
            RosterItem  ri = (RosterItem)sender;
            ContactItem ci = ContactListPanel.GetContactItem(ri.Jid.Bare);

            if (ci != null)
            {
                ci.AddActionImage(e.Item, e.Item.ToolTip);
            }
        }
Beispiel #2
0
        private void RosterItem_AvatarChanged(object sender, EventArgs e)
        {
            RosterItem  ri = (RosterItem)sender;
            ContactItem ci = ContactListPanel.GetContactItem(ri.Jid.Bare);

            if (ci != null)
            {
                ci.Image = ri.Avatar;
            }
        }
Beispiel #3
0
        private void PresenceChanged(object sender, PresenceItemEventArgs e)
        {
            RosterItem ri = (RosterItem)sender;

            jabber.protocol.client.Presence pres = ri.GetPresence();

            if (pres == null)
            {
                pres = e.Item;
            }

            ContactItem ci = null;

            if (pres != null)
            {
                ci = ContactListPanel.GetContactItem(ri.Jid.Bare);

                if (pres.Status != null)
                {
                    ci.TextLineTwo = pres.Status;
                }
                else if (pres.Show != null)
                {
                    ci.TextLineTwo = pres.Show;
                }
                else
                {
                    ci.TextLineTwo = "Online";
                }
            }

            switch (pres.Type)
            {
            case jabber.protocol.client.PresenceType.available:
                if (!(ci == null))
                {
                    ci.Enabled = true;
                    ci.Visible = true;
                    ci.Image   = ri.Avatar;
                }
                break;

            case jabber.protocol.client.PresenceType.unavailable:
                if (ci != null)
                {
                    ci.Enabled = false;
                    ci.Visible = false;
                }
                break;
            }
        }
Beispiel #4
0
 private void RosterItem_RosterItemChanged(object sender, RosterItemEventArgs e)
 {
     ContactListPanel.GetContactItem(e.RosterItem.Jid.ToString()).TextLineOne = e.RosterItem.GetDisplayName();
 }