Example #1
0
 private void invokeOneMessageToChatBox(chatbox box, TempMessage message)
 {
     if (message != null)
     {
         box.Invoke(box.addOneMessage, message);
     }
 }
Example #2
0
 private void invokeChatBox(chatbox box, List <TempMessage> messages)
 {
     if (messages.Count > 0)
     {
         box.Invoke(box.addMessage, messages);
     }
 }
Example #3
0
 private void AddChatBox(string toUser)
 {
     if (!lblNameUser.Text.Equals(toUser))
     {
         RefreshChatboxPanel();
         lblNameUser.Text = toUser;
         box          = new chatbox(this.chatClient, this.username, "", this.fullname, toUser);
         box.Anchor   = chatbox1.Anchor;
         box.Dock     = chatbox1.Dock;
         box.Height   = chatbox1.Height;
         box.Width    = chatbox1.Width;
         box.Location = chatbox1.Location;
         panelChatbox.Controls.Add(box);
         loadBox = true;
     }
 }
Example #4
0
 public chatbox(ChatClientControl chatClient, string username, string messageType, string fullname, string toUser)
 {
     InitializeComponent();
     _box             = this;
     this.chatClient  = chatClient;
     this.username    = username;
     this.messageType = messageType;
     this.fullname    = fullname;
     this.toUser      = toUser;
     oldBuble.Top     = 0 - oldBuble.Height + 10;
     buble1.Visible   = false;
     buble2.Visible   = false;
     getRoomName();
     addMessage    = new AddMessage(AddMessageMethod);
     addOneMessage = new AddOneMessage(AddOneMessageMethod);
 }