diff options
| author | lempamo <[email protected]> | 2017-10-03 21:08:00 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-10-03 21:08:00 -0400 |
| commit | 13db16e701ea7b9d4090903b11c7715089a10a0b (patch) | |
| tree | 11a9d4c96993feb91d97793d1e6a075c55624b4d /Histacom2 | |
| parent | 21eb98e352b69ce6da9f758b9d3613ea47071468 (diff) | |
| download | histacom2-13db16e701ea7b9d4090903b11c7715089a10a0b.tar.gz histacom2-13db16e701ea7b9d4090903b11c7715089a10a0b.tar.bz2 histacom2-13db16e701ea7b9d4090903b11c7715089a10a0b.zip | |
start of webchat1999 script
Diffstat (limited to 'Histacom2')
| -rw-r--r-- | Histacom2/OS/Win98/Win98.cs | 16 | ||||
| -rw-r--r-- | Histacom2/OS/Win98/Win98Apps/WebChat1999.Designer.cs | 3 | ||||
| -rw-r--r-- | Histacom2/OS/Win98/Win98Apps/WebChat1999.cs | 91 | ||||
| -rw-r--r-- | Histacom2/OS/Win98/Win98Apps/WebChat1999.resx | 3 |
4 files changed, 100 insertions, 13 deletions
diff --git a/Histacom2/OS/Win98/Win98.cs b/Histacom2/OS/Win98/Win98.cs index 32b7aca..351456d 100644 --- a/Histacom2/OS/Win98/Win98.cs +++ b/Histacom2/OS/Win98/Win98.cs @@ -303,11 +303,9 @@ namespace Histacom2.OS.Win98 else { // It is an actual file on the disk - WinClassicWindowsExplorer we = new WinClassicWindowsExplorer(); // If it is a directory - if (Directory.Exists(objListViewItem.Tag.ToString())) { we.CurrentDirectory = objListViewItem.Tag.ToString(); @@ -317,13 +315,7 @@ namespace Histacom2.OS.Win98 app.BringToFront(); startmenu.Hide(); } - else - { - // Just open the file... - - we.OpenFile(objListViewItem.Tag.ToString()); - } - + else we.OpenFile(objListViewItem.Tag.ToString()); // Just open the file... } } } @@ -338,10 +330,10 @@ namespace Histacom2.OS.Win98 } private void WebChatToolStripMenuItem_Click(object sender, EventArgs e) { - WebChat1998 wc = new WebChat1998(); - WinClassic app = wm.Init(wc, "Web Chat 1998", null, true, true); + WebChat1999 wc = new WebChat1999(); + WinClassic app = wm.Init(wc, "Web Chat 1999", null, true, true); - AddTaskBarItem(app, app.Tag.ToString(), "Web Chat 1998", null); + AddTaskBarItem(app, app.Tag.ToString(), "Web Chat 1999", null); app.BringToFront(); startmenu.Hide(); diff --git a/Histacom2/OS/Win98/Win98Apps/WebChat1999.Designer.cs b/Histacom2/OS/Win98/Win98Apps/WebChat1999.Designer.cs index 3f825fe..5c47344 100644 --- a/Histacom2/OS/Win98/Win98Apps/WebChat1999.Designer.cs +++ b/Histacom2/OS/Win98/Win98Apps/WebChat1999.Designer.cs @@ -66,6 +66,7 @@ this.button2.Size = new System.Drawing.Size(71, 20); this.button2.TabIndex = 16; this.button2.Text = "Speak"; + this.button2.Click += new System.EventHandler(this.button2_Click); // // label7 // @@ -210,6 +211,7 @@ this.button1.Size = new System.Drawing.Size(151, 23); this.button1.TabIndex = 4; this.button1.Text = "Login"; + this.button1.Click += new System.EventHandler(this.button1_Click); // // label3 // @@ -270,6 +272,7 @@ this.Controls.Add(this.listBox1); this.Name = "WebChat1999"; this.Size = new System.Drawing.Size(724, 462); + this.Load += new System.EventHandler(this.WebChat1999_Load); this.panel1.ResumeLayout(false); this.login.ResumeLayout(false); this.login.PerformLayout(); diff --git a/Histacom2/OS/Win98/Win98Apps/WebChat1999.cs b/Histacom2/OS/Win98/Win98Apps/WebChat1999.cs index 25c4298..120618f 100644 --- a/Histacom2/OS/Win98/Win98Apps/WebChat1999.cs +++ b/Histacom2/OS/Win98/Win98Apps/WebChat1999.cs @@ -7,14 +7,105 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; +using System.Media; +using Histacom2.Engine; +using Histacom2.Engine.Template; namespace Histacom2.OS.Win98.Win98Apps { public partial class WebChat1999 : UserControl { + WindowManager wm = new WindowManager(); + + 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); + SoundPlayer file = new SoundPlayer(Properties.Resources.AIMfile); + + int chatStage = 0; + public WebChat1999() { InitializeComponent(); } + + private void WebChat1999_Load(object sender, EventArgs e) + { + button5.Hide(); + label5.Hide(); + } + + private void button1_Click(object sender, EventArgs e) + { + if (txtscreenname.Text == "") { wm.StartInfobox95("Invalid Username", "Your username cannot be blank.", InfoboxType.Warning, InfoboxButtons.OK); return; } + if (txtscreenname.Text.Length > 12) { wm.StartInfobox95("Invalid Username", "Your username needs to be less than 12 characters.", InfoboxType.Warning, InfoboxButtons.OK); return; } + if (txtscreenname.Text.Contains(" ")) { wm.StartInfobox95("Invalid Username", "Your username cannot contain spaces.", InfoboxType.Warning, InfoboxButtons.OK); return; } + if (txtscreenname.Text == "SkyHigh" | txtscreenname.Text == "rain49" | txtscreenname.Text == "12padams") { wm.StartInfobox95("Invalid Username", "That username is already taken.", InfoboxType.Warning, InfoboxButtons.OK); return; } + ParentForm.AcceptButton = button2; + TitleScreen.username = txtscreenname.Text; + login.Hide(); + listBox1.Items.Add(TitleScreen.username); + listBox1.Items.Add("ThatDude"); + history.AppendText("System: " + TitleScreen.username + " has joined the chat." + Environment.NewLine); join.Play(); + chatScript1(); + } + + private async void chatScript1() + { + await Task.Delay(2000); + history.AppendText("ThatDude: oh hello!" + Environment.NewLine); receive.Play(); + await Task.Delay(5500); + history.AppendText("ThatDude: just wondering, are you that guy who travelled thru time with nothing but a computer?" + Environment.NewLine); receive.Play(); + await Task.Delay(250); + chatStage = 1; + await Task.Delay(7000); + if (chatStage == 1) { chatStage = 4; chatScript2(); } + } + + private async void chatScript2() + { + if (chatStage == 2) + { + await Task.Delay(3000); + history.AppendText("ThatDude: omg really??" + Environment.NewLine); receive.Play(); + await Task.Delay(4000); + history.AppendText("ThatDude: hold on, let me check your ip to make sure" + Environment.NewLine); receive.Play(); + } + else if (chatStage == 3) + { + await Task.Delay(2800); + history.AppendText("ThatDude: oh.." + Environment.NewLine); receive.Play(); + await Task.Delay(5500); + history.AppendText("ThatDude: lemme just check your ip quick to find out who ya are tho" + Environment.NewLine); receive.Play(); + } + else + { + await Task.Delay(3300); + history.AppendText("ThatDude: hold on, let me just check your ip real quick" + Environment.NewLine); receive.Play(); + } + await Task.Delay(5000); + history.AppendText("ThatDude: YES! ITS YOU!" + Environment.NewLine); receive.Play(); + await Task.Delay(3500); + history.AppendText("ThatDude: hey just wait a sec here" + Environment.NewLine); receive.Play(); + } + + private void button2_Click(object sender, EventArgs e) + { + string msg = typechat.Text; + if (typechat.Text != "") history.AppendText(TitleScreen.username + ": " + typechat.Text + Environment.NewLine); + typechat.Text = ""; send.Play(); + + switch (chatStage) + { + case 1: // td asks are you the time distorter guy + if (msg.Contains("yes") | msg.Contains("yea") | msg.Contains("yep") | msg.Contains("thats me") | msg.Contains("that's me")) chatStage = 2; + else if (msg.Contains("no") | msg.Contains("nope") | msg.Contains("not")) chatStage = 3; + else chatStage = 4; + + chatScript2(); + break; + } + } } } diff --git a/Histacom2/OS/Win98/Win98Apps/WebChat1999.resx b/Histacom2/OS/Win98/Win98Apps/WebChat1999.resx index 87bbfca..813f7c9 100644 --- a/Histacom2/OS/Win98/Win98Apps/WebChat1999.resx +++ b/Histacom2/OS/Win98/Win98Apps/WebChat1999.resx @@ -118,7 +118,8 @@ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <data name="textBox1.Text" xml:space="preserve"> - <value>If you do not agree to the following rules below DO NOT log into the chat: + <value> +If you do not agree to the following rules below DO NOT log into the chat: No Bullying No Swearing |
