public void UpdateRealtimechatClientSizeLoop() //อัพเดต Chat ฝั่ง Client { //while (true) //{ RealtimeupdateClientSize = RealtimeChat.Text; ChatSizeClient.ChatSizeClientMain TEST = new ChatSizeClient.ChatSizeClientMain(); TEST.UpdateRealtimechatClientSize(RealtimeupdateClientSize); TEST.REChat(RealtimeupdateClientSize); //} }
private void chatzonebutton_Click(object sender, EventArgs e) { if (Permission.Text == "AdminCode") { Namesend = USERNAME.Text; ChatSize_ADMIN_.ChatAppAdminSize CSA = new ChatSize_ADMIN_.ChatAppAdminSize(); CSA.ADMINNAME(Namesend); CSA.Show(); } else { ChatSizeClient.ChatSizeClientMain CSC = new ChatSizeClient.ChatSizeClientMain(); string namesend = USERNAME.Text; CSC.Receivename(namesend); CSC.Show(); Thread URCS = new Thread(UpdateRealtimechatClientSizeLoop); URCS.Start(); } }