예제 #1
0
        private void _UpdateChatRooms()
        {
            ChatRoomListBox.Items.Clear();

            int    i      = 0;
            string change = "";

            foreach (Chat chat in m_chatter.myChats)
            {
                if (m_chatter.hasRoomUpdated(i))
                {
                    change = "! ";
                }
                else
                {
                    change = "";
                }
                if (i == 0)
                {
                    ChatRoomListBox.Items.Add(new ListItem(change + "[0] Main Chatroom", chat.Id.ToString()));
                }
                else
                {
                    ChatRoomListBox.Items.Add(new ListItem(String.Format(change + "[{0}] {1}", i, chat), chat.Id.ToString()));
                }
                i++;
            }

            TextBoxUpdatePanel.Update();
        }