private void sendMessageBtn(object sender, RoutedEventArgs e) { string sendString = m_myUseruser.username + ": " + enterMessageTxtBox.Text + "\n"; byte[] stringBytes = Encoding.ASCII.GetBytes(sendString); byte[] encryptedMsg = CAes.SimpleEncrypt(stringBytes, m_sessionKey, m_sessionKey); udpClient.Send(encryptedMsg, encryptedMsg.Length, ipPartnerEndPointSend); AllChatTxtBox.AppendText(sendString); }
public void addLineToChat(string line) { AllChatTxtBox.AppendText(line); }