diff options
| author | FloppyDiskDrive <[email protected]> | 2017-09-05 20:15:30 -0500 |
|---|---|---|
| committer | FloppyDiskDrive <[email protected]> | 2017-09-05 20:15:30 -0500 |
| commit | 572117a8d2fe2e88ce72ecfbcf55598b02bddd62 (patch) | |
| tree | f83ea448f424208adce01937e141774909fdeb0f /Histacom2 | |
| parent | c51f7230320b9d59c7f49aeab1263242855496cc (diff) | |
| parent | 69d4465542fb00108576219d9c1da026f2e864b1 (diff) | |
| download | histacom2-572117a8d2fe2e88ce72ecfbcf55598b02bddd62.tar.gz histacom2-572117a8d2fe2e88ce72ecfbcf55598b02bddd62.tar.bz2 histacom2-572117a8d2fe2e88ce72ecfbcf55598b02bddd62.zip | |
Merge remote-tracking branch 'refs/remotes/Histacom2-Devs/master'
Diffstat (limited to 'Histacom2')
18 files changed, 214 insertions, 154 deletions
diff --git a/Histacom2/Histacom2.csproj b/Histacom2/Histacom2.csproj index 46750d2..34f8cd0 100644 --- a/Histacom2/Histacom2.csproj +++ b/Histacom2/Histacom2.csproj @@ -724,6 +724,9 @@ <Name>Histacom2.Engine</Name> </ProjectReference> </ItemGroup> + <ItemGroup> + <Folder Include="OS\WinXP\" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. diff --git a/Histacom2/OS/Win95/Win95.cs b/Histacom2/OS/Win95/Win95.cs index 8d2e466..25bc348 100644 --- a/Histacom2/OS/Win95/Win95.cs +++ b/Histacom2/OS/Win95/Win95.cs @@ -117,7 +117,7 @@ namespace Histacom2.OS.Win95 { CurrentSave.FTime95 = true; SaveGame(); - welcome = wm.StartWin95(new WinClassicWelcome(), "Welcome", null, false, false, resize: false); + welcome = wm.Init(new WinClassicWelcome(), "Welcome", null, false, false, resize: false); AddTaskBarItem(welcome, welcome.Tag.ToString(), "Welcome", null); nonimportantapps.Add(welcome); @@ -224,7 +224,7 @@ namespace Histacom2.OS.Win95 private void NotePadToolStripMenuItem_Click(object sender, EventArgs e) { WinClassicNotepad wp = new WinClassicNotepad(); - WinClassic app = wm.StartWin95(wp, "Notepad", Properties.Resources.Win95IconNotepad, true, true); + WinClassic app = wm.Init(wp, "Notepad", Properties.Resources.Win95IconNotepad, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad); nonimportantapps.Add(app); @@ -237,7 +237,7 @@ namespace Histacom2.OS.Win95 private void downloaderTestToolStripMenuItem_Click(object sender, EventArgs e) { WinClassicDownloader opendownload = new WinClassicDownloader(); - WinClassic app = wm.StartWin95(opendownload, "Downloader", null, false, true, resize: false); + WinClassic app = wm.Init(opendownload, "Downloader", null, false, true, resize: false); opendownload.appName.Text = "Downloading: Survive The Day"; AddTaskBarItem(app, app.Tag.ToString(), "Downloader", null); @@ -249,7 +249,7 @@ namespace Histacom2.OS.Win95 private void installerTestToolStripMenuItem_Click(object sender, EventArgs e) { Win95Installer openinstaller = new Win95Installer("Testing"); - WinClassic app = wm.StartWin95(openinstaller, "Installer", null, false, true, resize: false); + WinClassic app = wm.Init(openinstaller, "Installer", null, false, true, resize: false); AddTaskBarItem(app, app.Tag.ToString(), "Installer", null); @@ -260,7 +260,7 @@ namespace Histacom2.OS.Win95 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.", InfoboxType.Warning, InfoboxButtons.OK); return; } - ie = wm.StartWin95(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); + ie = wm.Init(new WinClassicIE3(), "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); @@ -280,7 +280,7 @@ namespace Histacom2.OS.Win95 if (objListViewItem.Text == "Internet Explorer") { if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } - ie = wm.StartWin95(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); + ie = wm.Init(new WinClassicIE3(), "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); @@ -288,7 +288,7 @@ namespace Histacom2.OS.Win95 } else if (objListViewItem.Text == "My Computer") // TODO: Implement slightly limited explorer (with no treeview and a new window each time ya go into a dir) { - WinClassic app = wm.StartWin95(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + WinClassic app = wm.Init(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); app.BringToFront(); startmenu.Hide(); @@ -324,7 +324,7 @@ namespace Histacom2.OS.Win95 { we.CurrentDirectory = objListViewItem.Tag.ToString(); - WinClassic app = wm.StartWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + WinClassic app = wm.Init(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); app.BringToFront(); startmenu.Hide(); @@ -350,7 +350,7 @@ namespace Histacom2.OS.Win95 } private void WebChatToolStripMenuItem_Click(object sender, EventArgs e) { - webchat = wm.StartWin95(new WebChat1998(), "Web Chat 1998", null, true, true); + webchat = wm.Init(new WebChat1998(), "Web Chat 1998", null, true, true); AddTaskBarItem(webchat, webchat.Tag.ToString(), "Web Chat 1998", null); @@ -369,7 +369,7 @@ namespace Histacom2.OS.Win95 private void WordPadToolStripMenuItem_Click(object sender, EventArgs e) { WinClassicWordPad wp = new WinClassicWordPad(); - WinClassic app = wm.StartWin95(wp, "Wordpad", Properties.Resources.Win95WordpadIcon2, true, true); + WinClassic app = wm.Init(wp, "Wordpad", Properties.Resources.Win95WordpadIcon2, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Wordpad", Properties.Resources.Win95WordpadIcon2); nonimportantapps.Add(app); @@ -410,7 +410,7 @@ namespace Histacom2.OS.Win95 FileDialogBoxManager.IsInOpenDialog = false; FileDialogBoxManager.IsInSaveDialog = false; Win95WindowsExplorer we = new Win95WindowsExplorer(); - WinClassic app = wm.StartWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + WinClassic app = wm.Init(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); nonimportantapps.Add(app); @@ -429,7 +429,7 @@ namespace Histacom2.OS.Win95 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); + WinClassic app = wm.Init(std, "Survive The Day", null, false, false); AddTaskBarItem(app, app.Tag.ToString(), "Survive The Day", null); nonimportantapps.Add(app); @@ -443,7 +443,7 @@ namespace Histacom2.OS.Win95 private void MSDOSPromptToolStripMenuItem1_Click (object sender, EventArgs e) { WinClassicTerminal msdos = new WinClassicTerminal(false); - WinClassic app = wm.StartWin95(msdos, "MS-DOS Prompt", Properties.Resources.MSDOSPromptToolStripMenuItem1_Image, true, true, false); + WinClassic app = wm.Init(msdos, "MS-DOS Prompt", Properties.Resources.MSDOSPromptToolStripMenuItem1_Image, true, true, false); AddTaskBarItem(app, app.Tag.ToString(), "MS-DOS Prompt", Properties.Resources.MSDOSPromptToolStripMenuItem1_Image); app.BringToFront(); @@ -453,7 +453,7 @@ namespace Histacom2.OS.Win95 private void PropertiesToolStripMenuItem1_Click(object sender, EventArgs e) { WinClassicThemePanel theme = new WinClassicThemePanel(); - WinClassic app = wm.StartWin95(theme, "Themes", null, false, true, false, resize: false); + WinClassic app = wm.Init(theme, "Themes", null, false, true, false, resize: false); AddTaskBarItem(app, app.Tag.ToString(), "Themes", null); app.BringToFront(); @@ -463,14 +463,14 @@ namespace Histacom2.OS.Win95 private void TimeDistorterToolStripMenuItem_Click(object sender, EventArgs e) { distort = new WinClassicTimeDistorter("1998", "1999", 150, Hack2.StartObjective); - WinClassic app = wm.StartWin95(distort, "Time Distorter", null, false, true); + WinClassic app = wm.Init(distort, "Time Distorter", null, false, true); AddTaskBarItem(app, app.Tag.ToString(), "Time Distorter", null); app.BringToFront(); startmenu.Hide(); } private void FTPClientToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassic app = wm.StartWin95(new WinClassicFTPClient(), "FTP Client", null, true, true); + WinClassic app = wm.Init(new WinClassicFTPClient(), "FTP Client", null, true, true); AddTaskBarItem(app, app.Tag.ToString(), "FTP Client", null); app.BringToFront(); @@ -479,7 +479,7 @@ namespace Histacom2.OS.Win95 private void CalculatorToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassic app = wm.StartWin95(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, false, false, resize: false); + WinClassic app = wm.Init(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, false, false, resize: false); AddTaskBarItem(app, app.Tag.ToString(), "Calculator", Properties.Resources.WinClassicCalc); nonimportantapps.Add(app); @@ -569,7 +569,7 @@ namespace Histacom2.OS.Win95 private void MinsweeperToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassic app = wm.StartWin95(new WinClassicMinesweeper(), "Minesweeper", Properties.Resources.WinClassicMinesweeper, false, false, false, false); + WinClassic app = wm.Init(new WinClassicMinesweeper(), "Minesweeper", Properties.Resources.WinClassicMinesweeper, false, false, false, false); AddTaskBarItem(app, app.Tag.ToString(), "Minesweeper", Properties.Resources.WinClassicMinesweeper); nonimportantapps.Add(app); @@ -596,7 +596,7 @@ namespace Histacom2.OS.Win95 private void GuessTheNumberToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassic app = wm.StartWin95(new GuessTheNumber(), "Guess The Number", Properties.Resources.WinClassicGTNIcon, false, false, false, false); + WinClassic app = wm.Init(new GuessTheNumber(), "Guess The Number", Properties.Resources.WinClassicGTNIcon, false, false, false, false); AddTaskBarItem(app, app.Tag.ToString(), "Guess The Number", Properties.Resources.WinClassicGTNIcon); nonimportantapps.Add(app); diff --git a/Histacom2/OS/Win95/Win95Apps/IE4Sites/12padams1998.cs b/Histacom2/OS/Win95/Win95Apps/IE4Sites/12padams1998.cs index be6ab95..bedfe56 100644 --- a/Histacom2/OS/Win95/Win95Apps/IE4Sites/12padams1998.cs +++ b/Histacom2/OS/Win95/Win95Apps/IE4Sites/12padams1998.cs @@ -30,7 +30,7 @@ namespace Histacom2.OS.Win95.Win95Apps.IE4Sites { WinClassicDownloader opendownload = new WinClassicDownloader(); WindowManager wm = new WindowManager(); - wm.StartWin95(opendownload, "Downloader", null, false, true); + wm.Init(opendownload, "Downloader", null, false, true); opendownload.appName.Text = "Downloading: FTP Client"; opendownload.amountToDL = 56; } @@ -39,7 +39,7 @@ namespace Histacom2.OS.Win95.Win95Apps.IE4Sites { WinClassicDownloader opendownload = new WinClassicDownloader(); WindowManager wm = new WindowManager(); - wm.StartWin95(opendownload, "Downloader", null, false, true); + wm.Init(opendownload, "Downloader", null, false, true); opendownload.appName.Text = "Downloading: Web Chat 1998"; opendownload.amountToDL = 35; } @@ -141,7 +141,7 @@ namespace Histacom2.OS.Win95.Win95Apps.IE4Sites { WinClassicDownloader opendownload = new WinClassicDownloader(); WindowManager wm = new WindowManager(); - wm.StartWin95(opendownload, "Downloader", null, false, true); + wm.Init(opendownload, "Downloader", null, false, true); opendownload.appName.Text = "Downloading: Guess The Number V1"; opendownload.amountToDL = 16; } diff --git a/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs b/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs index 9b6595c..2a03c7e 100644 --- a/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs +++ b/Histacom2/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs @@ -123,7 +123,7 @@ namespace Histacom2.OS.Win95.Win95Apps private void bestTimesToolStripMenuItem_Click(object sender, EventArgs e) { WindowManager wm = new WindowManager(); - wm.StartWin95(new MineBestTimes(), "Best Times", null, false, false, true, false); + wm.Init(new MineBestTimes(), "Best Times", null, false, false, true, false); } @@ -165,7 +165,7 @@ namespace Histacom2.OS.Win95.Win95Apps private void customToolStripMenuItem_Click(object sender, EventArgs e) { level = "custom"; - new WindowManager().StartWin95(new CustomMinefield(this), "Custom Field", null, false, false, true, false); + new WindowManager().Init(new CustomMinefield(this), "Custom Field", null, false, false, true, false); } } } diff --git a/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs b/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs index b988092..41f7c35 100644 --- a/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs +++ b/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs @@ -39,7 +39,7 @@ namespace Histacom2.OS.Win95.Win95Apps.Story public static async void ContinueObjective() { WinClassicTerminal Console = new WinClassicTerminal(true); - WinClassic app = wm.StartWin95(Console, "MS-DOS Prompt", null, true, true); + WinClassic app = wm.Init(Console, "MS-DOS Prompt", null, true, true); Console.WriteLine("telnet> 104.27.135.159 Connecting..."); await Task.Delay(2500); diff --git a/Histacom2/OS/Win95/Win95Apps/Story/Hack2.cs b/Histacom2/OS/Win95/Win95Apps/Story/Hack2.cs index b72c576..5f71ce4 100644 --- a/Histacom2/OS/Win95/Win95Apps/Story/Hack2.cs +++ b/Histacom2/OS/Win95/Win95Apps/Story/Hack2.cs @@ -17,7 +17,7 @@ namespace Histacom2.OS.Win95.Win95Apps.Story { WinClassicTerminal Console = new WinClassicTerminal(true); Random r = new Random(); - WinClassic app = wm.StartWin95(Console, "MS-DOS Prompt", null, true, true); + WinClassic app = wm.Init(Console, "MS-DOS Prompt", null, true, true); Console.WriteLine("telnet> 185.152.46.51 Connecting..."); await Task.Delay(2500); diff --git a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs index e16d79b..8939b84 100644 --- a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs +++ b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs @@ -67,7 +67,6 @@ // program // this.program.BackColor = System.Drawing.Color.Silver; - this.program.Controls.Add(this.pnlSave); this.program.Controls.Add(this.mainView); this.program.Controls.Add(this.diskView); this.program.Controls.Add(this.MenuStrip1); @@ -75,6 +74,7 @@ this.program.Controls.Add(this.bottomrightcorner); this.program.Controls.Add(this.bottomleftcorner); this.program.Controls.Add(this.topleftcorner); + this.program.Controls.Add(this.pnlSave); this.program.Dock = System.Windows.Forms.DockStyle.Fill; this.program.Location = new System.Drawing.Point(0, 0); this.program.Name = "program"; @@ -86,9 +86,10 @@ this.pnlSave.Controls.Add(this.Button1); this.pnlSave.Controls.Add(this.Label1); this.pnlSave.Controls.Add(this.txtSave); - this.pnlSave.Location = new System.Drawing.Point(3, 474); + this.pnlSave.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlSave.Location = new System.Drawing.Point(0, 482); this.pnlSave.Name = "pnlSave"; - this.pnlSave.Size = new System.Drawing.Size(850, 35); + this.pnlSave.Size = new System.Drawing.Size(704, 35); this.pnlSave.TabIndex = 18; this.pnlSave.Visible = false; // @@ -96,7 +97,7 @@ // this.Button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.Button1.Location = new System.Drawing.Point(608, 1); + this.Button1.Location = new System.Drawing.Point(629, 1); this.Button1.Name = "Button1"; this.Button1.Size = new System.Drawing.Size(75, 23); this.Button1.TabIndex = 17; @@ -119,17 +120,15 @@ | System.Windows.Forms.AnchorStyles.Right))); this.txtSave.Location = new System.Drawing.Point(60, 3); this.txtSave.Name = "txtSave"; - this.txtSave.Size = new System.Drawing.Size(542, 20); + this.txtSave.Size = new System.Drawing.Size(563, 20); this.txtSave.TabIndex = 15; // // mainView // - this.mainView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.mainView.Location = new System.Drawing.Point(215, 27); + this.mainView.Dock = System.Windows.Forms.DockStyle.Fill; + this.mainView.Location = new System.Drawing.Point(213, 24); this.mainView.Name = "mainView"; - this.mainView.Size = new System.Drawing.Size(486, 444); + this.mainView.Size = new System.Drawing.Size(491, 458); this.mainView.TabIndex = 10; this.mainView.UseCompatibleStateImageBehavior = false; this.mainView.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.mainView_AfterLabelEdit); @@ -137,12 +136,10 @@ // // diskView // - this.diskView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.diskView.Location = new System.Drawing.Point(3, 27); + this.diskView.Dock = System.Windows.Forms.DockStyle.Left; + this.diskView.Location = new System.Drawing.Point(0, 24); this.diskView.Name = "diskView"; - this.diskView.Size = new System.Drawing.Size(213, 444); + this.diskView.Size = new System.Drawing.Size(213, 458); this.diskView.TabIndex = 13; this.diskView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.diskView_AfterSelect); // diff --git a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs index d7a10a8..9c7e2a3 100644 --- a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs +++ b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.cs @@ -225,7 +225,7 @@ namespace Histacom2.OS.Win95.Win95Apps WinClassicNotepad np = new WinClassicNotepad(); np.mainText.Text = FileDialogBoxManager.ReadTextFile(fileDir); np.CurrentFilePath = fileDir; - WinClassic app = wm.StartWin95(np, "Notepad", Properties.Resources.Win95IconNotepad, true, true); + WinClassic app = wm.Init(np, "Notepad", Properties.Resources.Win95IconNotepad, true, true); Program.AddTaskbarItem(app, app.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad); break; @@ -233,7 +233,7 @@ namespace Histacom2.OS.Win95.Win95Apps WinClassicWordPad wp = new WinClassicWordPad(); wp.mainText.LoadFile(fileDir); wp.CurrentFilePath = fileDir; - WinClassic app2 = wm.StartWin95(wp, "Wordpad", Properties.Resources.Win95IconWordpad, true, true); + WinClassic app2 = wm.Init(wp, "Wordpad", Properties.Resources.Win95IconWordpad, true, true); Program.AddTaskbarItem(app2, app2.Tag.ToString(), "Wordpad", Properties.Resources.Win95IconWordpad); break; @@ -250,11 +250,11 @@ namespace Histacom2.OS.Win95.Win95Apps switch (appname.ToLower()) { case "explorer": - WinClassic app = wm.StartWin95(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + WinClassic app = wm.Init(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); Program.AddTaskbarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); break; case "calc": - WinClassic appCalc = wm.StartWin95(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, true, true); + WinClassic appCalc = wm.Init(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, true, true); Program.AddTaskbarItem(appCalc, appCalc.Tag.ToString(), "Calculator", Properties.Resources.WinClassicCalc); Program.nonimportantapps.Add(appCalc); @@ -263,7 +263,7 @@ namespace Histacom2.OS.Win95.Win95Apps break; case "notepad": - WinClassic appNP = wm.StartWin95(new WinClassicNotepad(), "Notepad", Properties.Resources.Win95IconNotepad_2, true, true); + WinClassic appNP = wm.Init(new WinClassicNotepad(), "Notepad", Properties.Resources.Win95IconNotepad_2, true, true); Program.AddTaskbarItem(appNP, appNP.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad_2); Program.nonimportantapps.Add(appNP); @@ -272,7 +272,7 @@ namespace Histacom2.OS.Win95.Win95Apps break; case "wordpad": - WinClassic appWP = wm.StartWin95(new WinClassicWordPad(), "Wordpad", Properties.Resources.Win95WordpadIcon2, true, true); + WinClassic appWP = wm.Init(new WinClassicWordPad(), "Wordpad", Properties.Resources.Win95WordpadIcon2, true, true); Program.AddTaskbarItem(appWP, appWP.Tag.ToString(), "Wordpad", Properties.Resources.Win95WordpadIcon2); Program.nonimportantapps.Add(appWP); @@ -282,7 +282,7 @@ namespace Histacom2.OS.Win95.Win95Apps break; case "ie": if (TitleScreen.frm95.ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } - TitleScreen.frm95.ie = wm.StartWin95(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); + TitleScreen.frm95.ie = wm.Init(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); Program.AddTaskbarItem(TitleScreen.frm95.ie, TitleScreen.frm95.ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); TitleScreen.frm95.ie.BringToFront(); TitleScreen.frm95.ie.FormClosing += new FormClosingEventHandler(TitleScreen.frm95.InternetExplorer4_Closing); @@ -291,7 +291,7 @@ namespace Histacom2.OS.Win95.Win95Apps case "web chat setup": Win95Installer inst = new Win95Installer("Web Chat 1998"); inst.InstallCompleted += (sendr, args) => TitleScreen.frm95.WebChatToolStripMenuItem.Visible = true; - WinClassic appInstaller = wm.StartWin95(inst, "Web Chat Setup", null, true, true); + WinClassic appInstaller = wm.Init(inst, "Web Chat Setup", null, true, true); Program.AddTaskbarItem(appInstaller, appInstaller.Tag.ToString(), "Web Chat Setup", null); appInstaller.BringToFront(); @@ -305,7 +305,7 @@ namespace Histacom2.OS.Win95.Win95Apps CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "12padams", "FTP Client"), "ftpclint.exe", "ftp client", 19, 58395); TitleScreen.frm95.FTPClientToolStripMenuItem.Visible = true; }; - WinClassic appFtp = wm.StartWin95(instFtp, "FTP Client Setup", null, true, true); + WinClassic appFtp = wm.Init(instFtp, "FTP Client Setup", null, true, true); Program.AddTaskbarItem(appFtp, appFtp.Tag.ToString(), "FTP Client Setup", null); appFtp.BringToFront(); @@ -319,7 +319,7 @@ namespace Histacom2.OS.Win95.Win95Apps CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "12padams", "Time Distorter 0.1"), "tdistort.exe", "time distorter", 17, 23895); TitleScreen.frm95.TimeDistorterToolStripMenuItem.Visible = true; }; - WinClassic appTd = wm.StartWin95(instTd, "Time Distorter Setup", null, true, true); + WinClassic appTd = wm.Init(instTd, "Time Distorter Setup", null, true, true); Program.AddTaskbarItem(appTd, appTd.Tag.ToString(), "Time Distorter Setup", null); appTd.BringToFront(); @@ -337,13 +337,13 @@ namespace Histacom2.OS.Win95.Win95Apps CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "12padams", "Guess The Number V1"), "guessnum.exe", "guess number", 18, 17483); TitleScreen.frm95.GuessTheNumberToolStripMenuItem.Visible = true; }; - WinClassic appGtn = wm.StartWin95(instGtn, "Guess The Number Setup", null, true, true); + WinClassic appGtn = wm.Init(instGtn, "Guess The Number Setup", null, true, true); Program.AddTaskbarItem(appGtn, appGtn.Tag.ToString(), "Guess The Number Setup", null); appGtn.BringToFront(); break; case "guess number": - WinClassic appGTN = wm.StartWin95(new GuessTheNumber(), "Guess The Number", Properties.Resources.WinClassicGTNIcon, false, true, false, false); + WinClassic appGTN = wm.Init(new GuessTheNumber(), "Guess The Number", Properties.Resources.WinClassicGTNIcon, false, true, false, false); Program.AddTaskbarItem(appGTN, appGTN.Tag.ToString(), "Guess The Number", Properties.Resources.WinClassicGTNIcon); Program.nonimportantapps.Add(appGTN); diff --git a/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs b/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs index 1488808..b6195ae 100644 --- a/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs +++ b/Histacom2/OS/Win95/Win95Apps/WinClassicFTPClient.cs @@ -88,14 +88,14 @@ namespace Histacom2.OS.Win95.Win95Apps { WinClassicDownloader opendownload = new WinClassicDownloader(); WindowManager wm = new WindowManager(); - wm.StartWin95(opendownload, "Downloader", null, false, true); + wm.Init(opendownload, "Downloader", null, false, true); opendownload.appName.Text = "Downloading: FTP Client"; } else if (objListViewItem.Text == "Web Chat Setup.exe") { WinClassicDownloader opendownload = new WinClassicDownloader(); WindowManager wm = new WindowManager(); - wm.StartWin95(opendownload, "Downloader", null, false, true); + wm.Init(opendownload, "Downloader", null, false, true); opendownload.appName.Text = "Downloading: Web Chat 1998"; opendownload.amountToDL = 35; } @@ -103,14 +103,14 @@ namespace Histacom2.OS.Win95.Win95Apps { WinClassicDownloader opendownload = new WinClassicDownloader(); WindowManager wm = new WindowManager(); - wm.StartWin95(opendownload, "Downloader", null, false, true); + wm.Init(opendownload, "Downloader", null, false, true); opendownload.appName.Text = "Downloading: Time Distorter 0.1"; } else if (objListViewItem.Text == "Guess The Number V1 Setup.exe") { WinClassicDownloader opendownload = new WinClassicDownloader(); WindowManager wm = new WindowManager(); - wm.StartWin95(opendownload, "Downloader", null, false, true); + wm.Init(opendownload, "Downloader", null, false, true); opendownload.appName.Text = "Downloading: Guess The Number V1"; opendownload.amountToDL = 16; } diff --git a/Histacom2/OS/Win98/Win98.cs b/Histacom2/OS/Win98/Win98.cs index 146aa3c..a21b144 100644 --- a/Histacom2/OS/Win98/Win98.cs +++ b/Histacom2/OS/Win98/Win98.cs @@ -206,7 +206,7 @@ namespace Histacom2.OS.Win98 private void NotePadToolStripMenuItem_Click(object sender, EventArgs e) { WinClassicNotepad wp = new WinClassicNotepad(); - WinClassic app = wm.StartWin95(wp, "Notepad", Properties.Resources.Win95IconNotepad, true, true); + WinClassic app = wm.Init(wp, "Notepad", Properties.Resources.Win95IconNotepad, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad); nonimportantapps.Add(app); @@ -219,7 +219,7 @@ namespace Histacom2.OS.Win98 private void downloaderTestToolStripMenuItem_Click(object sender, EventArgs e) { WinClassicDownloader opendownload = new WinClassicDownloader(); - WinClassic app = wm.StartWin95(opendownload, "Downloader", null, false, true); + WinClassic app = wm.Init(opendownload, "Downloader", null, false, true); opendownload.appName.Text = "Downloading: Survive The Day"; AddTaskBarItem(app, app.Tag.ToString(), "Downloader", null); @@ -231,7 +231,7 @@ namespace Histacom2.OS.Win98 private void installerTestToolStripMenuItem_Click(object sender, EventArgs e) { Win95Installer openinstaller = new Win95Installer("Testing"); - WinClassic app = wm.StartWin95(openinstaller, "Installer", null, false, true); + WinClassic app = wm.Init(openinstaller, "Installer", null, false, true); AddTaskBarItem(app, app.Tag.ToString(), "Installer", null); @@ -242,7 +242,7 @@ namespace Histacom2.OS.Win98 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.", InfoboxType.Warning, InfoboxButtons.OK); return; } - ie = wm.StartWin95(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); + ie = wm.Init(new WinClassicIE3(), "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); @@ -262,7 +262,7 @@ namespace Histacom2.OS.Win98 if (objListViewItem.Text == "Internet Explorer") { if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } - ie = wm.StartWin95(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); + ie = wm.Init(new WinClassicIE3(), "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); @@ -270,7 +270,7 @@ namespace Histacom2.OS.Win98 } else if (objListViewItem.Text == "My Computer") { - WinClassic app = wm.StartWin95(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + WinClassic app = wm.Init(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); app.BringToFront(); startmenu.Hide(); @@ -309,7 +309,7 @@ namespace Histacom2.OS.Win98 { we.CurrentDirectory = objListViewItem.Tag.ToString(); - WinClassic app = wm.StartWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + WinClassic app = wm.Init(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); app.BringToFront(); startmenu.Hide(); @@ -336,7 +336,7 @@ namespace Histacom2.OS.Win98 private void WebChatToolStripMenuItem_Click(object sender, EventArgs e) { WebChat1998 wc = new WebChat1998(); - WinClassic app = wm.StartWin95(wc, "Web Chat 1998", null, true, true); + WinClassic app = wm.Init(wc, "Web Chat 1998", null, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Web Chat 1998", null); @@ -355,7 +355,7 @@ namespace Histacom2.OS.Win98 private void WordPadToolStripMenuItem_Click(object sender, EventArgs e) { WinClassicWordPad wp = new WinClassicWordPad(); - WinClassic app = wm.StartWin95(wp, "Wordpad", Properties.Resources.Win95IconWordpad, true, true); + WinClassic app = wm.Init(wp, "Wordpad", Properties.Resources.Win95IconWordpad, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Wordpad", Properties.Resources.Win95IconWordpad); nonimportantapps.Add(app); @@ -394,7 +394,7 @@ namespace Histacom2.OS.Win98 private void AddressBookToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassic app = wm.StartWin95(new WinClassicAddressBook(), "Address Book", Properties.Resources.WinClassicAddressBook, true, true); + WinClassic app = wm.Init(new WinClassicAddressBook(), "Address Book", Properties.Resources.WinClassicAddressBook, true, true); Program.AddTaskbarItem(app, app.Tag.ToString(), "Address Book", Properties.Resources.WinClassicAddressBook); Program.nonimportantapps.Add(app); @@ -408,7 +408,7 @@ namespace Histacom2.OS.Win98 { FileDialogBoxManager.IsInOpenDialog = false; FileDialogBoxManager.IsInSaveDialog = false; - WinClassic app = wm.StartWin95(new WinClassicWindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + WinClassic app = wm.Init(new WinClassicWindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); nonimportantapps.Add(app); @@ -427,7 +427,7 @@ namespace Histacom2.OS.Win98 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); + WinClassic app = wm.Init(std, "Survive The Day", null, false, false); AddTaskBarItem(app, app.Tag.ToString(), "Survive The Day", null); nonimportantapps.Add(app); @@ -441,7 +441,7 @@ namespace Histacom2.OS.Win98 private void MSDOSPromptToolStripMenuItem1_Click(object sender, EventArgs e) { WinClassicTerminal msdos = new WinClassicTerminal(false); - WinClassic app = wm.StartWin95(msdos, "MS-DOS Prompt", Properties.Resources.MSDOSPromptToolStripMenuItem1_Image, true, true, false); + WinClassic app = wm.Init(msdos, "MS-DOS Prompt", Properties.Resources.MSDOSPromptToolStripMenuItem1_Image, true, true, false); AddTaskBarItem(app, app.Tag.ToString(), "MS-DOS Prompt", Properties.Resources.MSDOSPromptToolStripMenuItem1_Image); app.BringToFront(); @@ -451,7 +451,7 @@ namespace Histacom2.OS.Win98 private void PropertiesToolStripMenuItem1_Click(object sender, EventArgs e) { WinClassicThemePanel theme = new WinClassicThemePanel(); - WinClassic app = wm.StartWin95(theme, "Themes", null, false, true, false); + WinClassic app = wm.Init(theme, "Themes", null, false, true, false); AddTaskBarItem(app, app.Tag.ToString(), "Themes", null); app.BringToFront(); @@ -469,7 +469,7 @@ namespace Histacom2.OS.Win98 private void FTPClientToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassic app = wm.StartWin95(new WinClassicFTPClient(), "FTP Client", null, true, true); + WinClassic app = wm.Init(new WinClassicFTPClient(), "FTP Client", null, true, true); AddTaskBarItem(app, app.Tag.ToString(), "FTP Client", null); app.BringToFront(); @@ -478,7 +478,7 @@ namespace Histacom2.OS.Win98 private void CalculatorToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassic app = wm.StartWin95(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, false, false); + WinClassic app = wm.Init(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, false, false); AddTaskBarItem(app, app.Tag.ToString(), "Calculator", Properties.Resources.WinClassicCalc); nonimportantapps.Add(app); diff --git a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs index e6f1176..ccd22f0 100644 --- a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs +++ b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs @@ -123,7 +123,7 @@ namespace Histacom2.OS.Win95.Win95Apps void NewFolder() { FRMWinClassicAddressBookNewFolder abnf = new FRMWinClassicAddressBookNewFolder(); - WinClassic app = wm.StartWin95(abnf, "Address Book - New Folder", Properties.Resources.Win95IconWordpad, true, true, true); + WinClassic app = wm.Init(abnf, "Address Book - New Folder", Properties.Resources.Win95IconWordpad, true, true, true); if (treeView1.SelectedNode != null) { @@ -146,7 +146,7 @@ namespace Histacom2.OS.Win95.Win95Apps void NewContact() { FRMWinClassicAddressBookNewContact abnc = new FRMWinClassicAddressBookNewContact(); - WinClassic app = wm.StartWin95(abnc, "Address Book - New Contact", Properties.Resources.Win95IconWordpad, true, true, true); + WinClassic app = wm.Init(abnc, "Address Book - New Contact", Properties.Resources.Win95IconWordpad, true, true, true); if (treeView1.SelectedNode != null) { @@ -189,7 +189,7 @@ namespace Histacom2.OS.Win95.Win95Apps } } } - WinClassic app = wm.StartWin95(abnc, "Address Book - Contact Properties", Properties.Resources.Win95IconWordpad, true, true, true); + WinClassic app = wm.Init(abnc, "Address Book - Contact Properties", Properties.Resources.Win95IconWordpad, true, true, true); if (treeView1.SelectedNode != null) { diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs index 25d29fd..af2570c 100644 --- a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs +++ b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs @@ -337,7 +337,7 @@ // // Button1 // - this.Button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.Button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.Button1.Location = new System.Drawing.Point(626, 3); this.Button1.Name = "Button1"; diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs index 8fbe14c..936d89e 100644 --- a/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs +++ b/Histacom2/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs @@ -244,7 +244,7 @@ namespace Histacom2.OS.Win95.Win95Apps WinClassicNotepad np = new WinClassicNotepad(); np.mainText.Text = FileDialogBoxManager.ReadTextFile(fileDir); np.CurrentFilePath = fileDir; - WinClassic app = wm.StartWin95(np, "Notepad", Properties.Resources.Win95IconNotepad, true, true); + WinClassic app = wm.Init(np, "Notepad", Properties.Resources.Win95IconNotepad, true, true); Program.AddTaskbarItem(app, app.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad); break; @@ -252,7 +252,7 @@ namespace Histacom2.OS.Win95.Win95Apps WinClassicWordPad wp = new WinClassicWordPad(); wp.mainText.LoadFile(fileDir); wp.CurrentFilePath = fileDir; - WinClassic app2 = wm.StartWin95(wp, "Wordpad", Properties.Resources.Win95IconWordpad, true, true); + WinClassic app2 = wm.Init(wp, "Wordpad", Properties.Resources.Win95IconWordpad, true, true); Program.AddTaskbarItem(app2, app2.Tag.ToString(), "Wordpad", Properties.Resources.Win95IconWordpad); break; @@ -272,11 +272,11 @@ namespace Histacom2.OS.Win95.Win95Apps switch (appname.ToLower()) { case "explorer": - WinClassic app = wm.StartWin95(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + WinClassic app = wm.Init(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); Program.AddTaskbarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); break; case "calc": - WinClassic appCalc = wm.StartWin95(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, true, true); + WinClassic appCalc = wm.Init(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, true, true); Program.AddTaskbarItem(appCalc, appCalc.Tag.ToString(), "Calculator", Properties.Resources.WinClassicCalc); Program.nonimportantapps.Add(appCalc); @@ -285,7 +285,7 @@ namespace Histacom2.OS.Win95.Win95Apps break; case "notepad": - WinClassic appNP = wm.StartWin95(new WinClassicNotepad(), "Notepad", Properties.Resources.Win95IconNotepad_2, true, true); + WinClassic appNP = wm.Init(new WinClassicNotepad(), "Notepad", Properties.Resources.Win95IconNotepad_2, true, true); Program.AddTaskbarItem(appNP, appNP.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad_2); Program.nonimportantapps.Add(appNP); @@ -294,7 +294,7 @@ namespace Histacom2.OS.Win95.Win95Apps break; case "wordpad": - WinClassic appWP = wm.StartWin95(new WinClassicWordPad(), "Wordpad", Properties.Resources.Win95WordpadIcon2, true, true); + WinClassic appWP = wm.Init(new WinClassicWordPad(), "Wordpad", Properties.Resources.Win95WordpadIcon2, true, true); Program.AddTaskbarItem(appWP, appWP.Tag.ToString(), "Wordpad", Properties.Resources.Win95WordpadIcon2); Program.nonimportantapps.Add(appWP); @@ -304,7 +304,7 @@ namespace Histacom2.OS.Win95.Win95Apps break; case "ie": if (TitleScreen.frm95.ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } - TitleScreen.frm95.ie = wm.StartWin95(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); + TitleScreen.frm95.ie = wm.Init(new WinClassicIE3(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); Program.AddTaskbarItem(TitleScreen.frm95.ie, TitleScreen.frm95.ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); TitleScreen.frm95.ie.BringToFront(); TitleScreen.frm95.ie.FormClosing += new FormClosingEventHandler(TitleScreen.frm95.InternetExplorer4_Closing); @@ -313,7 +313,7 @@ namespace Histacom2.OS.Win95.Win95Apps case "web chat setup": Win95Installer inst = new Win95Installer("Web Chat 1998"); inst.InstallCompleted += (sendr, args) => TitleScreen.frm95.WebChatToolStripMenuItem.Visible = true; - WinClassic appInstaller = wm.StartWin95(inst, "Web Chat Setup", null, true, true); + WinClassic appInstaller = wm.Init(inst, "Web Chat Setup", null, true, true); Program.AddTaskbarItem(appInstaller, appInstaller.Tag.ToString(), "Web Chat Setup", null); appInstaller.BringToFront(); @@ -321,7 +321,7 @@ namespace Histacom2.OS.Win95.Win95Apps case "ftp client setup": Win95Installer instFtp = new Win95Installer("FTP Client"); instFtp.InstallCompleted += (sendr, args) => TitleScreen.frm95.FTPClientToolStripMenuItem.Visible = true; - WinClassic appFtp = wm.StartWin95(instFtp, "FTP Client Setup", null, true, true); + WinClassic appFtp = wm.Init(instFtp, "FTP Client Setup", null, true, true); Program.AddTaskbarItem(appFtp, appFtp.Tag.ToString(), "FTP Client Setup", null); appFtp.BringToFront(); @@ -332,7 +332,7 @@ namespace Histacom2.OS.Win95.Win95Apps { TitleScreen.frm95.TimeDistorterToolStripMenuItem.Visible = true; }; - WinClassic appTd = wm.StartWin95(instTd, "Time Distorter Setup", null, true, true); + WinClassic appTd = wm.Init(instTd, "Time Distorter Setup", null, true, true); Program.AddTaskbarItem(appTd, appTd.Tag.ToString(), "Time Distorter Setup", null); appTd.BringToFront(); diff --git a/Histacom2/Program.cs b/Histacom2/Program.cs index f978b90..97fee5f 100644 --- a/Histacom2/Program.cs +++ b/Histacom2/Program.cs @@ -69,9 +69,9 @@ namespace Histacom2 { if (SaveSystem.CurrentSave.CurrentOS == "95") { - WinClassic app = wm.StartWin95(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true, true); + WinClassic app = wm.Init(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true, true); } else { - WinClassic app = wm.StartWin95(new WinClassicWindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true, true); + WinClassic app = wm.Init(new WinClassicWindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true, true); } try diff --git a/Histacom2/SaveDialogs/SaveFileTroubleShooter.Designer.cs b/Histacom2/SaveDialogs/SaveFileTroubleShooter.Designer.cs index 4c11576..85c04fb 100644 --- a/Histacom2/SaveDialogs/SaveFileTroubleShooter.Designer.cs +++ b/Histacom2/SaveDialogs/SaveFileTroubleShooter.Designer.cs @@ -30,9 +30,9 @@ { this.label1 = new System.Windows.Forms.Label(); this.pnlResolved = new System.Windows.Forms.Panel(); - this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); this.textBox1 = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); this.btnClose = new System.Windows.Forms.Button(); this.pnlResolved.SuspendLayout(); @@ -59,19 +59,22 @@ this.pnlResolved.Controls.Add(this.label2); this.pnlResolved.Location = new System.Drawing.Point(12, 38); this.pnlResolved.Name = "pnlResolved"; - this.pnlResolved.Size = new System.Drawing.Size(589, 146); + this.pnlResolved.Size = new System.Drawing.Size(589, 275); this.pnlResolved.TabIndex = 1; this.pnlResolved.Visible = false; // - // label2 + // textBox1 // - this.label2.AutoSize = true; - this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label2.Location = new System.Drawing.Point(8, 11); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(210, 20); - this.label2.TabIndex = 0; - this.label2.Text = "The issue has been resolved"; + this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBox1.Location = new System.Drawing.Point(10, 55); + this.textBox1.Multiline = true; + this.textBox1.Name = "textBox1"; + this.textBox1.ReadOnly = true; + this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both; + this.textBox1.Size = new System.Drawing.Size(567, 208); + this.textBox1.TabIndex = 3; // // label3 // @@ -82,24 +85,22 @@ this.label3.TabIndex = 2; this.label3.Text = "log:"; // - // textBox1 + // label2 // - this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.textBox1.Location = new System.Drawing.Point(10, 55); - this.textBox1.Multiline = true; - this.textBox1.Name = "textBox1"; - this.textBox1.ReadOnly = true; - this.textBox1.Size = new System.Drawing.Size(567, 79); - this.textBox1.TabIndex = 3; + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.Location = new System.Drawing.Point(8, 11); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(210, 20); + this.label2.TabIndex = 0; + this.label2.Text = "The issue has been resolved"; // // panel2 // - this.panel2.BackColor = System.Drawing.SystemColors.ControlDark; + this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); this.panel2.Controls.Add(this.btnClose); this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panel2.Location = new System.Drawing.Point(0, 217); + this.panel2.Location = new System.Drawing.Point(0, 315); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(612, 30); this.panel2.TabIndex = 2; @@ -119,7 +120,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(612, 247); + this.ClientSize = new System.Drawing.Size(612, 345); this.Controls.Add(this.panel2); this.Controls.Add(this.pnlResolved); this.Controls.Add(this.label1); diff --git a/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs b/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs index 9d26762..af105f0 100644 --- a/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs +++ b/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs @@ -43,6 +43,7 @@ namespace Histacom2.SaveDialogs // Check if the main.save file exists string savefile = Path.Combine(SaveSystem.ProfileDirectory, "main.save"); + string oldsavefile = Path.Combine(SaveSystem.ProfileDirectory, "oldmain.save"); if (!File.Exists(savefile)) { @@ -58,54 +59,111 @@ namespace Histacom2.SaveDialogs return; } else { WriteToLog("File main.save does exist - checking contents"); + bool readable = false; try { savedata = SaveSystem.ReadSave(savefile); - + readable = true; } catch { - WriteToLog("ISSUE FOUND! File main.save is unreadable"); + WriteToLog("Save file cannot be read - scanning each line and examining them..."); + // Take a little look at the file? - WriteToLog("Sorry, there is no repairing it easily, your data will be lost"); + // But first let's just create a measure of how the JSON SHOULD look + if (!SaveSystem.IsBinarySave) + { + if (File.Exists(oldsavefile)) File.Delete(oldsavefile); + File.Copy(savefile, oldsavefile); - string backupfile = Path.Combine(SaveSystem.ProfileDirectory, "main.backup"); + SaveSystem.NewGame(); + string[] fileLines = File.ReadAllText(oldsavefile).Split('\n'); + string[] shouldBeLines = File.ReadAllText(savefile).Split('\n'); + int i = 0; - if (Directory.Exists(backupfile)) Directory.Delete(backupfile); + string newJson = ""; - File.Copy(savefile, backupfile); - SaveSystem.NewGame(); + foreach (string element in fileLines) + { + element.Replace("\n", "").Replace("\r", ""); + } - // Make sure the username is set + foreach (string line in fileLines) + { + if (!line.StartsWith("{")) + { + if (!line.StartsWith("}")) + { + try { + // We will attempt to deserialize this line - SaveSystem.CurrentSave.Username = SaveSystem.ProfileName; + Newtonsoft.Json.JsonConvert.DeserializeObject("{" + $"{Environment.NewLine}{line}{Environment.NewLine}" + "}"); - WriteToLog($"The corrupt file has been stored in {backupfile}"); + // It worked! This line is not the problem! - EndScan(true); - } - + newJson += $"{Environment.NewLine}{fileLines[i]}"; - // Check the values + WriteToLog($"The line {fileLines[i]} is fine!"); + } catch { + // If it failed to read this line the this is the line that's causing problems! - if (savedata.CurrentOS == null || savedata.CurrentOS == "") - { - WriteToLog("ISSUE FOUND! Data for CurrentOS is null! Giving default value..."); - savedata.CurrentOS = "95"; - EndScan(true); - } + try { newJson += $"{Environment.NewLine}{shouldBeLines[i]}"; + WriteToLog($"ISSUE FOUND! The line {fileLines[i]} was corrupt - it has been reset to default settings!"); + } catch { WriteToLog($"ISSUE FOUND! A line was unneeded - it has been removed as it should!"); } // The reason I'm catching that is in case someone adds a line at the end of the file or something + } + } + } + i++; + } - if (savedata.ExperiencedStories == null) - { - WriteToLog("ISSUE FOUND! Data for ExperiencedStories is null! Giving default value..."); - savedata.ExperiencedStories = new List<string>(); - } + // After all that let's see if we fixed the file - but first, add the "{" and "}" in! - if (savedata.ThemeName == null || savedata.ThemeName == "") - { - WriteToLog("ISSUE FOUND! Data for ThemeName is null! Giving default value..."); - savedata.ThemeName = "95normal"; + newJson = "{" + $"{Environment.NewLine}{newJson}{Environment.NewLine}" + "}"; + + // Now let's test it + + try + { + savedata = Newtonsoft.Json.JsonConvert.DeserializeObject<Save>(newJson); + + WriteToLog("Save file successfully recovered!"); + + File.WriteAllText(savefile, newJson); + readable = true; + + if (File.Exists(oldsavefile)) File.Delete(oldsavefile); + EndScan(true); + } catch { + // It's unusable... + + WriteToLog("ISSUE FOUND! File main.save is unreadable"); + + WriteToLog("Sorry, there is no repairing it easily, your data will be lost"); + + string backupfile = Path.Combine(SaveSystem.ProfileDirectory, "main.backup"); + + if (Directory.Exists(backupfile)) Directory.Delete(backupfile); + + File.Copy(savefile, backupfile); + SaveSystem.NewGame(); + + // Make sure the username is set + + SaveSystem.CurrentSave.Username = SaveSystem.ProfileName; + SaveSystem.SaveGame(); + + WriteToLog($"The corrupt file has been stored in {backupfile}"); + + EndScan(true); + } + } } + + + // Check the values if it was readable + + if (readable) CheckValues(); + } string folderspath = Path.Combine(SaveSystem.ProfileDirectory, "folders"); @@ -117,26 +175,29 @@ namespace Histacom2.SaveDialogs SaveSystem.CheckFiles(); } + } + private void CheckValues() + { + foreach (var field in typeof(Save).GetFields()) + { + if (field.GetValue(savedata) is string) if (field.GetValue(savedata).ToString() == null) { field.SetValue(savedata, ""); continue; } + if (field.GetValue(savedata) is Theme) if (field.GetValue(savedata) == null) { field.SetValue(savedata, new Default95Theme()); continue; } + if (field.GetValue(savedata) is List<string>) if (field.GetValue(savedata) == null) { field.SetValue(savedata, new List<string>()); } + } } void EndScan(bool successful) { pnlResolved.Visible = true; + label1.Hide(); if (successful == true) { label2.Text = "The issue has been resolved."; - // Set CurrentSave to the resolved one - - SaveSystem.CurrentSave = savedata; - - // Set the main.save file to the resolved one - - SaveSystem.WriteSave(Path.Combine(SaveSystem.ProfileDirectory, "main.save"), savedata); textBox1.Text = log; } else { - label2.Text = "The issue has not been resolved, sorry"; + label2.Text = "The issue has not been resolved, sorry."; textBox1.Text = log; } } diff --git a/Histacom2/TitleScreen.Designer.cs b/Histacom2/TitleScreen.Designer.cs index 07bbc54..e29c283 100644 --- a/Histacom2/TitleScreen.Designer.cs +++ b/Histacom2/TitleScreen.Designer.cs @@ -244,7 +244,7 @@ this.startmenuitems.Name = "startmenuitems"; this.startmenuitems.Padding = new System.Windows.Forms.Padding(1, 2, 0, 0); this.startmenuitems.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; - this.startmenuitems.Size = new System.Drawing.Size(140, 220); + this.startmenuitems.Size = new System.Drawing.Size(140, 239); this.startmenuitems.TabIndex = 0; this.startmenuitems.Text = "StartMenu"; // diff --git a/Histacom2/TitleScreen.cs b/Histacom2/TitleScreen.cs index 851bd19..e810d5d 100644 --- a/Histacom2/TitleScreen.cs +++ b/Histacom2/TitleScreen.cs @@ -156,7 +156,7 @@ namespace Histacom2 label1.Parent = leet; label1.AutoSize = true; label1.Text = "Thank you for making Histacom2 possible."; - wm.StartWin95(leet, "Thank You", null, true, true); + wm.Init(leet, "Thank You", null, true, true); } // The VM Mode timer / checker. Updates every 100ms @@ -207,8 +207,6 @@ namespace Histacom2 } catch { } - - // If VM Mode is not enabled if (vm_mode.Checked != true) |
