aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-03-31 21:19:13 -0400
committerlempamo <[email protected]>2017-03-31 21:19:13 -0400
commit6ecb36cc462081895a92ff7fb5b23f3259fc1f1e (patch)
tree8512e8f97b3966c2870f854a33e55fd30df78de2 /TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs
parent7841180fc0f60f6eb1fff1503f89ff2cad117e85 (diff)
downloadhistacom2-6ecb36cc462081895a92ff7fb5b23f3259fc1f1e.tar.gz
histacom2-6ecb36cc462081895a92ff7fb5b23f3259fc1f1e.tar.bz2
histacom2-6ecb36cc462081895a92ff7fb5b23f3259fc1f1e.zip
webchat1998 messages are working
Diffstat (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs')
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs34
1 files changed, 22 insertions, 12 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs
index 94179d6..fa0837f 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs
@@ -14,6 +14,9 @@ namespace TimeHACK.OS.Win95.Win95Apps
{
public partial class WebChat1998 : UserControl
{
+ int chat_index = 0;
+ WCMessageParser wcmp = new WCMessageParser();
+
public WebChat1998()
{
InitializeComponent();
@@ -36,23 +39,30 @@ namespace TimeHACK.OS.Win95.Win95Apps
TitleScreen.username = txtscreenname.Text;
login.Hide();
listBox1.Items.Add(TitleScreen.username);
- chatLoop();
+ history.Text = "System: " + TitleScreen.username + " has joined the chat." + Environment.NewLine;
+ Chat.Start();
}
- private void chatLoop()
+ private void Chat_Tick(object sender, EventArgs e)
{
- WCMessageParser wcmp = new WCMessageParser();
- Thread.Sleep(15000);
- for (int i = 0; i < 200; i++)
+ history.Text += wcmp.ParseMessage(resources.GetString("convo"), chat_index, TitleScreen.username) + Environment.NewLine;
+ switch (wcmp.GetSpecial(resources.GetString("convo"), chat_index))
{
- history.Text = wcmp.ParseMessage(resources.GetString("convo"), i, TitleScreen.username);
- switch (wcmp.GetSpecial(resources.GetString("convo"), i))
- {
- default:
- break;
- }
- Thread.Sleep(wcmp.GetMessageDelay(resources.GetString("convo"), i));
+ case "addsh":
+ listBox1.Items.Add("SkyHigh");
+ break;
+ case "nameguess":
+ typechat.Hide();
+ button2.Hide();
+ button3.Show();
+ button4.Show();
+ Chat.Stop();
+ break;
+ default:
+ break;
}
+ Chat.Interval = wcmp.GetMessageDelay(resources.GetString("convo"), chat_index);
+ chat_index++;
}
}
}