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; using TimeHACK.OS; namespace TimeHACK.OS.Win95 { public partial class Windows95 : BaseOS { private SoundPlayer startsound; private SoundPlayer stopsound; public WindowManager wm = new WindowManager(); 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) { // Setup the Form startmenu.Hide(); // Make Font Mandatory fontLoad(); // Play Windows 95 Start Sound Stream audio = Properties.Resources.Win95Start; startsound = new SoundPlayer(audio); startsound.Play(); //Program.nonimportantapps.Capacity = 100; // 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 #endregion //Region // 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) { openApp.OpenApp("notepad"); 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) { openApp.OpenApp("ie4"); } 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(); } private void storyTest1ToolStripMenuItem_Click(object sender, EventArgs e) { Hack1.startObjective(); } //TODO: Add Outlook Express 4 } }