mirror of
https://github.com/HistacomUnity/Histacom2-old.git
synced 2025-01-22 17:12:56 -05:00
Windows 98 designer started!
This commit is contained in:
parent
9cf2ebcd75
commit
c7266b653b
2 changed files with 94 additions and 31 deletions
|
@ -9,11 +9,9 @@
|
||||||
using TimeHACK.Engine.Template.Taskbars;
|
using TimeHACK.Engine.Template.Taskbars;
|
||||||
using TimeHACK.OS.Win95.Win95Apps;
|
using TimeHACK.OS.Win95.Win95Apps;
|
||||||
using TimeHACK.OS.Win95.Win95Apps.Story;
|
using TimeHACK.OS.Win95.Win95Apps.Story;
|
||||||
|
using static TimeHACK.Engine.SaveSystem;
|
||||||
namespace TimeHACK.OS.Win98
|
namespace TimeHACK.OS.Win98
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public partial class Windows98 : Form
|
public partial class Windows98 : Form
|
||||||
{
|
{
|
||||||
private SoundPlayer startsound;
|
private SoundPlayer startsound;
|
||||||
|
@ -22,6 +20,7 @@ public partial class Windows98 : Form
|
||||||
public List<WinClassic> nonimportantapps = new List<WinClassic>();
|
public List<WinClassic> nonimportantapps = new List<WinClassic>();
|
||||||
public WinClassic webchat;
|
public WinClassic webchat;
|
||||||
public WinClassic ie;
|
public WinClassic ie;
|
||||||
|
|
||||||
public TaskBarController tb = new TaskBarController();
|
public TaskBarController tb = new TaskBarController();
|
||||||
|
|
||||||
public int currentappcount = 0;
|
public int currentappcount = 0;
|
||||||
|
@ -45,6 +44,8 @@ public Windows98()
|
||||||
DocumentsToolStripMenuItem.DropDown.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
|
DocumentsToolStripMenuItem.DropDown.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
|
||||||
SettingsToolStripMenuItem.DropDown.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
|
SettingsToolStripMenuItem.DropDown.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
|
||||||
FindToolStripMenuItem.DropDown.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
|
FindToolStripMenuItem.DropDown.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
|
||||||
|
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
|
||||||
|
BackgroundImage = currentTheme.defaultWallpaper;
|
||||||
foreach (ToolStripMenuItem item in startmenuitems.Items)
|
foreach (ToolStripMenuItem item in startmenuitems.Items)
|
||||||
{
|
{
|
||||||
item.MouseEnter += new EventHandler(MenuItem_MouseEnter);
|
item.MouseEnter += new EventHandler(MenuItem_MouseEnter);
|
||||||
|
@ -55,7 +56,6 @@ public Windows98()
|
||||||
item.MouseEnter += new EventHandler(MenuItem_MouseEnter);
|
item.MouseEnter += new EventHandler(MenuItem_MouseEnter);
|
||||||
item.MouseLeave += new EventHandler(MenuItem_MouseLeave);
|
item.MouseLeave += new EventHandler(MenuItem_MouseLeave);
|
||||||
}
|
}
|
||||||
desktopImages.Images[0] = Properties.Resources.Win98Computer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MenuItem_MouseEnter(object sender, EventArgs e)
|
private void MenuItem_MouseEnter(object sender, EventArgs e)
|
||||||
|
@ -71,6 +71,7 @@ private void MenuItem_MouseLeave(object sender, EventArgs e)
|
||||||
// When New Game is clicked in TitleScreen.cs
|
// When New Game is clicked in TitleScreen.cs
|
||||||
private void Desktop_Load(object sender, EventArgs e)
|
private void Desktop_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
if (currentTheme.defaultWallpaper != null) desktopicons.BackgroundImage = new Bitmap(currentTheme.defaultWallpaper, Width, Height);
|
||||||
//Start Menu Color - Commented until it works reliably
|
//Start Menu Color - Commented until it works reliably
|
||||||
//startmenuitems.Renderer = new MyRenderer();
|
//startmenuitems.Renderer = new MyRenderer();
|
||||||
//ProgramsToolStripMenuItem.DropDown.Renderer = new MyRenderer();
|
//ProgramsToolStripMenuItem.DropDown.Renderer = new MyRenderer();
|
||||||
|
@ -79,7 +80,7 @@ private void Desktop_Load(object sender, EventArgs e)
|
||||||
fontLoad();
|
fontLoad();
|
||||||
|
|
||||||
// Play Windows 95 Start Sound
|
// Play Windows 95 Start Sound
|
||||||
Stream audio = Properties.Resources.Win98Start;
|
Stream audio = currentTheme.startSound;
|
||||||
startsound = new SoundPlayer(audio);
|
startsound = new SoundPlayer(audio);
|
||||||
startsound.Play();
|
startsound.Play();
|
||||||
|
|
||||||
|
@ -106,6 +107,26 @@ private void Desktop_Load(object sender, EventArgs e)
|
||||||
|
|
||||||
// Bring to this the front
|
// Bring to this the front
|
||||||
this.BringToFront();
|
this.BringToFront();
|
||||||
|
|
||||||
|
//Check if it is the first time
|
||||||
|
if (CurrentSave.FTime95 == false)
|
||||||
|
{
|
||||||
|
CurrentSave.FTime95 = true;
|
||||||
|
SaveSystem.SaveGame();
|
||||||
|
WinClassicWelcome welcome = new WinClassicWelcome();
|
||||||
|
WinClassic app = wm.StartWin95(welcome, "Welcome", null, false, false);
|
||||||
|
AddTaskBarItem(app, app.Tag.ToString(), "Welcome", null);
|
||||||
|
|
||||||
|
nonimportantapps.Add(app);
|
||||||
|
nonimportantapps[nonimportantapps.Count - 1].BringToFront();
|
||||||
|
nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
app.BringToFront();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fontLoad()
|
private void fontLoad()
|
||||||
|
@ -135,7 +156,8 @@ private void startbutton_Click(object sender, EventArgs e)
|
||||||
// Shutdown button
|
// Shutdown button
|
||||||
private void ShutdownToolStripMenuItem_Click(object sender, EventArgs e)
|
private void ShutdownToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Program.ShutdownApplication(Properties.Resources.Win98Stop);
|
SaveGame();
|
||||||
|
Program.ShutdownApplication(currentTheme.stopSound);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion //Region
|
#endregion //Region
|
||||||
|
@ -208,12 +230,12 @@ private void downloaderTestToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
|
||||||
private void installerTestToolStripMenuItem_Click(object sender, EventArgs e)
|
private void installerTestToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
//Win95Installer openinstaller = new Win95Installer();
|
Win95Installer openinstaller = new Win95Installer("Testing");
|
||||||
//WinClassic app = wm.StartWin95(openinstaller, "Installer", null, false, true);
|
WinClassic app = wm.StartWin95(openinstaller, "Installer", null, false, true);
|
||||||
|
|
||||||
//AddTaskBarItem(app, app.Tag.ToString(), "Installer", null);
|
AddTaskBarItem(app, app.Tag.ToString(), "Installer", null);
|
||||||
|
|
||||||
//app.BringToFront();
|
app.BringToFront();
|
||||||
startmenu.Hide();
|
startmenu.Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,11 +270,11 @@ private void desktopicons_Click(object sender, EventArgs e)
|
||||||
}
|
}
|
||||||
else if (objListViewItem.Text == "Web Chat Setup")
|
else if (objListViewItem.Text == "Web Chat Setup")
|
||||||
{
|
{
|
||||||
//Win95Installer inst = new Win95Installer();
|
Win95Installer inst = new Win95Installer("Web Chat 1998");
|
||||||
//inst.installname.Text = "Web Chat 1998";
|
inst.InstallCompleted += (sendr, args) => WebChatToolStripMenuItem.Visible = true;
|
||||||
//WinClassic app = wm.StartWin95(inst, "Web Chat Setup", null, true, true);
|
WinClassic app = wm.StartWin95(inst, "Web Chat Setup", null, true, true);
|
||||||
//AddTaskBarItem(app, app.Tag.ToString(), "Web Chat Setup", null);
|
AddTaskBarItem(app, app.Tag.ToString(), "Web Chat Setup", null);
|
||||||
//app.BringToFront();
|
app.BringToFront();
|
||||||
startmenu.Hide();
|
startmenu.Hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -326,16 +348,15 @@ public void UpdateTaskbar()
|
||||||
|
|
||||||
private void AddressBookToolStripMenuItem_Click(object sender, EventArgs e)
|
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);
|
WinClassic app = wm.StartWin95(new WinClassicAddressBook(), "Address Book", Properties.Resources.WinClassicAddressBook, true, true);
|
||||||
nonimportantapps[nonimportantapps.Count - 1].BringToFront();
|
Program.AddTaskbarItem(app, app.Tag.ToString(), "Address Book", Properties.Resources.WinClassicAddressBook);
|
||||||
nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
|
|
||||||
|
Program.nonimportantapps.Add(app);
|
||||||
|
Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront();
|
||||||
|
Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing);
|
||||||
|
|
||||||
app.BringToFront();
|
app.BringToFront();
|
||||||
startmenu.Hide();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void WindowsExplorerToolStripMenuItem1_Click(object sender, EventArgs e)
|
private void WindowsExplorerToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||||
|
@ -360,13 +381,6 @@ private void storyTest1ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
}
|
}
|
||||||
|
|
||||||
private void temp_for_std(object sender, EventArgs e)
|
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();
|
Win2K.Win2KApps.SurviveTheDay std = new Win2K.Win2KApps.SurviveTheDay();
|
||||||
WinClassic app = wm.StartWin95(std, "Survive The Day", null, false, false);
|
WinClassic app = wm.StartWin95(std, "Survive The Day", null, false, false);
|
||||||
|
@ -389,6 +403,54 @@ private void MSDOSPromptToolStripMenuItem1_Click (object sender, EventArgs e)
|
||||||
app.BringToFront();
|
app.BringToFront();
|
||||||
startmenu.Hide();
|
startmenu.Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void PropertiesToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
WinClassicThemePanel theme = new WinClassicThemePanel();
|
||||||
|
WinClassic app = wm.StartWin95(theme, "Themes", null, false, true, false);
|
||||||
|
|
||||||
|
AddTaskBarItem(app, app.Tag.ToString(), "Themes", null);
|
||||||
|
app.BringToFront();
|
||||||
|
startmenu.Hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TimeDistorterToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//distort = new TimeHACKWinClassicTimeDistorter("1998", "1999", 150, Hack2.StartObjective);
|
||||||
|
//WinClassic app = wm.StartWin95(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);
|
||||||
|
|
||||||
|
AddTaskBarItem(app, app.Tag.ToString(), "FTP Client", null);
|
||||||
|
app.BringToFront();
|
||||||
|
startmenu.Hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void iE4TestToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
WinClassic app = wm.StartWin95(new TempIE4(), "IE4", null, true, true);
|
||||||
|
app.BringToFront();
|
||||||
|
startmenu.Hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CalculatorToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
WinClassic app = wm.StartWin95(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, false, false);
|
||||||
|
AddTaskBarItem(app, app.Tag.ToString(), "Calculator", Properties.Resources.WinClassicCalc);
|
||||||
|
|
||||||
|
nonimportantapps.Add(app);
|
||||||
|
nonimportantapps[nonimportantapps.Count - 1].BringToFront();
|
||||||
|
nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
|
||||||
|
|
||||||
|
app.BringToFront();
|
||||||
|
startmenu.Hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public class MyRenderer : ToolStripProfessionalRenderer
|
public class MyRenderer : ToolStripProfessionalRenderer
|
||||||
{
|
{
|
||||||
|
|
|
@ -93,6 +93,7 @@ public static void ShutdownApplication(System.IO.Stream audio)
|
||||||
public static void AddTaskbarItem(Form Application, string ApplicationID, string ApplicationName, Image ApplicationIcon)
|
public static void AddTaskbarItem(Form Application, string ApplicationID, string ApplicationName, Image ApplicationIcon)
|
||||||
{
|
{
|
||||||
TitleScreen.frm95.AddTaskBarItem(Application, ApplicationID, ApplicationName, ApplicationIcon);
|
TitleScreen.frm95.AddTaskBarItem(Application, ApplicationID, ApplicationName, ApplicationIcon);
|
||||||
|
TitleScreen.frm98.AddTaskBarItem(Application, ApplicationID, ApplicationName, ApplicationIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void NonImportantApp_Closing(object sender, FormClosingEventArgs e)
|
public static void NonImportantApp_Closing(object sender, FormClosingEventArgs e)
|
||||||
|
|
Loading…
Reference in a new issue