diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-06-17 22:25:33 +0100 |
|---|---|---|
| committer | Alex-TIMEHACK <[email protected]> | 2017-06-17 22:25:33 +0100 |
| commit | 2f9031e0ace7ddadec9c441551ccfecf80b6df28 (patch) | |
| tree | 552cfd401bdcacd216a82c8e61864ba32dd2708a /TimeHACK.Main/OS/Win95/Win95Apps | |
| parent | 17d94fdc1dd6d03e8a5f732f2fd5a632075cffe1 (diff) | |
| download | histacom2-2f9031e0ace7ddadec9c441551ccfecf80b6df28.tar.gz histacom2-2f9031e0ace7ddadec9c441551ccfecf80b6df28.tar.bz2 histacom2-2f9031e0ace7ddadec9c441551ccfecf80b6df28.zip | |
A LOT of tweaks - more to come
Diffstat (limited to 'TimeHACK.Main/OS/Win95/Win95Apps')
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs | 45 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/Story/NormalHack.cs | 15 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/WinClassicIE4.cs | 3 |
3 files changed, 29 insertions, 34 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs b/TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs index a8a1323..2310af4 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs @@ -12,41 +12,52 @@ 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 term = new WinClassicTerminal(); + static WindowManager wm = new WindowManager(); + static Boolean ended = false; + static Thread soundThread = new Thread(dialup_sound_play); // This is the very first story script! - public void startObjective() + public static void startObjective() { - Thread terminalThread = new Thread(main); - terminalThread.Start(); - } + System.Windows.Forms.Timer tmr = new System.Windows.Forms.Timer(); - public void main() - { wm.startWin95(term, "MS-DOS Prompt", null, true, true); term.WriteLine("192.168.0.1 Connecting..."); term.Invalidate(); - Application.DoEvents(); + Application.DoEvents(); + + tmr.Interval = 1; + tmr.Tick += new EventHandler(CheckIfSoundFinished); - Thread soundThread = new Thread(dialup_sound_play); soundThread.Start(); - soundThread.Join(); + tmr.Start(); + } + + public static void continueObjective() + { term.WriteLine("192.168.0.1 Connected."); Application.DoEvents(); + } + + public static void CheckIfSoundFinished(Object sender, EventArgs e) + { + if (soundThread.IsAlive == false) + { + // Continue from where we were + System.Windows.Forms.Timer trm = sender as System.Windows.Forms.Timer; - Boolean ended = false; - while (!ended) { + continueObjective(); + trm.Stop(); } } - public void dialup_sound_play() + + public static void dialup_sound_play() { SoundPlayer dialup_sound; // Play Dial-up Sound 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/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": |
