diff options
| author | lempamo <[email protected]> | 2017-06-20 17:21:27 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-06-20 17:21:27 -0400 |
| commit | fc728100a39bff88215b0b21602afbda9ff6b00b (patch) | |
| tree | 5d99edd1c5320dc47872a829306a02641577543c /TimeHACK.Main/OS/Win95 | |
| parent | e83df06641d130fb979b562ab74e284f5952c9e0 (diff) | |
| parent | ffc4a480f23e38d58a3b4c940e3045237835a342 (diff) | |
| download | histacom2-fc728100a39bff88215b0b21602afbda9ff6b00b.tar.gz histacom2-fc728100a39bff88215b0b21602afbda9ff6b00b.tar.bz2 histacom2-fc728100a39bff88215b0b21602afbda9ff6b00b.zip | |
Merge remote-tracking branch 'refs/remotes/TimeHACKDevs/master'
Diffstat (limited to 'TimeHACK.Main/OS/Win95')
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95.Designer.cs | 18 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95.cs | 735 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95.resx | 2 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs | 77 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/Story/NormalHack.cs | 15 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs | 398 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/WinClassicIE4.cs | 3 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.Designer.cs | 1 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs | 4 |
9 files changed, 643 insertions, 610 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95.Designer.cs b/TimeHACK.Main/OS/Win95/Win95.Designer.cs index 27749a2..5a35e3d 100644 --- a/TimeHACK.Main/OS/Win95/Win95.Designer.cs +++ b/TimeHACK.Main/OS/Win95/Win95.Designer.cs @@ -92,6 +92,7 @@ namespace TimeHACK.OS.Win95 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 @@ namespace TimeHACK.OS.Win95 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 @@ namespace TimeHACK.OS.Win95 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 @@ namespace TimeHACK.OS.Win95 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); diff --git a/TimeHACK.Main/OS/Win95/Win95.cs b/TimeHACK.Main/OS/Win95/Win95.cs index 155214e..bd706cb 100644 --- a/TimeHACK.Main/OS/Win95/Win95.cs +++ b/TimeHACK.Main/OS/Win95/Win95.cs @@ -1,367 +1,368 @@ -using System; -using System.Collections.Generic; -using System.Drawing; -using System.IO; -using System.Media; -using System.Windows.Forms; -using TimeHACK.Engine; -using TimeHACK.Engine.Template; -using TimeHACK.Engine.Template.Taskbars; -using TimeHACK.OS.Win95.Win95Apps; -using TimeHACK.WinClassicForms; -using TimeHACK.OS.Win95.Win95Apps.Story; - -namespace TimeHACK.OS.Win95 -{ - public partial class Windows95 : Form - { - private SoundPlayer startsound; - private SoundPlayer stopsound; - public WindowManager wm = new WindowManager(); - - public List<WinClassic> nonimportantapps = new List<WinClassic>(); - public WinClassic webchat; - public WinClassic ie; - public TaskBarController tb = new TaskBarController(); - - public int currentappcount = 0; - - public bool webchatInstalled = false; - - public bool hiddenpadamsFound = false; - - // Init the form - public Windows95() - { - InitializeComponent(); - } - - // When New Game is clicked in TitleScreen.cs - private void Desktop_Load(object sender, EventArgs e) - { - // Make Font Mandatory - fontLoad(); - - // Play Windows 95 Start Sound - Stream audio = Properties.Resources.Win95Start; - startsound = new SoundPlayer(audio); - startsound.Play(); - - // Hide the Startmenu - startmenu.Hide(); - - // Check for and set VM Mode - if (this.FormBorderStyle != FormBorderStyle.None) - { - this.Text = "TimeHACK - VM Mode"; - } - - // Start the ClockTimer - clockTimer.Start(); - - // Set the StartMenu seperator - startmenuitems.Items.Insert(6, new ToolStripSeparator()); - - //nonimportantapps.Capacity = 100; - this.SendToBack(); - - // Update the taskbar - UpdateTaskbar(); - - // Bring to this the front - this.BringToFront(); - } - - private void fontLoad() - { - this.taskbartime.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); - this.ProgramsToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); - this.DocumentsToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); - this.SettingsToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); - this.FindToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); - this.HelpToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); - this.RunToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); - this.SuspendToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); - this.ShutdownToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); - this.desktopicons.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); - } - - #region StartMenu - - // Paint StartMenu - private void startmenu_Paint(object sender, PaintEventArgs e) - { - // Paint the StartMenu - ControlPaint.DrawBorder(e.Graphics, startmenu.ClientRectangle, - SystemColors.ControlLightLight, 2, ButtonBorderStyle.Outset, - SystemColors.ControlLightLight, 2, ButtonBorderStyle.Outset, - SystemColors.ControlLightLight, 2, ButtonBorderStyle.Outset, - SystemColors.ControlLightLight, 2, ButtonBorderStyle.Outset); - } - - // StartButton Click - private void startbutton_Click(object sender, EventArgs e) - { - startmenu.Show(); - startmenu.BringToFront(); - } - - // 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(); - } - - #endregion //Region - - // When add new folder is clicked - private void FolderToolStripMenuItem_Click(object sender, EventArgs e) - { - desktopicons.Items.Add("New Folder"); - } - - // Give Year Code - NYI - private void taskbartime_Click(object sender, EventArgs e) - { - //TODO: Set Up Save System - } - - // Set the Clock - private void clockTimer_Tick(object sender, EventArgs e) - { - taskbartime.Text = DateTime.Now.ToString("h:mm tt"); - } - - // On Desktop MouseDown - private void desktop_mousedown(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Right) - { - rightclickbackproperties.Show(); - rightclickbackproperties.BringToFront(); - rightclickbackproperties.Location = MousePosition; - } - - // If - else if (e.Button == MouseButtons.Left) - { - rightclickbackproperties.Hide(); - startmenu.Hide(); - } - - else if (e.Button == MouseButtons.Middle) - { - rightclickbackproperties.Hide(); - } - } - - private void NotePadToolStripMenuItem_Click(object sender, EventArgs e) - { - WinClassicNotepad wp = new WinClassicNotepad(); - WinClassic app = wm.startWin95(wp, "Notepad", Properties.Resources.Win95IconNotepad, true, true); - AddTaskBarItem(app, app.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad); - - nonimportantapps.Add(app); - nonimportantapps[nonimportantapps.Count - 1].BringToFront(); - nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing); - - app.BringToFront(); - startmenu.Hide(); - } - private void windowManagerTestToolStripMenuItem_Click(object sender, EventArgs e) - { - TestApp test = new TestApp(); - WinClassic app = wm.startWin95(test, "TestApp", null, true, true); - AddTaskBarItem(app, app.Tag.ToString(), "TestApp", null); - app.BringToFront(); - startmenu.Hide(); - } - - private void downloaderTestToolStripMenuItem_Click(object sender, EventArgs e) - { - WinClassicDownloader opendownload = new WinClassicDownloader(); - WinClassic app = wm.startWin95(opendownload, "Downloader", null, false, true); - opendownload.appName.Text = "Downloading: Survive The Day"; - - AddTaskBarItem(app, app.Tag.ToString(), "Downloader", null); - - app.BringToFront(); - startmenu.Hide(); - } - - private void installerTestToolStripMenuItem_Click(object sender, EventArgs e) - { - WinClassicInstaller openinstaller = new WinClassicInstaller(); - WinClassic app = wm.startWin95(openinstaller, "Installer", null, false, true); - - AddTaskBarItem(app, app.Tag.ToString(), "Installer", null); - - app.BringToFront(); - startmenu.Hide(); - } - - private void InternetExplorerToolStripMenuItem_Click(object sender, EventArgs e) - { - if (ie != null) { wm.startInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", Properties.Resources.Win95Warning); return; } - ie = wm.startWin95(new WinClassicIE4(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); - AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); - ie.BringToFront(); - ie.FormClosing += new FormClosingEventHandler(InternetExplorer4_Closing); - startmenu.Hide(); - } - - private void desktopicons_Click(object sender, EventArgs e) - { - Point objDrawingPoint = desktopicons.PointToClient(Cursor.Position); - ListViewItem objListViewItem; - - if (objDrawingPoint != null) - { - objListViewItem = desktopicons.GetItemAt(objDrawingPoint.X, objDrawingPoint.Y); - if (objListViewItem != null) - { - if (objListViewItem.Text == "Internet Explorer") - { - if (ie != null) { wm.startInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", Properties.Resources.Win95Warning); return; } - ie = wm.startWin95(new WinClassicIE4(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); - AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); - ie.BringToFront(); - ie.FormClosing += new FormClosingEventHandler(InternetExplorer4_Closing); - startmenu.Hide(); - } else if (objListViewItem.Text == "Web Chat Setup") - { - WinClassicInstaller inst = new WinClassicInstaller(); - inst.installname.Text = "Web Chat 1998"; - WinClassic app = wm.startWin95(inst, "Web Chat Setup", null, true, true); - AddTaskBarItem(app, app.Tag.ToString(), "Web Chat Setup", null); - app.BringToFront(); - startmenu.Hide(); - } - } - } - } - - private void infoboxTestToolStripMenuItem_Click(object sender, EventArgs e) - { - WinClassic app = wm.startInfobox95("AShifter's Infobox", "This is the very first TimeHACK Infobox. It's really easy to call, too! \n Just use wm.startInfobox95(String title, String text, Image erroricon)!", Properties.Resources.Win95Info); - - app.BringToFront(); - startmenu.Hide(); - } - private void WebChatToolStripMenuItem_Click(object sender, EventArgs e) - { - WebChat1998 wc = new WebChat1998(); - WinClassic app = wm.startWin95(wc, "Web Chat 1998", null, true, true); - - AddTaskBarItem(app, app.Tag.ToString(), "Web Chat 1998", null); - - app.BringToFront(); - startmenu.Hide(); - } - public void NonImportantApp_Closing(object sender, FormClosingEventArgs e) - { - nonimportantapps.Remove((WinClassic)sender); - } - private void InternetExplorer4_Closing(object sender, FormClosingEventArgs e) - { - ie = null; - } - - private void WordPadToolStripMenuItem_Click(object sender, EventArgs e) - { - WinClassicWordPad wp = new WinClassicWordPad(); - WinClassic app = wm.startWin95(wp, "Wordpad", Properties.Resources.Win95IconWordpad, true, true); - AddTaskBarItem(app, app.Tag.ToString(), "Wordpad", Properties.Resources.Win95IconWordpad); - - nonimportantapps.Add(app); - nonimportantapps[nonimportantapps.Count - 1].BringToFront(); - nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing); - - app.BringToFront(); - startmenu.Hide(); - } - - public void AddTaskBarItem(Form Application, string ApplicationID, string ApplicationName, Image ApplicationIcon) - { - taskbarItems = tb.AddTaskbarItem95(ApplicationID, ApplicationName, ApplicationIcon, (UserControl)new Win95TaskBarItem(), taskbarItems); - Application.FormClosed += new FormClosedEventHandler(UpdateTaskbarFromClosedApplication); - } - - public void UpdateTaskbarFromClosedApplication(object sender, FormClosedEventArgs e) - { - UpdateTaskbar(); - } - - public void UpdateTaskbar() - { - // Clears out all the items on the taskbar - taskbarItems.Controls.Clear(); - - // Loops through all the Applications which are open - - foreach (Form form in tb.GetAllOpenApps()) - { - // Calls that "AddToTaskbar" thing - taskbarItems = tb.AddTaskbarItem95(form.Tag.ToString(), form.Text.ToString(), (Image)form.Icon.ToBitmap(), (UserControl)new Win95TaskBarItem(), taskbarItems); - } - } - - private void AddressBookToolStripMenuItem_Click(object sender, EventArgs e) - { - WinClassicAddressBook ab = new WinClassicAddressBook(); - WinClassic app = wm.startWin95(ab, "Address Book", Properties.Resources.WinClassicAddressBook, true, true); - AddTaskBarItem(app, app.Tag.ToString(), "Address Book", Properties.Resources.WinClassicAddressBook); - - nonimportantapps.Add(app); - nonimportantapps[nonimportantapps.Count - 1].BringToFront(); - nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing); - - app.BringToFront(); - startmenu.Hide(); - } - - private void WindowsExplorerToolStripMenuItem1_Click(object sender, EventArgs e) - { - FileDialogBoxManager.IsInOpenDialog = false; - FileDialogBoxManager.IsInSaveDialog = false; - WinClassicWindowsExplorer we = new WinClassicWindowsExplorer(); - WinClassic app = wm.startWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); - AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); - - nonimportantapps.Add(app); - nonimportantapps[nonimportantapps.Count - 1].BringToFront(); - nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing); - - app.BringToFront(); - startmenu.Hide(); - } - - private void storyTest1ToolStripMenuItem_Click(object sender, EventArgs e) - { - Win95Apps.Story.Hack1 story = new Win95Apps.Story.Hack1(); - story.startObjective(); - } - - private void temp_for_std(object sender, EventArgs e) - { - Win2K.Win2KApps.SurviveTheDay std = new Win2K.Win2KApps.SurviveTheDay(); - WinClassic app = wm.startWin95(std, "Survive The Day", null, false, false); - AddTaskBarItem(app, app.Tag.ToString(), "Survive The Day", null); - - nonimportantapps.Add(app); - nonimportantapps[nonimportantapps.Count - 1].BringToFront(); - nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing); - - app.BringToFront(); - startmenu.Hide(); - } - - //TODO: Add Outlook Express 4 - } -} - +using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.IO;
+using System.Media;
+using System.Windows.Forms;
+using TimeHACK.Engine;
+using TimeHACK.Engine.Template;
+using TimeHACK.Engine.Template.Taskbars;
+using TimeHACK.OS.Win95.Win95Apps;
+using TimeHACK.WinClassicForms;
+using TimeHACK.OS.Win95.Win95Apps.Story;
+
+namespace TimeHACK.OS.Win95
+{
+ public partial class Windows95 : Form
+ {
+ private SoundPlayer startsound;
+ private SoundPlayer stopsound;
+ public WindowManager wm = new WindowManager();
+
+ public List<WinClassic> nonimportantapps = new List<WinClassic>();
+ public WinClassic webchat;
+ public WinClassic ie;
+ public TaskBarController tb = new TaskBarController();
+
+ public int currentappcount = 0;
+
+ public bool webchatInstalled = false;
+
+ public bool hiddenpadamsFound = false;
+
+ // Init the form
+ public Windows95()
+ {
+ InitializeComponent();
+ }
+
+ // When New Game is clicked in TitleScreen.cs
+ private void Desktop_Load(object sender, EventArgs e)
+ {
+ // Make Font Mandatory
+ fontLoad();
+
+ // Play Windows 95 Start Sound
+ Stream audio = Properties.Resources.Win95Start;
+ startsound = new SoundPlayer(audio);
+ startsound.Play();
+
+ // Hide the Startmenu
+ startmenu.Hide();
+
+ // Check for and set VM Mode
+ if (this.FormBorderStyle != FormBorderStyle.None)
+ {
+ this.Text = "TimeHACK - VM Mode";
+ }
+
+ // Start the ClockTimer
+ clockTimer.Start();
+
+ // Set the StartMenu seperator
+ startmenuitems.Items.Insert(6, new ToolStripSeparator());
+
+ //nonimportantapps.Capacity = 100;
+ this.SendToBack();
+
+ // Update the taskbar
+ UpdateTaskbar();
+
+ // Bring to this the front
+ this.BringToFront();
+ }
+
+ private void fontLoad()
+ {
+ this.taskbartime.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ this.ProgramsToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ this.DocumentsToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ this.SettingsToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ this.FindToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ this.HelpToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ this.RunToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ this.SuspendToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ this.ShutdownToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ this.desktopicons.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ }
+
+ #region StartMenu
+
+ // Paint StartMenu
+ private void startmenu_Paint(object sender, PaintEventArgs e)
+ {
+ // Paint the StartMenu
+ ControlPaint.DrawBorder(e.Graphics, startmenu.ClientRectangle,
+ SystemColors.ControlLightLight, 2, ButtonBorderStyle.Outset,
+ SystemColors.ControlLightLight, 2, ButtonBorderStyle.Outset,
+ SystemColors.ControlLightLight, 2, ButtonBorderStyle.Outset,
+ SystemColors.ControlLightLight, 2, ButtonBorderStyle.Outset);
+ }
+
+ // StartButton Click
+ private void startbutton_Click(object sender, EventArgs e)
+ {
+ startmenu.Show();
+ startmenu.BringToFront();
+ }
+
+ // Shutdown button
+ private void ShutdownToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ Program.ShutdownApplication(Properties.Resources.tada);
+ }
+
+ #endregion //Region
+
+ // When add new folder is clicked
+ private void FolderToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ desktopicons.Items.Add("New Folder");
+ }
+
+ // Give Year Code - NYI
+ private void taskbartime_Click(object sender, EventArgs e)
+ {
+ //TODO: Set Up Save System
+ }
+
+ // Set the Clock
+ private void clockTimer_Tick(object sender, EventArgs e)
+ {
+ taskbartime.Text = DateTime.Now.ToString("h:mm tt");
+ }
+
+ // On Desktop MouseDown
+ private void desktop_mousedown(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Right)
+ {
+ rightclickbackproperties.Show();
+ rightclickbackproperties.BringToFront();
+ rightclickbackproperties.Location = MousePosition;
+ }
+
+ // If
+ else if (e.Button == MouseButtons.Left)
+ {
+ rightclickbackproperties.Hide();
+ startmenu.Hide();
+ }
+
+ else if (e.Button == MouseButtons.Middle)
+ {
+ rightclickbackproperties.Hide();
+ }
+ }
+
+ private void NotePadToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ WinClassicNotepad wp = new WinClassicNotepad();
+ WinClassic app = wm.startWin95(wp, "Notepad", Properties.Resources.Win95IconNotepad, true, true);
+ AddTaskBarItem(app, app.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad);
+
+ nonimportantapps.Add(app);
+ nonimportantapps[nonimportantapps.Count - 1].BringToFront();
+ nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
+
+ app.BringToFront();
+ startmenu.Hide();
+ }
+ private void windowManagerTestToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ TestApp test = new TestApp();
+ WinClassic app = wm.startWin95(test, "TestApp", null, true, true);
+ AddTaskBarItem(app, app.Tag.ToString(), "TestApp", null);
+ app.BringToFront();
+ startmenu.Hide();
+ }
+
+ private void downloaderTestToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ WinClassicDownloader opendownload = new WinClassicDownloader();
+ WinClassic app = wm.startWin95(opendownload, "Downloader", null, false, true);
+ opendownload.appName.Text = "Downloading: Survive The Day";
+
+ AddTaskBarItem(app, app.Tag.ToString(), "Downloader", null);
+
+ app.BringToFront();
+ startmenu.Hide();
+ }
+
+ private void installerTestToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ WinClassicInstaller openinstaller = new WinClassicInstaller();
+ WinClassic app = wm.startWin95(openinstaller, "Installer", null, false, true);
+
+ AddTaskBarItem(app, app.Tag.ToString(), "Installer", null);
+
+ app.BringToFront();
+ startmenu.Hide();
+ }
+
+ private void InternetExplorerToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ if (ie != null) { wm.startInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", Properties.Resources.Win95Warning); return; }
+ ie = wm.startWin95(new WinClassicIE4(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true);
+ AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4);
+ ie.BringToFront();
+ ie.FormClosing += new FormClosingEventHandler(InternetExplorer4_Closing);
+ startmenu.Hide();
+ }
+
+ private void desktopicons_Click(object sender, EventArgs e)
+ {
+ Point objDrawingPoint = desktopicons.PointToClient(Cursor.Position);
+ ListViewItem objListViewItem;
+
+ if (objDrawingPoint != null)
+ {
+ objListViewItem = desktopicons.GetItemAt(objDrawingPoint.X, objDrawingPoint.Y);
+ if (objListViewItem != null)
+ {
+ if (objListViewItem.Text == "Internet Explorer")
+ {
+ if (ie != null) { wm.startInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", Properties.Resources.Win95Warning); return; }
+ ie = wm.startWin95(new WinClassicIE4(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true);
+ AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4);
+ ie.BringToFront();
+ ie.FormClosing += new FormClosingEventHandler(InternetExplorer4_Closing);
+ startmenu.Hide();
+ } else if (objListViewItem.Text == "Web Chat Setup")
+ {
+ WinClassicInstaller inst = new WinClassicInstaller();
+ inst.installname.Text = "Web Chat 1998";
+ WinClassic app = wm.startWin95(inst, "Web Chat Setup", null, true, true);
+ AddTaskBarItem(app, app.Tag.ToString(), "Web Chat Setup", null);
+ app.BringToFront();
+ startmenu.Hide();
+ }
+ }
+ }
+ }
+
+ private void infoboxTestToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ WinClassic app = wm.startInfobox95("AShifter's Infobox", "This is the very first TimeHACK Infobox. It's really easy to call, too! \n Just use wm.startInfobox95(String title, String text, Image erroricon)!", Properties.Resources.Win95Info);
+
+ app.BringToFront();
+ startmenu.Hide();
+ }
+ private void WebChatToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ WebChat1998 wc = new WebChat1998();
+ WinClassic app = wm.startWin95(wc, "Web Chat 1998", null, true, true);
+
+ AddTaskBarItem(app, app.Tag.ToString(), "Web Chat 1998", null);
+
+ app.BringToFront();
+ startmenu.Hide();
+ }
+ public void NonImportantApp_Closing(object sender, FormClosingEventArgs e)
+ {
+ nonimportantapps.Remove((WinClassic)sender);
+ }
+ private void InternetExplorer4_Closing(object sender, FormClosingEventArgs e)
+ {
+ ie = null;
+ }
+
+ private void WordPadToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ WinClassicWordPad wp = new WinClassicWordPad();
+ WinClassic app = wm.startWin95(wp, "Wordpad", Properties.Resources.Win95IconWordpad, true, true);
+ AddTaskBarItem(app, app.Tag.ToString(), "Wordpad", Properties.Resources.Win95IconWordpad);
+
+ nonimportantapps.Add(app);
+ nonimportantapps[nonimportantapps.Count - 1].BringToFront();
+ nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
+
+ app.BringToFront();
+ startmenu.Hide();
+ }
+
+ public void AddTaskBarItem(Form Application, string ApplicationID, string ApplicationName, Image ApplicationIcon)
+ {
+ taskbarItems = tb.AddTaskbarItem95(ApplicationID, ApplicationName, ApplicationIcon, (UserControl)new Win95TaskBarItem(), taskbarItems);
+ Application.FormClosed += new FormClosedEventHandler(UpdateTaskbarFromClosedApplication);
+ }
+
+ public void UpdateTaskbarFromClosedApplication(object sender, FormClosedEventArgs e)
+ {
+ UpdateTaskbar();
+ }
+
+ public void UpdateTaskbar()
+ {
+ // Clears out all the items on the taskbar
+ taskbarItems.Controls.Clear();
+
+ // Loops through all the Applications which are open
+
+ foreach (Form form in tb.GetAllOpenApps())
+ {
+ // Calls that "AddToTaskbar" thing
+ taskbarItems = tb.AddTaskbarItem95(form.Tag.ToString(), form.Text.ToString(), (Image)form.Icon.ToBitmap(), (UserControl)new Win95TaskBarItem(), taskbarItems);
+ }
+ }
+
+ private void AddressBookToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ WinClassicAddressBook ab = new WinClassicAddressBook();
+ WinClassic app = wm.startWin95(ab, "Address Book", Properties.Resources.WinClassicAddressBook, true, true);
+ AddTaskBarItem(app, app.Tag.ToString(), "Address Book", Properties.Resources.WinClassicAddressBook);
+
+ nonimportantapps.Add(app);
+ nonimportantapps[nonimportantapps.Count - 1].BringToFront();
+ nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
+
+ app.BringToFront();
+ startmenu.Hide();
+ }
+
+ private void WindowsExplorerToolStripMenuItem1_Click(object sender, EventArgs e)
+ {
+ FileDialogBoxManager.IsInOpenDialog = false;
+ FileDialogBoxManager.IsInSaveDialog = false;
+ WinClassicWindowsExplorer we = new WinClassicWindowsExplorer();
+ WinClassic app = wm.startWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true);
+ AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer);
+
+ nonimportantapps.Add(app);
+ nonimportantapps[nonimportantapps.Count - 1].BringToFront();
+ nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
+
+ app.BringToFront();
+ startmenu.Hide();
+ }
+
+ private void storyTest1ToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ 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);
+ AddTaskBarItem(app, app.Tag.ToString(), "Survive The Day", null);
+
+ nonimportantapps.Add(app);
+ nonimportantapps[nonimportantapps.Count - 1].BringToFront();
+ nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
+
+ app.BringToFront();
+ startmenu.Hide();
+ }
+
+ //TODO: Add Outlook Express 4
+ }
+}
+
diff --git a/TimeHACK.Main/OS/Win95/Win95.resx b/TimeHACK.Main/OS/Win95/Win95.resx index 72d7350..38f1073 100644 --- a/TimeHACK.Main/OS/Win95/Win95.resx +++ b/TimeHACK.Main/OS/Win95/Win95.resx @@ -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/ 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(); } } } |
