aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Main/OS
diff options
context:
space:
mode:
authorAShifter <[email protected]>2017-04-01 15:09:15 -0600
committerGitHub <[email protected]>2017-04-01 15:09:15 -0600
commit5d8b0c4670d542269c02270619d076daaaee43b9 (patch)
tree2f62f9a5bd93669b37cd6d0d4dc06fa200d6a3f5 /TimeHACK.Main/OS
parent973fee67a84980f1851df1a00fd06036774e7d2c (diff)
parent125e35fe984021d892b98acff614e61a2851a9b1 (diff)
downloadhistacom2-5d8b0c4670d542269c02270619d076daaaee43b9.tar.gz
histacom2-5d8b0c4670d542269c02270619d076daaaee43b9.tar.bz2
histacom2-5d8b0c4670d542269c02270619d076daaaee43b9.zip
Merge pull request #25 from lempamo/master
webchat improved things
Diffstat (limited to 'TimeHACK.Main/OS')
-rw-r--r--TimeHACK.Main/OS/Win95/Win95.cs10
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs31
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.resx27
3 files changed, 53 insertions, 15 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95.cs b/TimeHACK.Main/OS/Win95/Win95.cs
index 260d909..6ca7f10 100644
--- a/TimeHACK.Main/OS/Win95/Win95.cs
+++ b/TimeHACK.Main/OS/Win95/Win95.cs
@@ -26,6 +26,11 @@ namespace TimeHACK.OS.Win95
// When New Game is clicked in TitleScreen.cs
private void Desktop_Load(object sender, EventArgs e)
{
+ // Play Windows 95 Start Sound
+ Stream audio = Properties.Resources.Win95Start;
+ startsound = new SoundPlayer(audio);
+ startsound.Play();
+
// Hide the Startmenu
startmenu.Hide();
@@ -38,11 +43,6 @@ namespace TimeHACK.OS.Win95
// Start the ClockTimer
clockTimer.Start();
- // Play Windows 95 Start Sound
- Stream audio = Properties.Resources.Win95Start;
- startsound = new SoundPlayer(audio);
- startsound.Play();
-
// Set the StartMenu seperator
startmenuitems.Items.Insert(6, new ToolStripSeparator());
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs
index c18ba20..79594ed 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs
@@ -37,11 +37,17 @@ namespace TimeHACK.OS.Win95.Win95Apps
wm.startInfobox95("Invalid Username", "Your username cannot be blank.");
return;
}
+ else if (txtscreenname.Text.Length > 12)
+ {
+ WindowManager wm = new WindowManager();
+ wm.startInfobox95("Invalid Username", "Your username needs to be less than 12 characters.");
+ return;
+ }
ParentForm.AcceptButton = button2;
TitleScreen.username = txtscreenname.Text;
login.Hide();
listBox1.Items.Add(TitleScreen.username);
- history.Text = "System: " + TitleScreen.username + " has joined the chat." + Environment.NewLine;
+ history.Text = "System: " + TitleScreen.username + " has joined the chat.\n";
Chat.Start();
}
@@ -49,7 +55,7 @@ namespace TimeHACK.OS.Win95.Win95Apps
{
if (chat_index != 6)
{
- history.Text += wcmp.ParseMessage(resources.GetString("convo"), chat_index, TitleScreen.username) + Environment.NewLine;
+ history.Text += wcmp.ParseMessage(resources.GetString("convo"), chat_index, TitleScreen.username) + "\n";
switch (wcmp.GetSpecial(resources.GetString("convo"), chat_index))
{
case "addsh":
@@ -74,11 +80,11 @@ namespace TimeHACK.OS.Win95.Win95Apps
{
if (correctname)
{
- history.Text += "SkyHigh: yay you got it right!" + Environment.NewLine;
+ history.Text += "SkyHigh: yay you got it right!\n";
}
else
{
- history.Text += "SkyHigh: sorry, my name is actually bill" + Environment.NewLine;
+ history.Text += "SkyHigh: sorry, my name is actually bill\n";
}
Chat.Interval = wcmp.GetMessageDelay(resources.GetString("convo"), chat_index);
}
@@ -87,17 +93,28 @@ namespace TimeHACK.OS.Win95.Win95Apps
private void Button2_Click(object sender, EventArgs e)
{
- if (typechat.Text != "") history.Text += TitleScreen.username + ": " + typechat.Text + Environment.NewLine;
+ if (typechat.Text != "") history.Text += TitleScreen.username + ": " + typechat.Text + "\n";
+ typechat.Text = "";
}
private void Button3_Click(object sender, EventArgs e)
{
- correctname = true; Chat.Start();
+ correctname = false;
+ button2.Show();
+ button3.Hide();
+ button4.Hide();
+ typechat.Show();
+ Chat.Start();
}
private void Button4_Click(object sender, EventArgs e)
{
- correctname = false; Chat.Start();
+ correctname = true;
+ button2.Show();
+ button3.Hide();
+ button4.Hide();
+ typechat.Show();
+ Chat.Start();
}
}
}
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.resx b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.resx
index 7ab7db0..1ea52b5 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.resx
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.resx
@@ -133,7 +133,7 @@
},
{
"user": "SkyHigh",
- "delay": 6000,
+ "delay": 5000,
"message": "damn",
"special": null,
"userchat": true
@@ -183,16 +183,37 @@
{
"user": "SkyHigh",
"delay": 6000,
- "message": "hey man",
+ "message": "hey rain",
"special": null,
"userchat": true
},
{
"user": "SkyHigh",
- "delay": 6000,
+ "delay": 4000,
"message": "ive sort of been waiting",
"special": null,
"userchat": true
+ },
+ {
+ "user": "rain49",
+ "delay": 5000,
+ "message": "sorry man",
+ "special": null,
+ "userchat": true
+ },
+ {
+ "user": "rain49",
+ "delay": 4000,
+ "message": "it took a while for this to load",
+ "special": null,
+ "userchat": true
+ },
+ {
+ "user": "SkyHigh",
+ "delay": 4000,
+ "message": "anyway... let's get to it",
+ "special": null,
+ "userchat": true
}
]
}</value>