diff options
Diffstat (limited to 'Project Ports/Programs/ChatApp.cs')
| -rw-r--r-- | Project Ports/Programs/ChatApp.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Project Ports/Programs/ChatApp.cs b/Project Ports/Programs/ChatApp.cs index 593fa17..0e89077 100644 --- a/Project Ports/Programs/ChatApp.cs +++ b/Project Ports/Programs/ChatApp.cs @@ -21,7 +21,16 @@ namespace Project_Ports private void btnSendMSG_Click(object sender, EventArgs e) { - PortEngine.ChatAPI.SendMessage(txtMsgContents, txtSentMessages); + ChatAPI.SendMessage(txtMsgContents, txtSentMessages); + } + + private void txtMsgContents_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter) + { + ChatAPI.SendMessage(txtMsgContents, txtSentMessages); + e.SuppressKeyPress = true; + } } } } |
