Exemplo n.º 1
0
 /// <summary>
 /// Add a conference room to the bookmark list
 /// </summary>
 /// <param name="jid">The room@service JID of the room</param>
 /// <param name="name">Human-readable text</param>
 /// <param name="autoJoin">Join on login</param>
 /// <param name="nick">Room nickname.  May be null.</param>
 /// <returns></returns>
 public BookmarkConference AddConference(JID jid, string name, bool autoJoin, string nick)
 {
     BookmarkConference c = new BookmarkConference(m_stream.Document);
     if (jid == null)
         throw new ArgumentNullException("jid", "JID must not be null in a conference bookmark");
     c.JID = jid;
     if ((name != null) && (name != ""))
         c.ConferenceName = name;
     c.AutoJoin = autoJoin;
     if ((nick != null) && (nick != ""))
         c.Nick = nick;
     this[jid] = c;
     return c;
 }
Exemplo n.º 2
0
 private void bmm_OnConferenceRemove(Jabber.Client.BookmarkManager manager, BookmarkConference conference)
 {
     string jid = conference.JID;
     if (lvBookmarks.Items.ContainsKey(jid))
         lvBookmarks.Items.RemoveByKey(jid);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Add a conference room to the bookmark list
 /// </summary>
 /// <param name="jid"></param>
 /// <param name="name"></param>
 /// <param name="autoJoin"></param>
 /// <param name="nick"></param>
 /// <returns></returns>
 public BookmarkConference AddConference(JID jid, string name, bool autoJoin, string nick)
 {
     BookmarkConference c = new BookmarkConference(this.OwnerDocument);
     c.JID = jid;
     c.ConferenceName = name;
     c.AutoJoin = autoJoin;
     if (nick != null)
         c.Nick = nick;
     this.AddChild(c);
     return c;
 }
Exemplo n.º 4
0
 private void bmm_OnConferenceAdd(Jabber.Client.BookmarkManager manager, BookmarkConference conference)
 {
     string jid = conference.JID;
     string name = conference.ConferenceName;
     if (name == null)
         name = jid;
     if (lvBookmarks.Items.ContainsKey(jid))
         lvBookmarks.Items.RemoveByKey(jid);
     ListViewItem item = lvBookmarks.Items.Add(jid, name, -1);
     item.SubItems.Add(conference.Nick);
     item.SubItems.Add(conference.AutoJoin.ToString());
     item.Tag = conference.JID;
 }