From 26a329838799fb728afcaeb76e39cc566682ff80 Mon Sep 17 00:00:00 2001 From: lempamo Date: Wed, 19 Apr 2017 09:39:33 -0400 Subject: only 1 instance of ie4 allowed --- TimeHACK.Main/OS/Win95/Win95.cs | 54 +++++++++++++-------- TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs | 10 ++++ TimeHACK.Main/bin/Release/TimeHACK.Engine.dll | Bin 165376 -> 165376 bytes TimeHACK.Main/bin/Release/TimeHACK.Engine.pdb | Bin 46592 -> 46592 bytes TimeHACK.Main/bin/Release/TimeHACK.application | 2 +- TimeHACK.Main/bin/Release/TimeHACK.exe | Bin 6128640 -> 6129152 bytes TimeHACK.Main/bin/Release/TimeHACK.exe.manifest | 6 +-- TimeHACK.Main/bin/Release/TimeHACK.pdb | Bin 136704 -> 136704 bytes .../bin/Release/TimeHACK.vshost.application | 2 +- .../bin/Release/TimeHACK.vshost.exe.manifest | 6 +-- TimeHACK.Main/bin/Release/app.publish/TimeHACK.exe | Bin 6128640 -> 6129152 bytes ...eHACK.Main.csprojResolveAssemblyReference.cache | Bin 16573 -> 16573 bytes TimeHACK.Main/obj/Release/TimeHACK.application | 2 +- TimeHACK.Main/obj/Release/TimeHACK.exe | Bin 6128640 -> 6129152 bytes TimeHACK.Main/obj/Release/TimeHACK.exe.manifest | 6 +-- TimeHACK.Main/obj/Release/TimeHACK.pdb | Bin 136704 -> 136704 bytes 16 files changed, 57 insertions(+), 31 deletions(-) (limited to 'TimeHACK.Main') diff --git a/TimeHACK.Main/OS/Win95/Win95.cs b/TimeHACK.Main/OS/Win95/Win95.cs index 00adbdb..fd09c2b 100644 --- a/TimeHACK.Main/OS/Win95/Win95.cs +++ b/TimeHACK.Main/OS/Win95/Win95.cs @@ -1,9 +1,11 @@ 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.OS.Win95.Win95Apps; using TimeHACK.WinClassicForms; @@ -15,6 +17,10 @@ namespace TimeHACK.OS.Win95 private SoundPlayer stopsound; public WindowManager wm = new WindowManager(); + public List nonimportantapps; + public WinClassic webchat; + public WinClassic ie; + public bool webchatInstalled = false; // Init the form @@ -56,14 +62,14 @@ namespace TimeHACK.OS.Win95 { 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, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.SettingsToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FindToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.HelpToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.RunToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.SuspendToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ShutdownToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.desktopicons.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, System.Drawing.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 @@ -142,9 +148,9 @@ namespace TimeHACK.OS.Win95 private void NotePadToolStripMenuItem_Click(object sender, EventArgs e) { - Win95Notepad npad = new Win95Notepad(); - Engine.Template.WinClassic app = wm.startWin95(npad, "Notepad", Properties.Resources.Win95IconNotepad, true, true); - app.BringToFront(); + nonimportantapps.Add(wm.startWin95(new Win95Notepad(), "Notepad", Properties.Resources.Win95IconNotepad, true, true)); + nonimportantapps[nonimportantapps.Count - 1].BringToFront(); + nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing); startmenu.Hide(); } private void windowManagerTestToolStripMenuItem_Click(object sender, EventArgs e) @@ -168,9 +174,10 @@ namespace TimeHACK.OS.Win95 private void InternetExplorerToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassicIE4 ie = new WinClassicIE4(); - Engine.Template.WinClassic app = wm.startWin95(ie, "Internet Explorer 4", (Image)resources.GetObject("InternetExplorerToolStripMenuItem.Image"), true, true); - app.BringToFront(); + 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", (Image)resources.GetObject("InternetExplorerToolStripMenuItem.Image"), true, true); + ie.BringToFront(); + ie.FormClosing += new FormClosingEventHandler(InternetExplorer4_Closing); startmenu.Hide(); } @@ -186,15 +193,16 @@ namespace TimeHACK.OS.Win95 { if (objListViewItem.Text == "Internet Explorer") { - WinClassicIE4 ie = new WinClassicIE4(); - Engine.Template.WinClassic app = wm.startWin95(ie, "Internet Explorer 4", (Image)resources.GetObject("InternetExplorerToolStripMenuItem.Image"), true, true); - app.BringToFront(); + 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", (Image)resources.GetObject("InternetExplorerToolStripMenuItem.Image"), true, true); + 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"; - Engine.Template.WinClassic app = wm.startWin95(inst, "Web Chat Setup", null, true, true); + WinClassic app = wm.startWin95(inst, "Web Chat Setup", null, true, true); app.BringToFront(); startmenu.Hide(); } @@ -209,10 +217,18 @@ namespace TimeHACK.OS.Win95 private void WebChatToolStripMenuItem_Click(object sender, EventArgs e) { WebChat1998 wc = new WebChat1998(); - Engine.Template.WinClassic app = wm.startWin95(wc, "Web Chat 1998", null, true, true); + WinClassic app = wm.startWin95(wc, "Web Chat 1998", null, true, true); app.BringToFront(); startmenu.Hide(); } + private void NonImportantApp_Closing(object sender, FormClosingEventArgs e) + { + nonimportantapps.Remove((WinClassic)sender); + } + private void InternetExplorer4_Closing(object sender, FormClosingEventArgs e) + { + ie = null; + } } } diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs index 1f00286..9cd4a5a 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs @@ -121,6 +121,16 @@ namespace TimeHACK.OS.Win95.Win95Apps 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; default: receive.Play(); break; diff --git a/TimeHACK.Main/bin/Release/TimeHACK.Engine.dll b/TimeHACK.Main/bin/Release/TimeHACK.Engine.dll index f5117fb..4e9a792 100644 Binary files a/TimeHACK.Main/bin/Release/TimeHACK.Engine.dll and b/TimeHACK.Main/bin/Release/TimeHACK.Engine.dll differ diff --git a/TimeHACK.Main/bin/Release/TimeHACK.Engine.pdb b/TimeHACK.Main/bin/Release/TimeHACK.Engine.pdb index 100b587..8bf7e12 100644 Binary files a/TimeHACK.Main/bin/Release/TimeHACK.Engine.pdb and b/TimeHACK.Main/bin/Release/TimeHACK.Engine.pdb differ diff --git a/TimeHACK.Main/bin/Release/TimeHACK.application b/TimeHACK.Main/bin/Release/TimeHACK.application index c014c7a..6a6fd19 100644 --- a/TimeHACK.Main/bin/Release/TimeHACK.application +++ b/TimeHACK.Main/bin/Release/TimeHACK.application @@ -14,7 +14,7 @@ - 280QjWVlYQjCBDxeMKnZhpfLYyCD8hQ252nxOzrnKz8= + m2hQhqqh7hpnGU6ZgJp6yYa3C85PFgRQ1h+UlTw4lFg= diff --git a/TimeHACK.Main/bin/Release/TimeHACK.exe b/TimeHACK.Main/bin/Release/TimeHACK.exe index 39b2aac..f1a2a33 100644 Binary files a/TimeHACK.Main/bin/Release/TimeHACK.exe and b/TimeHACK.Main/bin/Release/TimeHACK.exe differ diff --git a/TimeHACK.Main/bin/Release/TimeHACK.exe.manifest b/TimeHACK.Main/bin/Release/TimeHACK.exe.manifest index 8561823..206746e 100644 --- a/TimeHACK.Main/bin/Release/TimeHACK.exe.manifest +++ b/TimeHACK.Main/bin/Release/TimeHACK.exe.manifest @@ -56,14 +56,14 @@ - + - QnQUcSTfQVzISU/NuYJScvj2sxMdP7Iger7YDqQZ8+4= + W2v5olpmEdPyhq51XAzWLE5FSOI62ZDjJX87/wjXLrg= @@ -75,7 +75,7 @@ - 8lvNmgG2aw+p698BkPPiKQFjbo6S/6MYNtB4CWS1dZ8= + QiXM3ckJnXanHNCl8xpurth+KTNa010j7SOgpWCwbU0= diff --git a/TimeHACK.Main/bin/Release/TimeHACK.pdb b/TimeHACK.Main/bin/Release/TimeHACK.pdb index 0661141..dfaaa66 100644 Binary files a/TimeHACK.Main/bin/Release/TimeHACK.pdb and b/TimeHACK.Main/bin/Release/TimeHACK.pdb differ diff --git a/TimeHACK.Main/bin/Release/TimeHACK.vshost.application b/TimeHACK.Main/bin/Release/TimeHACK.vshost.application index c014c7a..6a6fd19 100644 --- a/TimeHACK.Main/bin/Release/TimeHACK.vshost.application +++ b/TimeHACK.Main/bin/Release/TimeHACK.vshost.application @@ -14,7 +14,7 @@ - 280QjWVlYQjCBDxeMKnZhpfLYyCD8hQ252nxOzrnKz8= + m2hQhqqh7hpnGU6ZgJp6yYa3C85PFgRQ1h+UlTw4lFg= diff --git a/TimeHACK.Main/bin/Release/TimeHACK.vshost.exe.manifest b/TimeHACK.Main/bin/Release/TimeHACK.vshost.exe.manifest index 8561823..206746e 100644 --- a/TimeHACK.Main/bin/Release/TimeHACK.vshost.exe.manifest +++ b/TimeHACK.Main/bin/Release/TimeHACK.vshost.exe.manifest @@ -56,14 +56,14 @@ - + - QnQUcSTfQVzISU/NuYJScvj2sxMdP7Iger7YDqQZ8+4= + W2v5olpmEdPyhq51XAzWLE5FSOI62ZDjJX87/wjXLrg= @@ -75,7 +75,7 @@ - 8lvNmgG2aw+p698BkPPiKQFjbo6S/6MYNtB4CWS1dZ8= + QiXM3ckJnXanHNCl8xpurth+KTNa010j7SOgpWCwbU0= diff --git a/TimeHACK.Main/bin/Release/app.publish/TimeHACK.exe b/TimeHACK.Main/bin/Release/app.publish/TimeHACK.exe index 39b2aac..f1a2a33 100644 Binary files a/TimeHACK.Main/bin/Release/app.publish/TimeHACK.exe and b/TimeHACK.Main/bin/Release/app.publish/TimeHACK.exe differ diff --git a/TimeHACK.Main/obj/Release/TimeHACK.Main.csprojResolveAssemblyReference.cache b/TimeHACK.Main/obj/Release/TimeHACK.Main.csprojResolveAssemblyReference.cache index c01182e..3cec800 100644 Binary files a/TimeHACK.Main/obj/Release/TimeHACK.Main.csprojResolveAssemblyReference.cache and b/TimeHACK.Main/obj/Release/TimeHACK.Main.csprojResolveAssemblyReference.cache differ diff --git a/TimeHACK.Main/obj/Release/TimeHACK.application b/TimeHACK.Main/obj/Release/TimeHACK.application index c014c7a..6a6fd19 100644 --- a/TimeHACK.Main/obj/Release/TimeHACK.application +++ b/TimeHACK.Main/obj/Release/TimeHACK.application @@ -14,7 +14,7 @@ - 280QjWVlYQjCBDxeMKnZhpfLYyCD8hQ252nxOzrnKz8= + m2hQhqqh7hpnGU6ZgJp6yYa3C85PFgRQ1h+UlTw4lFg= diff --git a/TimeHACK.Main/obj/Release/TimeHACK.exe b/TimeHACK.Main/obj/Release/TimeHACK.exe index 39b2aac..f1a2a33 100644 Binary files a/TimeHACK.Main/obj/Release/TimeHACK.exe and b/TimeHACK.Main/obj/Release/TimeHACK.exe differ diff --git a/TimeHACK.Main/obj/Release/TimeHACK.exe.manifest b/TimeHACK.Main/obj/Release/TimeHACK.exe.manifest index 8561823..206746e 100644 --- a/TimeHACK.Main/obj/Release/TimeHACK.exe.manifest +++ b/TimeHACK.Main/obj/Release/TimeHACK.exe.manifest @@ -56,14 +56,14 @@ - + - QnQUcSTfQVzISU/NuYJScvj2sxMdP7Iger7YDqQZ8+4= + W2v5olpmEdPyhq51XAzWLE5FSOI62ZDjJX87/wjXLrg= @@ -75,7 +75,7 @@ - 8lvNmgG2aw+p698BkPPiKQFjbo6S/6MYNtB4CWS1dZ8= + QiXM3ckJnXanHNCl8xpurth+KTNa010j7SOgpWCwbU0= diff --git a/TimeHACK.Main/obj/Release/TimeHACK.pdb b/TimeHACK.Main/obj/Release/TimeHACK.pdb index 0661141..dfaaa66 100644 Binary files a/TimeHACK.Main/obj/Release/TimeHACK.pdb and b/TimeHACK.Main/obj/Release/TimeHACK.pdb differ -- cgit v1.2.3