Ejemplo n.º 1
0
        private void AddChatMember_Load(object sender, EventArgs e)
        {
            /* 추가할 멤버리스트 출력 - 채팅방 멤버 아닌 친구 */
            ChattingRoom chatRoom = Store.chatList.Single((X) => X.getRoomNum() == rNumber);

            members = chatRoom.getMembers();

            for (int i = 0; i < friendList.Count; i++)
            {
                int fnum = friendList.ElementAt(i).getfNum();

                bool isMember = false;
                foreach (Friend member in members)
                {
                    int userNum = member.getfNum();
                    if (userNum == fnum)
                    {
                        isMember = true;
                    }
                }


                //if (!isMember)
                //    checkedListBox1.Items.Add(friendList.ElementAt(i).getfname());
                if (!isMember)
                {
                    checkedListBox1.Items.Add(friendList.ElementAt(i));
                }
            }
        }
Ejemplo n.º 2
0
        public MsgBox(int rNum, int num, string msg, DateTime time)
        {
            InitializeComponent();

            ChattingRoom chatRoom = Store.chatList.Single((x) => x.getRoomNum() == rNum);

            this.MemberList = chatRoom.getMembers();

            float msgBoxWidth = setSize(msg);

            label2.Parent = pictureBox1;

            if (num == Store.myInfo.getUserNum())
            {
                sendMsg(msg, time, msgBoxWidth);
            }
            else
            {
                revMsg(num, msg, time, msgBoxWidth);
            }
        }
Ejemplo n.º 3
0
        public void pntList()
        {
            /* 채팅방 인원 리스트 출력 */

            try
            {
                if (listBox1.InvokeRequired)
                {
                    delegatePrintMemberList d = new delegatePrintMemberList(pntList);
                    Invoke(d);
                }
                else
                {
                    listBox1.Items.Clear();

                    ChattingRoom  chatRoom = Store.chatList.Single((X) => X.getRoomNum() == rNumber);
                    List <Friend> members  = chatRoom.getMembers();

                    foreach (Friend friend in members)
                    {
                        listBox1.Items.Add(friend.getfname());
                    }
                }
            }
            catch  { }



            //for(int i=0; i<members.Count;i++)
            //{
            //    for(int j=0; j<Store.userlist.Count;j++)
            //    {
            //        if(members.ElementAt(i) == Store.userlist[j])
            //        {
            //            listBox1.Items.Add(Store.userlist[j].getName());

            //        }
            //    }
            //}
        }