mirror of
https://github.com/HistacomUnity/Histacom2-old.git
synced 2025-01-22 09:02:01 -05:00
Merge pull request #97 from Alex-TIMEHACK/master
A LOT of Tweaks - more to come
This commit is contained in:
commit
15f2e1a7e3
9 changed files with 65 additions and 63 deletions
|
@ -61,7 +61,7 @@ public static string ProfileSettingsDirectory
|
|||
{
|
||||
get
|
||||
{
|
||||
return Path.Combine(ProfileMyComputerDirectory, "Settings");
|
||||
return Path.Combine(ProfileMyComputerDirectory, "Settings");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,13 +69,7 @@ public static string ProfileDocumentsDirectory
|
|||
{
|
||||
get
|
||||
{
|
||||
if (CurrentSave.CurrentOS == "95")
|
||||
{
|
||||
return Path.Combine(ProfileMyComputerDirectory, "Doc");
|
||||
} else {
|
||||
return Path.Combine(ProfileSettingsDirectory, "Doc");
|
||||
}
|
||||
|
||||
return Path.Combine(ProfileMyComputerDirectory, "Doc");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,8 +139,8 @@ public static void CheckFiles()
|
|||
|
||||
SaveDirectoryInfo(ProfileFileSystemDirectory, false, "My Computer", false);
|
||||
SaveDirectoryInfo(ProfileMyComputerDirectory, false, "Win95", true);
|
||||
SaveDirectoryInfo(ProfileDocumentsDirectory, false, "My Documents", true);
|
||||
SaveDirectoryInfo(ProfileSettingsDirectory, false, "Documents and Settings", true);
|
||||
if (CurrentSave.CurrentOS == "95") SaveDirectoryInfo(ProfileDocumentsDirectory, false, "My Documents", true);
|
||||
if (CurrentSave.CurrentOS != "95") SaveDirectoryInfo(ProfileSettingsDirectory, false, "Documents and Settings", true);
|
||||
SaveDirectoryInfo(ProfileProgramsDirectory, true, "Program Files", true);
|
||||
SaveDirectoryInfo(ProfileWindowsDirectory, true, "Windows", true);
|
||||
}
|
||||
|
|
18
TimeHACK.Main/OS/Win95/Win95.Designer.cs
generated
18
TimeHACK.Main/OS/Win95/Win95.Designer.cs
generated
|
@ -92,6 +92,7 @@ private void InitializeComponent()
|
|||
this.windowManagerTestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.downloaderTestToolStripMenuItem = 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.ControlPanelToolStripMenuItem = 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.MicrosoftDataLinkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.PropertiesToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.storyTest1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.panel1.SuspendLayout();
|
||||
this.taskbar.SuspendLayout();
|
||||
this.clockPanel.SuspendLayout();
|
||||
|
@ -778,6 +778,14 @@ private void InitializeComponent()
|
|||
this.installerTestToolStripMenuItem.Text = "InstallerTest";
|
||||
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
|
||||
//
|
||||
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.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
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
|
|
@ -109,12 +109,7 @@ private void startbutton_Click(object sender, EventArgs e)
|
|||
// Shutdown button
|
||||
private void ShutdownToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
startsound.Stop();
|
||||
Stream audio = Properties.Resources.tada;
|
||||
stopsound = new SoundPlayer(audio);
|
||||
stopsound.Play();
|
||||
System.Threading.Thread.Sleep(1500);
|
||||
Application.Exit();
|
||||
Program.ShutdownApplication(Properties.Resources.tada);
|
||||
}
|
||||
|
||||
#endregion //Region
|
||||
|
@ -343,11 +338,17 @@ private void WindowsExplorerToolStripMenuItem1_Click(object sender, EventArgs e)
|
|||
|
||||
private void storyTest1ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Win95Apps.Story.Hack1 story = new Win95Apps.Story.Hack1();
|
||||
story.startObjective();
|
||||
Hack1.startObjective();
|
||||
}
|
||||
|
||||
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();
|
||||
WinClassic app = wm.startWin95(std, "Survive The Day", null, false, false);
|
||||
|
|
|
@ -407,7 +407,7 @@
|
|||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADq
|
||||
ggAAAk1TRnQBSQFMAgEBDAEAAVgBAQFYAQEBIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA
|
||||
ggAAAk1TRnQBSQFMAgEBDAEAAWABAQFgAQEBIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA
|
||||
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/AP8AXAAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/x8AAf8DAAH/
|
||||
|
|
|
@ -12,41 +12,52 @@
|
|||
|
||||
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
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
||||
}
|
||||
}
|
|
@ -60,8 +60,7 @@ private void goToSite(string url, bool back)
|
|||
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":
|
||||
|
|
|
@ -17,6 +17,8 @@ namespace TimeHACK
|
|||
{
|
||||
static class Program
|
||||
{
|
||||
static System.Media.SoundPlayer stopsound;
|
||||
|
||||
internal static bool nightly = true;
|
||||
internal static string gameID;
|
||||
internal static TitleScreen title = null;
|
||||
|
@ -87,5 +89,16 @@ public static String OpenFileExplorerAsDialogAndReturnGivenPath()
|
|||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,7 +129,6 @@
|
|||
<DependentUpon>SurviveTheDay.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OS\Win95\Win95Apps\Story\Hack1.cs" />
|
||||
<Compile Include="OS\Win95\Win95Apps\Story\NormalHack.cs" />
|
||||
<Compile Include="OS\Win95\Win95Apps\WinClassicFTPClient.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
|
Loading…
Reference in a new issue