aboutsummaryrefslogtreecommitdiff
path: root/Project Ports/Programs/ChatApp.cs
diff options
context:
space:
mode:
authorTrey <32907415+TheEdgeNK@users.noreply.github.com>2018-09-02 11:56:23 -0400
committerTrey <32907415+TheEdgeNK@users.noreply.github.com>2018-09-02 11:56:23 -0400
commitcf72b65769809ac77331414aee299112b9bf4b37 (patch)
tree9fb9fdfe01967db9c95b87cb96b7294b43ff455d /Project Ports/Programs/ChatApp.cs
parent52376ce623346e257c2b7845d0d2414e7653a6dd (diff)
downloadProject-Silicon-cf72b65769809ac77331414aee299112b9bf4b37.tar.gz
Project-Silicon-cf72b65769809ac77331414aee299112b9bf4b37.tar.bz2
Project-Silicon-cf72b65769809ac77331414aee299112b9bf4b37.zip
WE FIXED THE STORYLINE!!!
Diffstat (limited to 'Project Ports/Programs/ChatApp.cs')
-rw-r--r--Project Ports/Programs/ChatApp.cs24
1 files changed, 17 insertions, 7 deletions
diff --git a/Project Ports/Programs/ChatApp.cs b/Project Ports/Programs/ChatApp.cs
index 3af3f64..2fd2070 100644
--- a/Project Ports/Programs/ChatApp.cs
+++ b/Project Ports/Programs/ChatApp.cs
@@ -41,21 +41,31 @@ namespace Project_Ports
private void btnSendMSG_Click(object sender, EventArgs e)
{
- //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;
- //}
+ if (e.KeyCode == Keys.Enter)
+ {
+ ChatAPI.SendMessage(txtMsgContents, txtSentMessages);
+ e.SuppressKeyPress = true;
+ }
}
private void ChatApp_Load(object sender, EventArgs e)
{
- StorylineAPI.StartChatterEvent1(txtMsgContents);
+ txtSentMessages.AppendText(GeneralAPI.PlayerName + " has entered the channel!");
+
+ }
+
+ private async void txtSentMessages_TextChanged(object sender, EventArgs e)
+ {
+ if (txtSentMessages.Text == GeneralAPI.PlayerName + " has entered the channel!" + Environment.NewLine)
+ {
+ await Task.Delay(1000);
+ StorylineAPI.StartChatterEvent1(txtSentMessages);
+ }
}
}
}