aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Main/OS/Win95/Win95Apps
diff options
context:
space:
mode:
Diffstat (limited to 'TimeHACK.Main/OS/Win95/Win95Apps')
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs77
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/Story/NormalHack.cs15
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs398
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WinClassicIE4.cs3
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.Designer.cs1
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs4
6 files changed, 265 insertions, 233 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs b/TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs
index 4a2c988..38962fe 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs
@@ -7,34 +7,81 @@ using System.Media;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
+using System.Windows.Forms;
using TimeHACK.Engine;
namespace TimeHACK.OS.Win95.Win95Apps.Story
{
- class Hack1 : NormalHack
+ static class Hack1 : Object
{
- WinClassicTerminal term = new WinClassicTerminal();
- WindowManager wm = new WindowManager();
-
-
+ static WinClassicTerminal Console = new WinClassicTerminal();
+ static WindowManager wm = new WindowManager();
+ static Boolean ended = false;
+ static Thread soundThread = new Thread(dialup_sound_play);
+ static Boolean devMode = true;
// This is the very first story script!
- public void startObjective()
+ public static void startObjective()
{
-
- wm.startWin95(term, "MS-DOS Prompt", null, true, true);
- term.WriteLine("192.168.0.1 Connecting...");
- Thread soundThread = new Thread(dialup_sound_play);
- soundThread.Start();
- soundThread.Join();
- term.WriteLine("192.168.0.1 Connected.");
+ System.Windows.Forms.Timer tmr = new System.Windows.Forms.Timer();
+
+ wm.startWin95(Console, "MS-DOS Prompt", null, true, true);
+ Console.WriteLine("telnet> 104.27.135.159 Connecting...");
+ tmr.Interval = 1;
+ tmr.Tick += new EventHandler(CheckIfSoundFinished);
+
+ if (devMode == true)
+ {
+ continueObjective();
+ }
+ else
+ {
+ soundThread.Start();
+ tmr.Start();
+ }
}
- public void dialup_sound_play()
+ public static void continueObjective()
+ {
+ Console.WriteLine("\ntelnet> 104.27.135.159 Connected.");
+ Thread.Sleep(2500);
+ Console.WriteLine("\ntelnet> 104.27.135.159 set hostname to 'TheHiddenHacker'.");
+ Thread.Sleep(2500);
+ Console.WriteLine("\nTheHiddenHacker> I see you have access to 12padams.com.");
+ Thread.Sleep(4500);
+ Console.WriteLine("\nTheHiddenHacker> Though it doesn't seem obvious, only a very limited amount of people can access the site.");
+ Thread.Sleep(6000);
+ Console.WriteLine("\nTheHiddenHacker> 12padams has a secret, and I need you to help me find it.");
+ Thread.Sleep(3500);
+ Console.WriteLine("\nTheHiddenHacker> I was snooping around his website, when he blacklisted my IP address.");
+ Thread.Sleep(4000);
+ Console.WriteLine("\nTheHiddenHacker> While I was serching, I noticed a file that I didn't have permission to download. I need you to get it for me.");
+ Thread.Sleep(6500);
+ Console.WriteLine("\nTheHiddenHacker> First, I'll need you to download an FTP client, avalible under the software section of 12padams' website.");
+ Thread.Sleep(5000);
+ Console.WriteLine("\nTheHiddenHacker> Once that's downloaded, You'll need to type in a Hostname, Username, and Password.");
+ Thread.Sleep(4500);
+ Console.WriteLine("\nTheHiddenHacker> The hostname is 172.68.119.42, and the username is most likely 12padams. I'm not too sure what the password is, however.");
+ Thread.Sleep(3500);
+ Console.WriteLine("\nTheHiddenHacker> You'll need to figure out where you can get the password. Try looking for any odd text on the website.");
+ }
+
+ public static void CheckIfSoundFinished(Object sender, EventArgs e)
{
- SoundPlayer dialup_sound;
+ if (soundThread.IsAlive == false)
+ {
+ // Continue from where we were
+ System.Windows.Forms.Timer trm = sender as System.Windows.Forms.Timer;
+ continueObjective();
+ trm.Stop();
+ }
+ }
+
+ public static void dialup_sound_play()
+ {
+ SoundPlayer dialup_sound;
// Play Dial-up Sound
Stream audio = Properties.Resources.modem_dial;
dialup_sound = new SoundPlayer(audio);
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/Story/NormalHack.cs b/TimeHACK.Main/OS/Win95/Win95Apps/Story/NormalHack.cs
deleted file mode 100644
index b5c63a6..0000000
--- a/TimeHACK.Main/OS/Win95/Win95Apps/Story/NormalHack.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace TimeHACK.OS.Win95.Win95Apps.Story
-{
- class NormalHack
- {
-
- }
-}
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs
index f191a77..5c18285 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs
@@ -1,199 +1,199 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-using TimeHACK.Engine;
-using System.Threading;
-using System.Media;
-using System.IO;
-using TimeHACK.Engine.Template;
-
-namespace TimeHACK.OS.Win95.Win95Apps
-{
- public partial class WebChat1998 : UserControl
- {
- int chat_index = 0;
- WindowManager wm = new WindowManager();
- MessageParser wcmp = new MessageParser();
- bool correctname = false;
- bool guessing = false;
-
- bool wimponclose = 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);
- SoundPlayer file = new SoundPlayer(Properties.Resources.AIMfile);
-
- BSODCreator bc = new BSODCreator();
- Win9XBSOD bsod = null;
- Win9XBSOD bsod2 = null;
-
- public WebChat1998()
- {
- InitializeComponent();
- bsod = bc.throw9XBSOD(false, BSODCreator.BSODCauses.WimpEnding);
- bsod2 = bc.throw9XBSOD(false, BSODCreator.BSODCauses.PiracyEnding);
- bsod.Hide();
- bsod2.Hide();
- }
- private void WebChat1998_Load(object sender, EventArgs e)
- {
- button5.Hide();
- button4.Hide();
- button3.Hide();
- label5.Hide();
- }
- private void Button1_Click(object sender, EventArgs e)
- {
- 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; }
- if (txtscreenname.Text == "SkyHigh" | txtscreenname.Text == "rain49" | txtscreenname.Text == "12padams") { wm.startInfobox95("Invalid Username", "That username is already taken.", Properties.Resources.Win95Warning); return; }
- ParentForm.AcceptButton = button2;
- TitleScreen.username = txtscreenname.Text;
- login.Hide();
- listBox1.Items.Add(TitleScreen.username);
- history.AppendText("System: " + TitleScreen.username + " has joined the chat." + Environment.NewLine);
- join.Play();
- Chat.Start();
- }
-
- private void Chat_Tick(object sender, EventArgs e)
- {
- if (!guessing)
- {
- history.AppendText(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();
- this.ParentForm.FormClosing += WebChatClosing;
- wimponclose = true;
- break;
- case "nameguess":
- typechat.Hide();
- button2.Hide();
- button3.Show();
- button4.Show();
- Chat.Stop();
- guessing = true;
- receive.Play();
- break;
- case "addrain":
- listBox1.Items.Add("rain49");
- join.Play();
- break;
- case "addfile":
- label5.Show();
- button5.Show();
- file.Play();
- break;
- case "addpadams":
- listBox1.Items.Add("12padams");
- join.Play();
- ((WinClassic)this.ParentForm).closeDisabled = true;
- TitleScreen.frm95.startbutton.Enabled = false;
- TitleScreen.frm95.startmenu.Hide();
- break;
- case "nostart":
- TitleScreen.frm95.startbutton.Hide();
- TitleScreen.frm95.startmenu.Hide();
- receive.Play();
- break;
- case "removerain":
- listBox1.Items.Remove("rain49");
- leave.Play();
- break;
- case "iconsded":
- TitleScreen.frm95.desktopicons.Enabled = false;
- receive.Play();
- break;
- case "taskbarded":
- TitleScreen.frm95.taskbar.Hide();
- receive.Play();
- break;
- case "iconsgone":
- TitleScreen.frm95.desktopicons.Hide();
- receive.Play();
- break;
- case "bigtext":
- history.Font = new Font("Arial", 12F, FontStyle.Regular, GraphicsUnit.Point, ((0)));
- ((WinClassic)this.ParentForm).maximizebutton.Enabled = false;
- ((WinClassic)this.ParentForm).WindowState = FormWindowState.Maximized;
- receive.Play();
- break;
- case "notopbar":
- ((WinClassic)this.ParentForm).programtopbar = null;
- receive.Play();
- break; // TODO: Finish WebChat 1998
- default:
- receive.Play();
- break;
- }
- if (TitleScreen.username == "devspeed") Chat.Interval = wcmp.GetMessageDelay(resources.GetString("convo"), chat_index) / 2;
- else Chat.Interval = wcmp.GetMessageDelay(resources.GetString("convo"), chat_index);
- }
- else
- {
- if (correctname)
- {
- history.AppendText("SkyHigh: yay you got it right!" + Environment.NewLine);
- }
- else
- {
- history.AppendText("SkyHigh: sorry, my name is actually bill" + Environment.NewLine);
- }
- guessing = false;
- receive.Play();
- Chat.Interval = wcmp.GetMessageDelay(resources.GetString("convo"), chat_index);
- }
- chat_index++;
- }
-
- private void WebChatClosing(object sender, FormClosingEventArgs e)
- {
- if (wimponclose)
- {
- bsod.FormClosing += new FormClosingEventHandler(Program.title.BSODRewind);
- bsod.Show();
- bsod.BringToFront();
- bsod2.Close();
- }
- }
-
- private void Button2_Click(object sender, EventArgs e)
- {
- if (typechat.Text != "") history.AppendText(TitleScreen.username + ": " + typechat.Text + Environment.NewLine);
- typechat.Text = "";
- send.Play();
- }
-
- private void Button3_Click(object sender, EventArgs e)
- {
- correctname = false;
- button2.Show();
- button3.Hide();
- button4.Hide();
- typechat.Show();
- Chat.Start();
- }
-
- private void Button4_Click(object sender, EventArgs e)
- {
- correctname = true;
- button2.Show();
- button3.Hide();
- button4.Hide();
- typechat.Show();
- Chat.Start();
- }
- }
-}
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using TimeHACK.Engine;
+using System.Threading;
+using System.Media;
+using System.IO;
+using TimeHACK.Engine.Template;
+
+namespace TimeHACK.OS.Win95.Win95Apps
+{
+ public partial class WebChat1998 : UserControl
+ {
+ int chat_index = 0;
+ WindowManager wm = new WindowManager();
+ MessageParser wcmp = new MessageParser();
+ bool correctname = false;
+ bool guessing = false;
+
+ bool wimponclose = 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);
+ SoundPlayer file = new SoundPlayer(Properties.Resources.AIMfile);
+
+ BSODCreator bc = new BSODCreator();
+ Win9XBSOD bsod = null;
+ Win9XBSOD bsod2 = null;
+
+ public WebChat1998()
+ {
+ InitializeComponent();
+ bsod = bc.throw9XBSOD(false, BSODCreator.BSODCauses.WimpEnding);
+ bsod2 = bc.throw9XBSOD(false, BSODCreator.BSODCauses.PiracyEnding);
+ bsod.Hide();
+ bsod2.Hide();
+ }
+ private void WebChat1998_Load(object sender, EventArgs e)
+ {
+ button5.Hide();
+ button4.Hide();
+ button3.Hide();
+ label5.Hide();
+ }
+ private void Button1_Click(object sender, EventArgs e)
+ {
+ 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; }
+ if (txtscreenname.Text == "SkyHigh" | txtscreenname.Text == "rain49" | txtscreenname.Text == "12padams") { wm.startInfobox95("Invalid Username", "That username is already taken.", Properties.Resources.Win95Warning); return; }
+ ParentForm.AcceptButton = button2;
+ TitleScreen.username = txtscreenname.Text;
+ login.Hide();
+ listBox1.Items.Add(TitleScreen.username);
+ history.AppendText("System: " + TitleScreen.username + " has joined the chat." + Environment.NewLine);
+ join.Play();
+ Chat.Start();
+ }
+
+ private void Chat_Tick(object sender, EventArgs e)
+ {
+ if (!guessing)
+ {
+ history.AppendText(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();
+ this.ParentForm.FormClosing += WebChatClosing;
+ wimponclose = true;
+ break;
+ case "nameguess":
+ typechat.Hide();
+ button2.Hide();
+ button3.Show();
+ button4.Show();
+ Chat.Stop();
+ guessing = true;
+ receive.Play();
+ break;
+ case "addrain":
+ listBox1.Items.Add("rain49");
+ join.Play();
+ break;
+ case "addfile":
+ label5.Show();
+ button5.Show();
+ file.Play();
+ break;
+ case "addpadams":
+ listBox1.Items.Add("12padams");
+ join.Play();
+ ((WinClassic)this.ParentForm).closeDisabled = true;
+ TitleScreen.frm95.startbutton.Enabled = false;
+ TitleScreen.frm95.startmenu.Hide();
+ break;
+ case "nostart":
+ TitleScreen.frm95.startbutton.Hide();
+ TitleScreen.frm95.startmenu.Hide();
+ receive.Play();
+ break;
+ case "removerain":
+ listBox1.Items.Remove("rain49");
+ leave.Play();
+ break;
+ case "iconsded":
+ TitleScreen.frm95.desktopicons.Enabled = false;
+ receive.Play();
+ break;
+ case "taskbarded":
+ TitleScreen.frm95.taskbar.Hide();
+ receive.Play();
+ break;
+ case "iconsgone":
+ TitleScreen.frm95.desktopicons.Hide();
+ receive.Play();
+ break;
+ case "bigtext":
+ history.Font = new Font("Arial", 12F, FontStyle.Regular, GraphicsUnit.Point, ((0)));
+ ((WinClassic)this.ParentForm).maximizebutton.Enabled = false;
+ ((WinClassic)this.ParentForm).WindowState = FormWindowState.Maximized;
+ receive.Play();
+ break;
+ case "notopbar":
+ ((WinClassic)this.ParentForm).programtopbar = null;
+ receive.Play();
+ break; // TODO: Finish WebChat 1998
+ default:
+ receive.Play();
+ break;
+ }
+ if (TitleScreen.username == "devspeed") Chat.Interval = wcmp.GetMessageDelay(resources.GetString("convo"), chat_index) / 2;
+ else Chat.Interval = wcmp.GetMessageDelay(resources.GetString("convo"), chat_index);
+ }
+ else
+ {
+ if (correctname)
+ {
+ history.AppendText("SkyHigh: yay you got it right!" + Environment.NewLine);
+ }
+ else
+ {
+ history.AppendText("SkyHigh: sorry, my name is actually bill" + Environment.NewLine);
+ }
+ guessing = false;
+ receive.Play();
+ Chat.Interval = wcmp.GetMessageDelay(resources.GetString("convo"), chat_index);
+ }
+ chat_index++;
+ }
+
+ private void WebChatClosing(object sender, FormClosingEventArgs e)
+ {
+ if (wimponclose)
+ {
+ bsod.FormClosing += new FormClosingEventHandler(Program.title.BSODRewind);
+ bsod.Show();
+ bsod.BringToFront();
+ bsod2.Close();
+ }
+ }
+
+ private void Button2_Click(object sender, EventArgs e)
+ {
+ if (typechat.Text != "") history.AppendText(TitleScreen.username + ": " + typechat.Text + Environment.NewLine);
+ typechat.Text = "";
+ send.Play();
+ }
+
+ private void Button3_Click(object sender, EventArgs e)
+ {
+ correctname = false;
+ button2.Show();
+ button3.Hide();
+ button4.Hide();
+ typechat.Show();
+ Chat.Start();
+ }
+
+ private void Button4_Click(object sender, EventArgs e)
+ {
+ correctname = true;
+ button2.Show();
+ button3.Hide();
+ button4.Hide();
+ typechat.Show();
+ Chat.Start();
+ }
+ }
+}
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicIE4.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicIE4.cs
index 97a0581..e3423a8 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicIE4.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicIE4.cs
@@ -60,8 +60,7 @@ namespace TimeHACK.OS.Win95.Win95Apps
googlealpha.Show();
break;
case "www.12padams.com":
- Story.Hack1 startStory = new Story.Hack1();
- startStory.startObjective();
+ Win95Apps.Story.Hack1.startObjective();
hidePrograms();
break;
case "www.microsoft.com/internetexplorer4/welcome":
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.Designer.cs
index d7e9781..ddae557 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.Designer.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.Designer.cs
@@ -35,6 +35,7 @@
//
this.richTextBox1.BackColor = System.Drawing.Color.Black;
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.richTextBox1.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.richTextBox1.ForeColor = System.Drawing.Color.White;
this.richTextBox1.Location = new System.Drawing.Point(0, 0);
this.richTextBox1.Name = "richTextBox1";
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs
index d25b409..174c5b4 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs
@@ -20,9 +20,7 @@ namespace TimeHACK.OS.Win95.Win95Apps
public WinClassicTerminal()
{
InitializeComponent();
- this.richTextBox1.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
}
- private SoundPlayer startsound;
/// <summary>
/// Write text to the Terminal and create a new line. Very similar to the Win32 Console.WriteLine Function.
/// </summary>
@@ -30,6 +28,7 @@ namespace TimeHACK.OS.Win95.Win95Apps
public void WriteLine(string Text)
{
richTextBox1.AppendText(Text + "\n");
+ richTextBox1.Update();
}
/// <summary>
@@ -39,6 +38,7 @@ namespace TimeHACK.OS.Win95.Win95Apps
public void Write(String Text)
{
richTextBox1.AppendText(Text);
+ richTextBox1.Update();
}
}
}