installed apps in 95 will persist after reboot

This commit is contained in:
lempamo 2017-10-29 18:12:51 -04:00
parent e639c4a8a5
commit 4083f6792d
3 changed files with 21 additions and 4 deletions

View file

@ -810,7 +810,12 @@ public class Save
[Order]
public Theme customTheme { get; set; }
[Order]
public bool FTime98 { get; set; }
[Order]
public bool[] installed95 { get; set; } = new bool[7]; // 0: WC98, 1: FTP, 2: SR, 3: EB, 4: SKNDWS, 5: TD0.1, 6: GTN
}
public class FileSystemFolderInfo

View file

@ -140,6 +140,15 @@ private void Desktop_Load(object sender, EventArgs e)
new ListViewItem("Set Up The Microsoft Network", 4),
new ListViewItem("Outlook Express", 6) }, ref desktopicons, Path.Combine(ProfileWindowsDirectory, "Desktop"));
desktopicons.AutoArrange = false;
// Enable installed programs
if (CurrentSave.installed95[0]) WebChatToolStripMenuItem.Visible = true;
if (CurrentSave.installed95[1]) FTPClientToolStripMenuItem.Visible = true;
if (CurrentSave.installed95[2]) StartRunnerToolStripMenuItem.Visible = true;
if (CurrentSave.installed95[3]) ErrorBlasterToolStripMenuItem.Visible = true;
if (CurrentSave.installed95[5]) TimeDistorterToolStripMenuItem.Visible = true;
if (CurrentSave.installed95[6]) GuessTheNumberToolStripMenuItem.Visible = true;
}
private void fontLoad()

View file

@ -292,7 +292,7 @@ void OpenApplication(string appname, string path)
break;
case "web chat setup":
Win95Installer inst = new Win95Installer("Web Chat 1998");
inst.InstallCompleted += (sendr, args) => TitleScreen.frm95.WebChatToolStripMenuItem.Visible = true;
inst.InstallCompleted += (sendr, args) => { TitleScreen.frm95.WebChatToolStripMenuItem.Visible = true; CurrentSave.installed95[0] = true; };
WinClassic appInstaller = wm.Init(inst, "Web Chat Setup", null, true, true);
Program.AddTaskbarItem(appInstaller, appInstaller.Tag.ToString(), "Web Chat Setup", null);
appInstaller.BringToFront();
@ -306,6 +306,7 @@ void OpenApplication(string appname, string path)
SaveDirectoryInfo(Path.Combine(ProfileProgramsDirectory, "12padams"), "FTP Client", true, "FTP Client", true);
CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "12padams", "FTP Client"), "ftpclint.exe", "ftp client", 19, 58395);
TitleScreen.frm95.FTPClientToolStripMenuItem.Visible = true;
CurrentSave.installed95[1] = true;
};
WinClassic appFtp = wm.Init(instFtp, "FTP Client Setup", null, true, true);
Program.AddTaskbarItem(appFtp, appFtp.Tag.ToString(), "FTP Client Setup", null);
@ -320,6 +321,7 @@ void OpenApplication(string appname, string path)
SaveDirectoryInfo(Path.Combine(ProfileProgramsDirectory, "12padams"), "Time Distorter 0.1", true, "Time Distorter 0.1", true);
CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "12padams", "Time Distorter 0.1"), "tdistort.exe", "time distorter", 17, 23895);
TitleScreen.frm95.TimeDistorterToolStripMenuItem.Visible = true;
CurrentSave.installed95[5] = true;
};
WinClassic appTd = wm.Init(instTd, "Time Distorter Setup", null, true, true);
Program.AddTaskbarItem(appTd, appTd.Tag.ToString(), "Time Distorter Setup", null);
@ -338,6 +340,7 @@ void OpenApplication(string appname, string path)
SaveDirectoryInfo(Path.Combine(ProfileProgramsDirectory, "12padams"), "Guess The Number V1", true, "Guess The Number V1", true);
CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "12padams", "Guess The Number V1"), "guessnum.exe", "guess number", 18, 17483);
TitleScreen.frm95.GuessTheNumberToolStripMenuItem.Visible = true;
CurrentSave.installed95[6] = true;
};
WinClassic appGtn = wm.Init(instGtn, "Guess The Number Setup", null, true, true);
Program.AddTaskbarItem(appGtn, appGtn.Tag.ToString(), "Guess The Number Setup", null);
@ -355,7 +358,7 @@ void OpenApplication(string appname, string path)
break;
case "eb95 setup":
Win95Installer ebInstall = new Win95Installer("Error Blaster 95");
ebInstall.InstallCompleted += (sender, args) => TitleScreen.frm95.ErrorBlasterToolStripMenuItem.Visible = true;
ebInstall.InstallCompleted += (sender, args) => { TitleScreen.frm95.ErrorBlasterToolStripMenuItem.Visible = true; CurrentSave.installed95[3] = true; };
WinClassic installer = wm.Init(ebInstall, "Error Blaster 95 Setup", null, true, true);
Program.AddTaskbarItem(installer, installer.Tag.ToString(), "Error Blaster 95 Setup", null);
installer.BringToFront();
@ -368,9 +371,9 @@ void OpenApplication(string appname, string path)
break;
case "sr95 setup":
Win95Installer srInstall = new Win95Installer("Start Runner 95");
srInstall.InstallCompleted += (sender, args) => TitleScreen.frm95.ErrorBlasterToolStripMenuItem.Visible = true;
srInstall.InstallCompleted += (sender, args) => { TitleScreen.frm95.StartRunnerToolStripMenuItem.Visible = true; CurrentSave.installed95[2] = true; };
WinClassic install = wm.Init(srInstall, "Start Runner 95 Setup", null, true, true);
Program.AddTaskbarItem(install, install.Tag.ToString(), "Error Blaster 95 Setup", null);
Program.AddTaskbarItem(install, install.Tag.ToString(), "Start Runner 95 Setup", null);
install.BringToFront();
break;
default: