aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Main/OS
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-04-02 13:35:32 -0400
committerlempamo <[email protected]>2017-04-02 13:35:32 -0400
commit568d5a6573ffd13c5adb38ab40e0e608fa3dff8e (patch)
tree02fbf26541f71fa9957b07cd1542cf587cefe42a /TimeHACK.Main/OS
parent49907c5f3a594ab3b2385d1d7dec8015c19a5aae (diff)
downloadhistacom2-568d5a6573ffd13c5adb38ab40e0e608fa3dff8e.tar.gz
histacom2-568d5a6573ffd13c5adb38ab40e0e608fa3dff8e.tar.bz2
histacom2-568d5a6573ffd13c5adb38ab40e0e608fa3dff8e.zip
added AIM sounds to webchat
Diffstat (limited to 'TimeHACK.Main/OS')
-rw-r--r--TimeHACK.Main/OS/Win95/Win95.cs20
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs40
2 files changed, 33 insertions, 27 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95.cs b/TimeHACK.Main/OS/Win95/Win95.cs
index 85039ef..afe1644 100644
--- a/TimeHACK.Main/OS/Win95/Win95.cs
+++ b/TimeHACK.Main/OS/Win95/Win95.cs
@@ -54,16 +54,16 @@ namespace TimeHACK.OS.Win95
private void fontLoad()
{
- this.taskbartime.Font = new System.Drawing.Font(TitleScreen.pfc.Families[0], 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.ProgramsToolStripMenuItem.Font = new System.Drawing.Font(TitleScreen.pfc.Families[0], 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.DocumentsToolStripMenuItem.Font = new System.Drawing.Font(TitleScreen.pfc.Families[0], 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.SettingsToolStripMenuItem.Font = new System.Drawing.Font(TitleScreen.pfc.Families[0], 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.FindToolStripMenuItem.Font = new System.Drawing.Font(TitleScreen.pfc.Families[0], 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.HelpToolStripMenuItem.Font = new System.Drawing.Font(TitleScreen.pfc.Families[0], 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.RunToolStripMenuItem.Font = new System.Drawing.Font(TitleScreen.pfc.Families[0], 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.SuspendToolStripMenuItem.Font = new System.Drawing.Font(TitleScreen.pfc.Families[0], 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.ShutdownToolStripMenuItem.Font = new System.Drawing.Font(TitleScreen.pfc.Families[0], 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.desktopicons.Font = new System.Drawing.Font(TitleScreen.pfc.Families[0], 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.taskbartime.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ this.ProgramsToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ this.DocumentsToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.SettingsToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.FindToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.HelpToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.RunToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.SuspendToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.ShutdownToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.desktopicons.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
}
#region StartMenu
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs
index 7679c7a..714df9d 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs
@@ -9,16 +9,24 @@ using System.Threading.Tasks;
using System.Windows.Forms;
using TimeHACK.Engine;
using System.Threading;
+using System.Media;
+using System.IO;
namespace TimeHACK.OS.Win95.Win95Apps
{
public partial class WebChat1998 : UserControl
{
int chat_index = 0;
+ WindowManager wm = new WindowManager();
WCMessageParser wcmp = new WCMessageParser();
bool correctname = false;
bool guessing = false;
+ SoundPlayer join = new SoundPlayer(Properties.Resources.AIMbuddyjoin);
+ SoundPlayer leave = new SoundPlayer(Properties.Resources.AIMbuddyleave);
+ SoundPlayer send = new SoundPlayer(Properties.Resources.AIMmessagesent);
+ SoundPlayer receive = new SoundPlayer(Properties.Resources.AIMmessagereceived);
+
public WebChat1998()
{
InitializeComponent();
@@ -32,23 +40,15 @@ namespace TimeHACK.OS.Win95.Win95Apps
}
private void Button1_Click(object sender, EventArgs e)
{
- if (txtscreenname.Text == "")
- {
- WindowManager wm = new WindowManager();
- wm.startInfobox95("Invalid Username", "Your username cannot be blank.", Properties.Resources.Win95Warning);
- return;
- }
- else if (txtscreenname.Text.Length > 12)
- {
- WindowManager wm = new WindowManager();
- wm.startInfobox95("Invalid Username", "Your username needs to be less than 12 characters.", Properties.Resources.Win95Warning);
- return;
- }
+ if (txtscreenname.Text == "") { wm.startInfobox95("Invalid Username", "Your username cannot be blank.", Properties.Resources.Win95Warning); return; }
+ if (txtscreenname.Text.Length > 12) { wm.startInfobox95("Invalid Username", "Your username needs to be less than 12 characters.", Properties.Resources.Win95Warning); return; }
+ if (txtscreenname.Text.Contains(" ")) { wm.startInfobox95("Invalid Username", "Your username cannot contain spaces.", Properties.Resources.Win95Warning); return; }
ParentForm.AcceptButton = button2;
TitleScreen.username = txtscreenname.Text;
login.Hide();
listBox1.Items.Add(TitleScreen.username);
- history.Text = "System: " + TitleScreen.username + " has joined the chat.\n";
+ history.Text = "System: " + TitleScreen.username + " has joined the chat." + Environment.NewLine;
+ join.Play();
Chat.Start();
}
@@ -56,11 +56,12 @@ namespace TimeHACK.OS.Win95.Win95Apps
{
if (!guessing)
{
- history.Text += wcmp.ParseMessage(resources.GetString("convo"), chat_index, TitleScreen.username) + "\n";
+ history.Text += wcmp.ParseMessage(resources.GetString("convo"), chat_index, TitleScreen.username) + Environment.NewLine;
switch (wcmp.GetSpecial(resources.GetString("convo"), chat_index))
{
case "addsh":
listBox1.Items.Add("SkyHigh");
+ join.Play();
break;
case "nameguess":
typechat.Hide();
@@ -69,11 +70,14 @@ namespace TimeHACK.OS.Win95.Win95Apps
button4.Show();
Chat.Stop();
guessing = true;
+ receive.Play();
break;
case "addrain":
listBox1.Items.Add("rain49");
+ join.Play();
break;
default:
+ receive.Play();
break;
}
Chat.Interval = wcmp.GetMessageDelay(resources.GetString("convo"), chat_index);
@@ -82,13 +86,14 @@ namespace TimeHACK.OS.Win95.Win95Apps
{
if (correctname)
{
- history.Text += "SkyHigh: yay you got it right!\n";
+ history.Text += "SkyHigh: yay you got it right!" + Environment.NewLine;
}
else
{
- history.Text += "SkyHigh: sorry, my name is actually bill\n";
+ history.Text += "SkyHigh: sorry, my name is actually bill" + Environment.NewLine;
}
guessing = false;
+ receive.Play();
Chat.Interval = wcmp.GetMessageDelay(resources.GetString("convo"), chat_index);
}
chat_index++;
@@ -96,8 +101,9 @@ namespace TimeHACK.OS.Win95.Win95Apps
private void Button2_Click(object sender, EventArgs e)
{
- if (typechat.Text != "") history.Text += TitleScreen.username + ": " + typechat.Text + "\n";
+ if (typechat.Text != "") history.Text += TitleScreen.username + ": " + typechat.Text + Environment.NewLine;
typechat.Text = "";
+ send.Play();
}
private void Button3_Click(object sender, EventArgs e)