public void AddItemToListChat(User user, string IDMess, string str) { Panel tempPanel = new Panel(); tempPanel.Dock = DockStyle.Top; tempPanel.AutoSize = true; ucUserINChatBox UserInChatBox = new ucUserINChatBox(user, group.ID); ucMessShow messShow = new ucMessShow(str, user, UserInChatBox); if (user.Id != FrmMain.me.Id) { UserInChatBox.DisableEdit(); } messShow.Dock = DockStyle.Top; UserInChatBox.Dock = DockStyle.Top; UserInChatBox._AddMessControl(messShow); tempPanel.Controls.Add(UserInChatBox); this.panelListChat.Controls.Add(tempPanel); this.panelListChat.Controls.Add(tempPanel); if (IDMess == "-1") { FrmMain.listMessAwaitID.Add(UserInChatBox); // Thêm vào hàng đợi ID ti nhan từ server gửi xuống } else { UserInChatBox.ID = IDMess; } userINChatBoxes.Add(UserInChatBox); }
public ucEditMessage(ucUserINChatBox ucUserINChatBox, ucMessShow ucMessShow) { InitializeComponent(); this.pnparent = ucUserINChatBox; this.ucmessshow = ucMessShow; this.lbCancel.ForeColor = FrmMain.theme.TxtForeColor; this.lbSave.ForeColor = FrmMain.theme.TxtForeColor; this.textBox1.BackColor = FrmMain.theme.BackColor; this.textBox1.ForeColor = FrmMain.theme.TxtForeColor; this.textBox1.Text = ucMessShow.GetText(); this.Visible = true; }
public void _AddMessControl(ucMessShow messcontrol) { isFile = false; this.panelAddMessage.Controls.Add(messcontrol); this.ucmessshow = messcontrol; }