Ejemplo n.º 1
0
        private void tree_Room_MouseDoubleClick(object sender, EventArgs e)
        {
            if (tree_Room.SelectedNode == null)
            {
                return;
            }

            var tag = tree_Room.SelectedNode.Tag;

            if (tag is RoomObjExt)
            {
                tabbedMsgList.AddRoom(tag as RoomObjExt);
            }
            else if ((tag is string) && tag.ToString() != Client.Username.ToString())
            {
                PrivateMessageForm PmForm = new PrivateMessageForm(tag as string, this);
                PMForms.AddLast(PmForm);
                PmForm.Show();
            }
        }
Ejemplo n.º 2
0
        public void HandleMessage(ChatMessage msg)
        {
            string             sender       = msg.Sender;
            PrivateMessageForm roomToHandle = null;

            foreach (PrivateMessageForm f in PMForms)
            {
                if (f.Recipient == sender)
                {
                    roomToHandle = f;
                }
            }
            if (roomToHandle == null)
            {
                roomToHandle = new PrivateMessageForm(sender, this);
                PMForms.AddLast(roomToHandle);
                roomToHandle.Show();
            }
            roomToHandle.AppendMessage(msg);
            roomToHandle.BringToFront();
        }
Ejemplo n.º 3
0
 public void PMFormRemove(PrivateMessageForm PMForm)
 {
     PMForms.Remove(PMForm);
 }