예제 #1
0
 private void ParseChatRoomInfo(DiscoveryInfoResponse resp, ChatServerMenuItem parentMenu)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         AddChatServerMenuItem(resp.From, parentMenu);
         this.Cursor = Cursors.Default;
     }
     catch {}
 }
예제 #2
0
        private ChatServerMenuItem AddChatServerMenuItem(JabberID jid, ChatServerMenuItem parent)
        {
            ChatServerMenuItem itm = new ChatServerMenuItem(jid, this);
            if (parent == null)
                mnuJoinRoom.MenuItems.Add(itm);
            else
            {
                //make sure we can still output the template for the service
                if (parent.MenuItems.Count == 0)
                {
                    parent.MenuItems.Add(new ChatServerMenuItem(jid.ServerJID, this));
                    parent.MenuItems.Add("-");
                }

                //add this room as a subitem
                parent.MenuItems.Add(itm);
            }

            return itm;
        }