Merge pull request #97 from Alex-TIMEHACK/master

A LOT of Tweaks - more to come
This commit is contained in:
Alex-TIMEHACK 2017-06-17 22:27:23 +01:00 committed by GitHub
commit 15f2e1a7e3
9 changed files with 65 additions and 63 deletions

View file

@ -61,7 +61,7 @@ public static string ProfileSettingsDirectory
{ {
get get
{ {
return Path.Combine(ProfileMyComputerDirectory, "Settings"); return Path.Combine(ProfileMyComputerDirectory, "Settings");
} }
} }
@ -69,13 +69,7 @@ public static string ProfileDocumentsDirectory
{ {
get get
{ {
if (CurrentSave.CurrentOS == "95") return Path.Combine(ProfileMyComputerDirectory, "Doc");
{
return Path.Combine(ProfileMyComputerDirectory, "Doc");
} else {
return Path.Combine(ProfileSettingsDirectory, "Doc");
}
} }
} }
@ -145,8 +139,8 @@ public static void CheckFiles()
SaveDirectoryInfo(ProfileFileSystemDirectory, false, "My Computer", false); SaveDirectoryInfo(ProfileFileSystemDirectory, false, "My Computer", false);
SaveDirectoryInfo(ProfileMyComputerDirectory, false, "Win95", true); SaveDirectoryInfo(ProfileMyComputerDirectory, false, "Win95", true);
SaveDirectoryInfo(ProfileDocumentsDirectory, false, "My Documents", true); if (CurrentSave.CurrentOS == "95") SaveDirectoryInfo(ProfileDocumentsDirectory, false, "My Documents", true);
SaveDirectoryInfo(ProfileSettingsDirectory, false, "Documents and Settings", true); if (CurrentSave.CurrentOS != "95") SaveDirectoryInfo(ProfileSettingsDirectory, false, "Documents and Settings", true);
SaveDirectoryInfo(ProfileProgramsDirectory, true, "Program Files", true); SaveDirectoryInfo(ProfileProgramsDirectory, true, "Program Files", true);
SaveDirectoryInfo(ProfileWindowsDirectory, true, "Windows", true); SaveDirectoryInfo(ProfileWindowsDirectory, true, "Windows", true);
} }

View file

@ -92,6 +92,7 @@ private void InitializeComponent()
this.windowManagerTestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.windowManagerTestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.downloaderTestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.downloaderTestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.installerTestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.installerTestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.storyTest1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.SettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ControlPanelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ControlPanelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.PrintersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.PrintersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -129,7 +130,6 @@ private void InitializeComponent()
this.BitmapImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.BitmapImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.MicrosoftDataLinkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.MicrosoftDataLinkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.PropertiesToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.PropertiesToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.storyTest1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.taskbar.SuspendLayout(); this.taskbar.SuspendLayout();
this.clockPanel.SuspendLayout(); this.clockPanel.SuspendLayout();
@ -778,6 +778,14 @@ private void InitializeComponent()
this.installerTestToolStripMenuItem.Text = "InstallerTest"; this.installerTestToolStripMenuItem.Text = "InstallerTest";
this.installerTestToolStripMenuItem.Click += new System.EventHandler(this.installerTestToolStripMenuItem_Click); this.installerTestToolStripMenuItem.Click += new System.EventHandler(this.installerTestToolStripMenuItem_Click);
// //
// storyTest1ToolStripMenuItem
//
this.storyTest1ToolStripMenuItem.BackgroundImage = global::TimeHACK.Properties.Resources.sliversilver;
this.storyTest1ToolStripMenuItem.Name = "storyTest1ToolStripMenuItem";
this.storyTest1ToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
this.storyTest1ToolStripMenuItem.Text = "StoryTest1";
this.storyTest1ToolStripMenuItem.Click += new System.EventHandler(this.storyTest1ToolStripMenuItem_Click);
//
// SettingsToolStripMenuItem // SettingsToolStripMenuItem
// //
this.SettingsToolStripMenuItem.BackColor = System.Drawing.Color.Silver; this.SettingsToolStripMenuItem.BackColor = System.Drawing.Color.Silver;
@ -1147,14 +1155,6 @@ private void InitializeComponent()
this.PropertiesToolStripMenuItem1.Size = new System.Drawing.Size(150, 22); this.PropertiesToolStripMenuItem1.Size = new System.Drawing.Size(150, 22);
this.PropertiesToolStripMenuItem1.Text = "Properties"; this.PropertiesToolStripMenuItem1.Text = "Properties";
// //
// storyTest1ToolStripMenuItem
//
this.storyTest1ToolStripMenuItem.BackgroundImage = global::TimeHACK.Properties.Resources.sliversilver;
this.storyTest1ToolStripMenuItem.Name = "storyTest1ToolStripMenuItem";
this.storyTest1ToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
this.storyTest1ToolStripMenuItem.Text = "StoryTest1";
this.storyTest1ToolStripMenuItem.Click += new System.EventHandler(this.storyTest1ToolStripMenuItem_Click);
//
// Windows95 // Windows95
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

View file

@ -109,12 +109,7 @@ private void startbutton_Click(object sender, EventArgs e)
// Shutdown button // Shutdown button
private void ShutdownToolStripMenuItem_Click(object sender, EventArgs e) private void ShutdownToolStripMenuItem_Click(object sender, EventArgs e)
{ {
startsound.Stop(); Program.ShutdownApplication(Properties.Resources.tada);
Stream audio = Properties.Resources.tada;
stopsound = new SoundPlayer(audio);
stopsound.Play();
System.Threading.Thread.Sleep(1500);
Application.Exit();
} }
#endregion //Region #endregion //Region
@ -343,11 +338,17 @@ private void WindowsExplorerToolStripMenuItem1_Click(object sender, EventArgs e)
private void storyTest1ToolStripMenuItem_Click(object sender, EventArgs e) private void storyTest1ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
Win95Apps.Story.Hack1 story = new Win95Apps.Story.Hack1(); Hack1.startObjective();
story.startObjective();
} }
private void temp_for_std(object sender, EventArgs e) private void temp_for_std(object sender, EventArgs e)
{
System.Threading.Thread thread = new System.Threading.Thread(StartSurviveTheDay);
thread.Start();
}
void StartSurviveTheDay()
{ {
Win2K.Win2KApps.SurviveTheDay std = new Win2K.Win2KApps.SurviveTheDay(); Win2K.Win2KApps.SurviveTheDay std = new Win2K.Win2KApps.SurviveTheDay();
WinClassic app = wm.startWin95(std, "Survive The Day", null, false, false); WinClassic app = wm.startWin95(std, "Survive The Day", null, false, false);

View file

@ -407,7 +407,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADq ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADq
ggAAAk1TRnQBSQFMAgEBDAEAAVgBAQFYAQEBIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA ggAAAk1TRnQBSQFMAgEBDAEAAWABAQFgAQEBIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA
AwABgAMAAQEBAAEgBwABAf8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A AwABgAMAAQEBAAEgBwABAf8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A
/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A /wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A
/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8AXAAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/x8AAf8DAAH/ /wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8AXAAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/x8AAf8DAAH/

View file

@ -12,41 +12,52 @@
namespace TimeHACK.OS.Win95.Win95Apps.Story namespace TimeHACK.OS.Win95.Win95Apps.Story
{ {
class Hack1 : NormalHack static class Hack1 : Object
{ {
WinClassicTerminal term = new WinClassicTerminal(); static WinClassicTerminal term = new WinClassicTerminal();
WindowManager wm = new WindowManager(); static WindowManager wm = new WindowManager();
static Boolean ended = false;
static Thread soundThread = new Thread(dialup_sound_play);
// This is the very first story script! // This is the very first story script!
public void startObjective() public static void startObjective()
{ {
Thread terminalThread = new Thread(main); System.Windows.Forms.Timer tmr = new System.Windows.Forms.Timer();
terminalThread.Start();
}
public void main()
{
wm.startWin95(term, "MS-DOS Prompt", null, true, true); wm.startWin95(term, "MS-DOS Prompt", null, true, true);
term.WriteLine("192.168.0.1 Connecting..."); term.WriteLine("192.168.0.1 Connecting...");
term.Invalidate(); term.Invalidate();
Application.DoEvents(); Application.DoEvents();
tmr.Interval = 1;
tmr.Tick += new EventHandler(CheckIfSoundFinished);
Thread soundThread = new Thread(dialup_sound_play);
soundThread.Start(); soundThread.Start();
soundThread.Join();
tmr.Start();
}
public static void continueObjective()
{
term.WriteLine("192.168.0.1 Connected."); term.WriteLine("192.168.0.1 Connected.");
Application.DoEvents(); 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; continueObjective();
while (!ended) { trm.Stop();
} }
} }
public void dialup_sound_play()
public static void dialup_sound_play()
{ {
SoundPlayer dialup_sound; SoundPlayer dialup_sound;
// Play Dial-up Sound // Play Dial-up Sound

View file

@ -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
{
}
}

View file

@ -60,8 +60,7 @@ private void goToSite(string url, bool back)
googlealpha.Show(); googlealpha.Show();
break; break;
case "www.12padams.com": case "www.12padams.com":
Story.Hack1 startStory = new Story.Hack1(); Win95Apps.Story.Hack1.startObjective();
startStory.startObjective();
hidePrograms(); hidePrograms();
break; break;
case "www.microsoft.com/internetexplorer4/welcome": case "www.microsoft.com/internetexplorer4/welcome":

View file

@ -17,6 +17,8 @@ namespace TimeHACK
{ {
static class Program static class Program
{ {
static System.Media.SoundPlayer stopsound;
internal static bool nightly = true; internal static bool nightly = true;
internal static string gameID; internal static string gameID;
internal static TitleScreen title = null; internal static TitleScreen title = null;
@ -87,5 +89,16 @@ public static String OpenFileExplorerAsDialogAndReturnGivenPath()
return ""; return "";
} }
} }
public static void ShutdownApplication(System.IO.UnmanagedMemoryStream audio)
{
System.IO.Stream audioPlay = audio;
stopsound = new System.Media.SoundPlayer(audioPlay);
stopsound.Play();
System.Threading.Thread.Sleep(1500);
Application.Exit();
}
} }
} }

View file

@ -129,7 +129,6 @@
<DependentUpon>SurviveTheDay.cs</DependentUpon> <DependentUpon>SurviveTheDay.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="OS\Win95\Win95Apps\Story\Hack1.cs" /> <Compile Include="OS\Win95\Win95Apps\Story\Hack1.cs" />
<Compile Include="OS\Win95\Win95Apps\Story\NormalHack.cs" />
<Compile Include="OS\Win95\Win95Apps\WinClassicFTPClient.cs"> <Compile Include="OS\Win95\Win95Apps\WinClassicFTPClient.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>