mirror of
https://github.com/HistacomUnity/Histacom2-old.git
synced 2025-01-22 09:02:01 -05:00
Moar stuff
This commit is contained in:
parent
971683c5f7
commit
da6e7a7e8b
23 changed files with 313 additions and 353 deletions
50
TimeHACK.Engine/FileAssociation.cs
Normal file
50
TimeHACK.Engine/FileAssociation.cs
Normal file
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace TimeHACK.Engine
|
||||
{
|
||||
public class FileAssociation
|
||||
{
|
||||
// Associate file extension with progID, description, icon and application
|
||||
public static void Associate(string extension,
|
||||
string progID, string description, string icon, string application)
|
||||
{
|
||||
Registry.ClassesRoot.CreateSubKey(extension).SetValue("", progID);
|
||||
if (progID != null && progID.Length > 0)
|
||||
using (RegistryKey key = Registry.ClassesRoot.CreateSubKey(progID))
|
||||
{
|
||||
if (description != null)
|
||||
key.SetValue("", description);
|
||||
if (icon != null)
|
||||
key.CreateSubKey("DefaultIcon").SetValue("", ToShortPathName(icon));
|
||||
if (application != null)
|
||||
key.CreateSubKey(@"Shell\Open\Command").SetValue("",
|
||||
ToShortPathName(application) + " \"%1\"");
|
||||
}
|
||||
}
|
||||
|
||||
// Return true if extension already associated in registry
|
||||
public static bool IsAssociated(string extension)
|
||||
{
|
||||
return (Registry.ClassesRoot.OpenSubKey(extension, false) != null);
|
||||
}
|
||||
|
||||
[DllImport("Kernel32.dll")]
|
||||
private static extern uint GetShortPathName(string lpszLongPath,
|
||||
[Out] StringBuilder lpszShortPath, uint cchBuffer);
|
||||
|
||||
// Return short path format of a file name
|
||||
private static string ToShortPathName(string longName)
|
||||
{
|
||||
StringBuilder s = new StringBuilder(1000);
|
||||
uint iSize = (uint)s.Capacity;
|
||||
uint iRet = GetShortPathName(longName, s, iSize);
|
||||
return s.ToString();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -14,6 +14,8 @@ public static class SaveSystem
|
|||
public static FileSystemFolderInfo filesystemflinfo { get; set; }
|
||||
public static Boolean DevMode = false;
|
||||
|
||||
public static FileAssociation IconChanger = new FileAssociation();
|
||||
|
||||
public static string GameDirectory
|
||||
{
|
||||
get
|
||||
|
@ -118,7 +120,7 @@ public static void NewGame()
|
|||
save.ExperiencedStories = new List<string>();
|
||||
save.CurrentOS = "95";
|
||||
CurrentSave = save;
|
||||
|
||||
|
||||
CheckFiles();
|
||||
SaveGame();
|
||||
}
|
||||
|
@ -143,6 +145,26 @@ public static void CheckFiles()
|
|||
if (CurrentSave.CurrentOS != "95") SaveDirectoryInfo(ProfileSettingsDirectory, false, "Documents and Settings", true);
|
||||
SaveDirectoryInfo(ProfileProgramsDirectory, true, "Program Files", true);
|
||||
SaveDirectoryInfo(ProfileWindowsDirectory, true, "Windows", true);
|
||||
|
||||
CreateWindowsDirectory();
|
||||
}
|
||||
|
||||
public static void CreateWindowsDirectory()
|
||||
{
|
||||
SaveDirectoryInfo(Path.Combine(ProfileWindowsDirectory, "System"), true, "System", true);
|
||||
SaveDirectoryInfo(Path.Combine(ProfileWindowsDirectory, "Config"), true, "Config", true);
|
||||
SaveDirectoryInfo(Path.Combine(ProfileWindowsDirectory, "Cursors"), true, "Cursors", true);
|
||||
SaveDirectoryInfo(Path.Combine(ProfileWindowsDirectory, "Fonts"), true, "Fonts", true);
|
||||
SaveDirectoryInfo(Path.Combine(ProfileWindowsDirectory, "Help"), true, "Help", true);
|
||||
SaveDirectoryInfo(Path.Combine(ProfileWindowsDirectory, "Temp"), true, "Temp", true);
|
||||
|
||||
CreateWindowsFile(Path.Combine(ProfileWindowsDirectory, "Calc.exe"), "Calculator");
|
||||
CreateWindowsFile(Path.Combine(ProfileWindowsDirectory, "explorer.exe"), "windowsexplorer");
|
||||
}
|
||||
|
||||
public static void CreateWindowsFile(String filepath, String contents)
|
||||
{
|
||||
File.WriteAllText(filepath, contents);
|
||||
}
|
||||
|
||||
public static void SaveDirectoryInfo(String directory, Boolean isProtected, String label, Boolean allowback)
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TimeHACK.Engine
|
||||
{
|
||||
class StartMenuBackend
|
||||
{
|
||||
//public void CreateMenu(ref Panel thePanel, String OSStyle, Image SideImage)
|
||||
//{
|
||||
// // Init the Start Menu
|
||||
|
||||
// MenuStrip startmenuitems = new MenuStrip();
|
||||
// PictureBox sideimage = new PictureBox();
|
||||
|
||||
// switch (OSStyle)
|
||||
// {
|
||||
// case "95":
|
||||
// case "98":
|
||||
// case "2000":
|
||||
// case "ME":
|
||||
// sideimage.Image = SideImage;
|
||||
// sideimage.Dock = DockStyle.Left;
|
||||
// startmenuitems.Dock = DockStyle.Fill;
|
||||
|
||||
// AddWinClassicItemsToMenuStrip(ref startmenuitems);
|
||||
// break;
|
||||
// }
|
||||
|
||||
|
||||
//}
|
||||
|
||||
//public void AddWinClassicItemsToMenuStrip(ref MenuStrip toAddTo)
|
||||
//{
|
||||
// ToolStripMenuItem ProgramsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
// ToolStripMenuItem DocumentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
// ToolStripMenuItem SettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
// ToolStripMenuItem FindToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
// ToolStripMenuItem HelpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -48,9 +48,9 @@
|
|||
<Compile Include="BSODCreator.cs" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Resources\WinClassic\Window\pjBg6mKP.bin" />
|
||||
<Compile Include="FileAssociation.cs" />
|
||||
<Compile Include="FileDialogBoxManager.cs" />
|
||||
<Compile Include="SaveSystem.cs" />
|
||||
<Compile Include="StartMenuBackend.cs" />
|
||||
<Compile Include="TaskBarController.cs" />
|
||||
<Compile Include="Template\Win9XBSOD.cs">
|
||||
<SubType>Form</SubType>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
namespace TimeHACK.OS.Win95.Win95Apps.AddressBook
|
||||
namespace TimeHACK.OS.Win95.Win95Apps
|
||||
{
|
||||
partial class FRMWinClassicAddressBookNewContact
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ private void InitializeComponent()
|
|||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.button1.Location = new System.Drawing.Point(107, 239);
|
||||
this.button1.Name = "button1";
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TimeHACK.OS.Win95.Win95Apps.AddressBook
|
||||
|
||||
namespace TimeHACK.OS.Win95.Win95Apps
|
||||
{
|
||||
public partial class FRMWinClassicAddressBookNewContact : UserControl
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
namespace TimeHACK.OS.Win95.Win95Apps.AddressBook
|
||||
namespace TimeHACK.OS.Win95.Win95Apps
|
||||
{
|
||||
partial class FRMWinClassicAddressBookNewFolder
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TimeHACK.OS.Win95.Win95Apps.AddressBook
|
||||
namespace TimeHACK.OS.Win95.Win95Apps
|
||||
{
|
||||
public partial class FRMWinClassicAddressBookNewFolder : UserControl
|
||||
{
|
||||
|
|
|
@ -122,7 +122,7 @@ private void newFolderToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
|
||||
void NewFolder()
|
||||
{
|
||||
AddressBook.FRMWinClassicAddressBookNewFolder abnf = new AddressBook.FRMWinClassicAddressBookNewFolder();
|
||||
FRMWinClassicAddressBookNewFolder abnf = new FRMWinClassicAddressBookNewFolder();
|
||||
WinClassic app = wm.startWin95(abnf, "Address Book - New Folder", Properties.Resources.Win95IconWordpad, true, true, true);
|
||||
|
||||
if (treeView1.SelectedNode != null)
|
||||
|
@ -145,7 +145,7 @@ private void newContactToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
|
||||
void NewContact()
|
||||
{
|
||||
AddressBook.FRMWinClassicAddressBookNewContact abnc = new AddressBook.FRMWinClassicAddressBookNewContact();
|
||||
FRMWinClassicAddressBookNewContact abnc = new FRMWinClassicAddressBookNewContact();
|
||||
WinClassic app = wm.startWin95(abnc, "Address Book - New Contact", Properties.Resources.Win95IconWordpad, true, true, true);
|
||||
|
||||
if (treeView1.SelectedNode != null)
|
||||
|
@ -171,7 +171,7 @@ private void toolProp_Click(object sender, EventArgs e)
|
|||
|
||||
void OpenProperties()
|
||||
{
|
||||
AddressBook.FRMWinClassicAddressBookNewContact abnc = new AddressBook.FRMWinClassicAddressBookNewContact();
|
||||
FRMWinClassicAddressBookNewContact abnc = new FRMWinClassicAddressBookNewContact();
|
||||
|
||||
// Finds the selected contact
|
||||
if (treeView1.SelectedNode != null)
|
||||
|
|
|
@ -28,7 +28,7 @@ public WinClassicTerminal()
|
|||
public void WriteLine(string Text)
|
||||
{
|
||||
richTextBox1.AppendText(Text + "\n");
|
||||
richTextBox1.Update();
|
||||
this.Update();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -110,13 +110,27 @@ void RefreshAll() {
|
|||
}
|
||||
foreach (String str in Directory.GetFiles(currentDirectory))
|
||||
{
|
||||
// Get app Icon
|
||||
|
||||
int AppIcon = 1;
|
||||
|
||||
switch (Path.GetFileName(str))
|
||||
{
|
||||
case ".exe":
|
||||
break;
|
||||
}
|
||||
|
||||
if (IsFileOpenDialog == true || IsFileSaveDialog == true)
|
||||
{
|
||||
if (!(Path.GetFileName(str) == "_data.info"))
|
||||
{
|
||||
if (new FileInfo(str).Extension == onlyViewExtension)
|
||||
{
|
||||
this.mainView.Items.Add(Path.GetFileName(str), 2);
|
||||
if (new FileInfo(str).Extension == ".exe")
|
||||
{
|
||||
this.mainView.Items.Add(Path.GetFileName(str), 2);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -631,7 +631,6 @@ private void InitializeComponent()
|
|||
this.InternetExplorerToolStripMenuItem.Name = "InternetExplorerToolStripMenuItem";
|
||||
this.InternetExplorerToolStripMenuItem.Size = new System.Drawing.Size(181, 28);
|
||||
this.InternetExplorerToolStripMenuItem.Text = "Internet Explorer";
|
||||
this.InternetExplorerToolStripMenuItem.Click += new System.EventHandler(this.InternetExplorerToolStripMenuItem_Click);
|
||||
//
|
||||
// MSDOSPromptToolStripMenuItem1
|
||||
//
|
|
@ -4,6 +4,7 @@
|
|||
using System.IO;
|
||||
using System.Media;
|
||||
using System.Windows.Forms;
|
||||
using TimeHACK;
|
||||
using TimeHACK.Engine;
|
||||
using TimeHACK.Engine.Template;
|
||||
using TimeHACK.Engine.Template.Taskbars;
|
||||
|
@ -17,11 +18,10 @@ public partial class BaseOS : Form
|
|||
{
|
||||
public WindowManager wm = new WindowManager();
|
||||
|
||||
|
||||
public WinClassic webchat;
|
||||
public WinClassic ie;
|
||||
public TaskBarController tb = new TaskBarController();
|
||||
|
||||
public OpenApplication openApp = new OpenApplication();
|
||||
|
||||
// Init the form
|
||||
public BaseOS()
|
||||
{
|
||||
|
@ -142,15 +142,8 @@ private void desktop_mousedown(object sender, MouseEventArgs e)
|
|||
|
||||
private void NotePadToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
WinClassicNotepad wp = new WinClassicNotepad();
|
||||
WinClassic app = wm.startWin95(wp, "Notepad", Properties.Resources.Win95IconNotepad, true, true);
|
||||
AddTaskBarItem(app, app.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad);
|
||||
openApp.OpenApp("Notepad");
|
||||
|
||||
Program.nonimportantapps.Add(app);
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront();
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
|
||||
|
||||
app.BringToFront();
|
||||
startmenu.Hide();
|
||||
}
|
||||
private void windowManagerTestToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -185,16 +178,6 @@ private void installerTestToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
startmenu.Hide();
|
||||
}
|
||||
|
||||
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.", Properties.Resources.Win95Warning); return; }
|
||||
ie = wm.startWin95(new WinClassicIE4(), "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);
|
||||
startmenu.Hide();
|
||||
}
|
||||
|
||||
private void desktopicons_Click(object sender, EventArgs e)
|
||||
{
|
||||
Point objDrawingPoint = desktopicons.PointToClient(Cursor.Position);
|
||||
|
@ -207,19 +190,19 @@ private void desktopicons_Click(object sender, EventArgs e)
|
|||
{
|
||||
if (objListViewItem.Text == "Internet Explorer")
|
||||
{
|
||||
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", Properties.Resources.Win95IconIE4, true, true);
|
||||
AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4);
|
||||
ie.BringToFront();
|
||||
ie.FormClosing += new FormClosingEventHandler(InternetExplorer4_Closing);
|
||||
startmenu.Hide();
|
||||
switch (SaveSystem.CurrentSave.CurrentOS)
|
||||
{
|
||||
case "95":
|
||||
openApp.OpenApp("ie4");
|
||||
|
||||
startmenu.Hide();
|
||||
break;
|
||||
|
||||
}
|
||||
} else if (objListViewItem.Text == "Web Chat Setup")
|
||||
{
|
||||
WinClassicInstaller inst = new WinClassicInstaller();
|
||||
inst.installname.Text = "Web Chat 1998";
|
||||
WinClassic app = wm.startWin95(inst, "Web Chat Setup", null, true, true);
|
||||
AddTaskBarItem(app, app.Tag.ToString(), "Web Chat Setup", null);
|
||||
app.BringToFront();
|
||||
openApp.OpenApp("webchat1998");
|
||||
|
||||
startmenu.Hide();
|
||||
}
|
||||
}
|
||||
|
@ -243,27 +226,10 @@ private void WebChatToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
app.BringToFront();
|
||||
startmenu.Hide();
|
||||
}
|
||||
public void NonImportantApp_Closing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
Program.nonimportantapps.Remove((WinClassic)sender);
|
||||
}
|
||||
private void InternetExplorer4_Closing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
ie = null;
|
||||
}
|
||||
|
||||
private void WordPadToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
WinClassicWordPad wp = new WinClassicWordPad();
|
||||
WinClassic app = wm.startWin95(wp, "Wordpad", Properties.Resources.Win95IconWordpad, true, true);
|
||||
AddTaskBarItem(app, app.Tag.ToString(), "Wordpad", Properties.Resources.Win95IconWordpad);
|
||||
|
||||
Program.nonimportantapps.Add(app);
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront();
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
|
||||
|
||||
app.BringToFront();
|
||||
startmenu.Hide();
|
||||
openApp.OpenApp("Wordpad");
|
||||
}
|
||||
|
||||
public void AddTaskBarItem(Form Application, string ApplicationID, string ApplicationName, Image ApplicationIcon)
|
||||
|
@ -293,31 +259,15 @@ public void UpdateTaskbar()
|
|||
|
||||
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);
|
||||
openApp.OpenApp("addressbook");
|
||||
|
||||
Program.nonimportantapps.Add(app);
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront();
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
|
||||
|
||||
app.BringToFront();
|
||||
startmenu.Hide();
|
||||
}
|
||||
|
||||
private void WindowsExplorerToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
FileDialogBoxManager.IsInOpenDialog = false;
|
||||
FileDialogBoxManager.IsInSaveDialog = false;
|
||||
WinClassicWindowsExplorer we = new WinClassicWindowsExplorer();
|
||||
WinClassic app = wm.startWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true);
|
||||
AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer);
|
||||
openApp.OpenApp("windowsexplorer");
|
||||
|
||||
Program.nonimportantapps.Add(app);
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront();
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
|
||||
|
||||
app.BringToFront();
|
||||
startmenu.Hide();
|
||||
}
|
||||
|
||||
|
@ -335,15 +285,8 @@ private void temp_for_std(object sender, EventArgs e)
|
|||
|
||||
void StartSurviveTheDay()
|
||||
{
|
||||
Win2K.Win2KApps.SurviveTheDay std = new Win2K.Win2KApps.SurviveTheDay();
|
||||
WinClassic app = wm.startWin95(std, "Survive The Day", null, false, false);
|
||||
AddTaskBarItem(app, app.Tag.ToString(), "Survive The Day", null);
|
||||
openApp.OpenApp("survivetheday");
|
||||
|
||||
Program.nonimportantapps.Add(app);
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront();
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
|
||||
|
||||
app.BringToFront();
|
||||
startmenu.Hide();
|
||||
}
|
||||
|
45
TimeHACK.Main/OS/Win95/Win95.Designer.cs
generated
45
TimeHACK.Main/OS/Win95/Win95.Designer.cs
generated
|
@ -30,23 +30,60 @@ protected override void Dispose(bool disposing)
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Windows95));
|
||||
this.panel1.SuspendLayout();
|
||||
this.taskbar.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.startbutton)).BeginInit();
|
||||
this.startmenu.SuspendLayout();
|
||||
this.ossidestartmenu.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.osimage)).BeginInit();
|
||||
this.clockPanel.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// clockTimer
|
||||
//
|
||||
this.clockTimer.Enabled = true;
|
||||
//
|
||||
// desktopImages
|
||||
//
|
||||
this.desktopImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("desktopImages.ImageStream")));
|
||||
this.desktopImages.Images.SetKeyName(0, "WinClassicComputer.png");
|
||||
this.desktopImages.Images.SetKeyName(1, "WinClassicFolder.png");
|
||||
this.desktopImages.Images.SetKeyName(2, "WinClassicIE4.png");
|
||||
this.desktopImages.Images.SetKeyName(3, "WinClassicInbox.png");
|
||||
this.desktopImages.Images.SetKeyName(4, "WinClassicMSN.png");
|
||||
this.desktopImages.Images.SetKeyName(5, "WinClassicNetworking.png");
|
||||
this.desktopImages.Images.SetKeyName(6, "WinClassicOutlook.png");
|
||||
this.desktopImages.Images.SetKeyName(7, "WinClassicRecycle.png");
|
||||
this.desktopImages.Images.SetKeyName(8, "WinClassicSetup.png");
|
||||
this.desktopImages.Images.SetKeyName(9, "WinClassicSetup.png");
|
||||
this.desktopImages.Images.SetKeyName(10, "WinClassicSetup.png");
|
||||
this.desktopImages.Images.SetKeyName(11, "WinClassicSetup.png");
|
||||
//
|
||||
// Windows95
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Teal;
|
||||
this.ClientSize = new System.Drawing.Size(640, 480);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "Windows95";
|
||||
this.Tag = "ignoreFormOnTaskbar";
|
||||
this.Text = "TimeHACKDesktop";
|
||||
this.Load += new System.EventHandler(this.Desktop_Load);
|
||||
this.Controls.SetChildIndex(this.desktopicons, 0);
|
||||
this.Controls.SetChildIndex(this.panel1, 0);
|
||||
this.Controls.SetChildIndex(this.startmenu, 0);
|
||||
this.Controls.SetChildIndex(this.taskbar, 0);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.taskbar.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.startbutton)).EndInit();
|
||||
this.startmenu.ResumeLayout(false);
|
||||
this.startmenu.PerformLayout();
|
||||
this.ossidestartmenu.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.osimage)).EndInit();
|
||||
this.clockPanel.ResumeLayout(false);
|
||||
this.clockPanel.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
using TimeHACK.OS.Win95.Win95Apps;
|
||||
using TimeHACK.WinClassicForms;
|
||||
using TimeHACK.OS.Win95.Win95Apps.Story;
|
||||
using TimeHACK.OS;
|
||||
|
||||
namespace TimeHACK.OS.Win95
|
||||
{
|
||||
|
@ -49,22 +50,7 @@ private void Desktop_Load(object sender, EventArgs e)
|
|||
startsound = new SoundPlayer(audio);
|
||||
startsound.Play();
|
||||
|
||||
|
||||
|
||||
// Check for and set VM Mode
|
||||
if (this.FormBorderStyle != FormBorderStyle.None)
|
||||
{
|
||||
this.Text = "TimeHACK - VM Mode";
|
||||
}
|
||||
|
||||
// Start the ClockTimer
|
||||
clockTimer.Start();
|
||||
|
||||
// Set the StartMenu seperator
|
||||
startmenuitems.Items.Insert(6, new ToolStripSeparator());
|
||||
|
||||
//Program.nonimportantapps.Capacity = 100;
|
||||
this.SendToBack();
|
||||
|
||||
// Update the taskbar
|
||||
UpdateTaskbar();
|
||||
|
@ -89,50 +75,8 @@ private void fontLoad()
|
|||
|
||||
#region StartMenu
|
||||
|
||||
// Paint StartMenu
|
||||
private void startmenu_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
// Paint the StartMenu
|
||||
ControlPaint.DrawBorder(e.Graphics, startmenu.ClientRectangle,
|
||||
SystemColors.ControlLightLight, 2, ButtonBorderStyle.Outset,
|
||||
SystemColors.ControlLightLight, 2, ButtonBorderStyle.Outset,
|
||||
SystemColors.ControlLightLight, 2, ButtonBorderStyle.Outset,
|
||||
SystemColors.ControlLightLight, 2, ButtonBorderStyle.Outset);
|
||||
}
|
||||
|
||||
// StartButton Click
|
||||
private void startbutton_Click(object sender, EventArgs e)
|
||||
{
|
||||
startmenu.Show();
|
||||
startmenu.BringToFront();
|
||||
}
|
||||
|
||||
// Shutdown button
|
||||
private void ShutdownToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Program.ShutdownApplication(Properties.Resources.tada);
|
||||
}
|
||||
|
||||
#endregion //Region
|
||||
|
||||
// When add new folder is clicked
|
||||
private void FolderToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
desktopicons.Items.Add("New Folder");
|
||||
}
|
||||
|
||||
// Give Year Code - NYI
|
||||
private void taskbartime_Click(object sender, EventArgs e)
|
||||
{
|
||||
//TODO: Set Up Save System
|
||||
}
|
||||
|
||||
// Set the Clock
|
||||
private void clockTimer_Tick(object sender, EventArgs e)
|
||||
{
|
||||
taskbartime.Text = DateTime.Now.ToString("h:mm tt");
|
||||
}
|
||||
|
||||
// On Desktop MouseDown
|
||||
private void desktop_mousedown(object sender, MouseEventArgs e)
|
||||
{
|
||||
|
@ -158,15 +102,8 @@ private void desktop_mousedown(object sender, MouseEventArgs e)
|
|||
|
||||
private void NotePadToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
WinClassicNotepad wp = new WinClassicNotepad();
|
||||
WinClassic app = wm.startWin95(wp, "Notepad", Properties.Resources.Win95IconNotepad, true, true);
|
||||
AddTaskBarItem(app, app.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad);
|
||||
openApp.OpenApp("notepad");
|
||||
|
||||
Program.nonimportantapps.Add(app);
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront();
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
|
||||
|
||||
app.BringToFront();
|
||||
startmenu.Hide();
|
||||
}
|
||||
private void windowManagerTestToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -203,43 +140,7 @@ private void installerTestToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
|
||||
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.", Properties.Resources.Win95Warning); return; }
|
||||
ie = wm.startWin95(new WinClassicIE4(), "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);
|
||||
startmenu.Hide();
|
||||
}
|
||||
|
||||
private void desktopicons_Click(object sender, EventArgs e)
|
||||
{
|
||||
Point objDrawingPoint = desktopicons.PointToClient(Cursor.Position);
|
||||
ListViewItem objListViewItem;
|
||||
|
||||
if (objDrawingPoint != null)
|
||||
{
|
||||
objListViewItem = desktopicons.GetItemAt(objDrawingPoint.X, objDrawingPoint.Y);
|
||||
if (objListViewItem != null)
|
||||
{
|
||||
if (objListViewItem.Text == "Internet Explorer")
|
||||
{
|
||||
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", Properties.Resources.Win95IconIE4, true, true);
|
||||
AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4);
|
||||
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";
|
||||
WinClassic app = wm.startWin95(inst, "Web Chat Setup", null, true, true);
|
||||
AddTaskBarItem(app, app.Tag.ToString(), "Web Chat Setup", null);
|
||||
app.BringToFront();
|
||||
startmenu.Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
openApp.OpenApp("ie4");
|
||||
}
|
||||
|
||||
private void infoboxTestToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -259,110 +160,12 @@ private void WebChatToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
app.BringToFront();
|
||||
startmenu.Hide();
|
||||
}
|
||||
public void NonImportantApp_Closing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
Program.nonimportantapps.Remove((WinClassic)sender);
|
||||
}
|
||||
private void InternetExplorer4_Closing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
ie = null;
|
||||
}
|
||||
|
||||
private void WordPadToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
WinClassicWordPad wp = new WinClassicWordPad();
|
||||
WinClassic app = wm.startWin95(wp, "Wordpad", Properties.Resources.Win95IconWordpad, true, true);
|
||||
AddTaskBarItem(app, app.Tag.ToString(), "Wordpad", Properties.Resources.Win95IconWordpad);
|
||||
|
||||
Program.nonimportantapps.Add(app);
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront();
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
|
||||
|
||||
app.BringToFront();
|
||||
startmenu.Hide();
|
||||
}
|
||||
|
||||
public void AddTaskBarItem(Form Application, string ApplicationID, string ApplicationName, Image ApplicationIcon)
|
||||
{
|
||||
taskbarItems = tb.AddTaskbarItem95(ApplicationID, ApplicationName, ApplicationIcon, (UserControl)new Win95TaskBarItem(), taskbarItems);
|
||||
Application.FormClosed += new FormClosedEventHandler(UpdateTaskbarFromClosedApplication);
|
||||
}
|
||||
|
||||
public void UpdateTaskbarFromClosedApplication(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
UpdateTaskbar();
|
||||
}
|
||||
|
||||
public void UpdateTaskbar()
|
||||
{
|
||||
// Clears out all the items on the taskbar
|
||||
taskbarItems.Controls.Clear();
|
||||
|
||||
// Loops through all the Applications which are open
|
||||
|
||||
foreach (Form form in tb.GetAllOpenApps())
|
||||
{
|
||||
// Calls that "AddToTaskbar" thing
|
||||
taskbarItems = tb.AddTaskbarItem95(form.Tag.ToString(), form.Text.ToString(), (Image)form.Icon.ToBitmap(), (UserControl)new Win95TaskBarItem(), taskbarItems);
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
Program.nonimportantapps.Add(app);
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront();
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
|
||||
|
||||
app.BringToFront();
|
||||
startmenu.Hide();
|
||||
}
|
||||
|
||||
private void WindowsExplorerToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
FileDialogBoxManager.IsInOpenDialog = false;
|
||||
FileDialogBoxManager.IsInSaveDialog = false;
|
||||
WinClassicWindowsExplorer we = new WinClassicWindowsExplorer();
|
||||
WinClassic app = wm.startWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true);
|
||||
AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer);
|
||||
|
||||
Program.nonimportantapps.Add(app);
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront();
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
|
||||
|
||||
app.BringToFront();
|
||||
startmenu.Hide();
|
||||
}
|
||||
|
||||
private void storyTest1ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Hack1.startObjective();
|
||||
}
|
||||
|
||||
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();
|
||||
WinClassic app = wm.startWin95(std, "Survive The Day", null, false, false);
|
||||
AddTaskBarItem(app, app.Tag.ToString(), "Survive The Day", null);
|
||||
|
||||
Program.nonimportantapps.Add(app);
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront();
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
|
||||
|
||||
app.BringToFront();
|
||||
startmenu.Hide();
|
||||
}
|
||||
|
||||
//TODO: Add Outlook Express 4
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,8 +127,8 @@
|
|||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADq
|
||||
ggAAAk1TRnQBSQFMAgEBDAEAAXABAQFwAQEBIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADs
|
||||
ggAAAk1TRnQBSQFMAgEBDAEAAXABAQF4AQEBIAEAASABAAT/ASEBEAj/AUIBTQE2BwABNgMAASgDAAGA
|
||||
AwABgAMAAQEBAAEgBwABAf8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A
|
||||
/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A
|
||||
/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8AXAAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/x8AAf8DAAH/
|
||||
|
@ -686,12 +686,9 @@
|
|||
AeABAwHwAwAB/gIAAQcEAAHwAgABAwH4AgABAQH+AgABBwQAAfgCAAEHAfgCAAEBAf4CAAEHBAAB/AIA
|
||||
AQcB/AIAAQMB/gIAAQcDAAEBAf4CAAEOAfwCAAEDAf4CAAEHAYABAAP/AgABHgH8AgABBwH+AgABBwHA
|
||||
AQED/wHAAQABfgH8AgABDwH+AgABBwHgAQMD/wH4AQEB/gH8AgABHwH/AgABBwHwAQcE/wHhAvwCAAE/
|
||||
Af8BgAEAAQcG/wH8AXkB/wIAAv8BwAEAAQ8H/wEDAf8BxAEDAf8L
|
||||
Af8BgAEAAQcG/wH8AXkB/wIAAv8BwAEAAQ8H/wEDAf8BxAEDAf8WAAs=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="rightclickbackproperties.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>398, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>63</value>
|
||||
</metadata>
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using TimeHACK.Engine;
|
||||
using TimeHACK.Engine.Template;
|
||||
|
||||
namespace TimeHACK.OS.Win95.Win95Apps.Story
|
||||
{
|
||||
static class Hack1 : Object
|
||||
{
|
||||
static WinClassicTerminal Console = new WinClassicTerminal();
|
||||
static WindowManager wm = new WindowManager();
|
||||
static Boolean ended = false;
|
||||
static Thread soundThread = new Thread(dialup_sound_play);
|
||||
|
@ -25,7 +25,9 @@ public static void startObjective()
|
|||
{
|
||||
System.Windows.Forms.Timer tmr = new System.Windows.Forms.Timer();
|
||||
|
||||
wm.startWin95(Console, "MS-DOS Prompt", null, true, true);
|
||||
WinClassicTerminal Console = new WinClassicTerminal();
|
||||
WinClassic app = wm.startWin95(Console, "MS-DOS Prompt", null, true, true);
|
||||
|
||||
Console.WriteLine("telnet> 104.27.135.159 Connecting...");
|
||||
|
||||
tmr.Interval = 1;
|
||||
|
@ -33,7 +35,11 @@ public static void startObjective()
|
|||
|
||||
if (devMode == true)
|
||||
{
|
||||
continueObjective();
|
||||
Thread contObjective = new Thread(continueObjective);
|
||||
|
||||
app.Close();
|
||||
|
||||
contObjective.Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -44,6 +50,11 @@ public static void startObjective()
|
|||
|
||||
public static void continueObjective()
|
||||
{
|
||||
WinClassicTerminal Console = new WinClassicTerminal();
|
||||
wm.startWin95(Console, "MS-DOS Prompt", null, true, true);
|
||||
|
||||
Application.DoEvents();
|
||||
|
||||
Console.WriteLine("\ntelnet> 104.27.135.159 Connected.");
|
||||
Thread.Sleep(2500);
|
||||
Console.WriteLine("\ntelnet> 104.27.135.159 set hostname to 'TheHiddenHacker'.");
|
||||
|
@ -65,6 +76,12 @@ public static void continueObjective()
|
|||
Console.WriteLine("\nTheHiddenHacker> The hostname is 172.68.119.42, and the username is most likely 12padams. I'm not too sure what the password is, however.");
|
||||
Thread.Sleep(3500);
|
||||
Console.WriteLine("\nTheHiddenHacker> You'll need to figure out where you can get the password. Try looking for any odd text on the website.");
|
||||
Thread.Sleep(1000);
|
||||
Console.WriteLine("\nTheHiddenHacker> I don't have much time to talk - I'd quickly copy down those details into Notepad before this Terminal gets closed.");
|
||||
|
||||
Application.DoEvents();
|
||||
|
||||
Thread.Sleep(36000);
|
||||
}
|
||||
|
||||
public static void CheckIfSoundFinished(Object sender, EventArgs e)
|
||||
|
|
99
TimeHACK.Main/OpenApplication.cs
Normal file
99
TimeHACK.Main/OpenApplication.cs
Normal file
|
@ -0,0 +1,99 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using TimeHACK.Engine;
|
||||
using TimeHACK.OS.Win95.Win95Apps;
|
||||
using TimeHACK.Engine.Template;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TimeHACK
|
||||
{
|
||||
public class OpenApplication
|
||||
{
|
||||
WindowManager wm = new WindowManager();
|
||||
public String GetDataFromExe(String path)
|
||||
{
|
||||
return File.ReadAllText(path);
|
||||
}
|
||||
|
||||
public void OpenApp(String appName)
|
||||
{
|
||||
WinClassic toReturn = new WinClassic();
|
||||
|
||||
switch (appName.ToLower())
|
||||
{
|
||||
case "notepad":
|
||||
toReturn = wm.startWin95(new WinClassicNotepad(), "Notepad", Properties.Resources.Win95IconNotepad, true, true);
|
||||
Program.AddTaskbarItem(toReturn, toReturn.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad);
|
||||
|
||||
Program.nonimportantapps.Add(toReturn);
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront();
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing);
|
||||
|
||||
toReturn.BringToFront();
|
||||
|
||||
break;
|
||||
case "wordpad":
|
||||
toReturn = wm.startWin95(new WinClassicWordPad(), "Wordpad", Properties.Resources.Win95IconWordpad, true, true);
|
||||
Program.AddTaskbarItem(toReturn, toReturn.Tag.ToString(), "Wordpad", Properties.Resources.Win95IconWordpad);
|
||||
|
||||
Program.nonimportantapps.Add(toReturn);
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront();
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing);
|
||||
|
||||
break;
|
||||
case "addressbook":
|
||||
toReturn = wm.startWin95(new WinClassicAddressBook(), "Address Book", Properties.Resources.WinClassicAddressBook, true, true);
|
||||
Program.AddTaskbarItem(toReturn, toReturn.Tag.ToString(), "Address Book", Properties.Resources.WinClassicAddressBook);
|
||||
|
||||
Program.nonimportantapps.Add(toReturn);
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront();
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing);
|
||||
|
||||
break;
|
||||
case "ie4":
|
||||
toReturn = wm.startWin95(new WinClassicIE4(), "Internet Explorer 4", Properties.Resources.Win95IconNotepad, true, true);
|
||||
Program.AddTaskbarItem(toReturn, toReturn.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconNotepad);
|
||||
|
||||
break;
|
||||
case "windowsexplorer":
|
||||
FileDialogBoxManager.IsInOpenDialog = false;
|
||||
FileDialogBoxManager.IsInSaveDialog = false;
|
||||
WinClassicWindowsExplorer we = new WinClassicWindowsExplorer();
|
||||
WinClassic app = wm.startWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true);
|
||||
Program.AddTaskbarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer);
|
||||
|
||||
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();
|
||||
|
||||
break;
|
||||
case "survivetheday":
|
||||
TimeHACK.OS.Win2K.Win2KApps.SurviveTheDay std = new TimeHACK.OS.Win2K.Win2KApps.SurviveTheDay();
|
||||
toReturn = wm.startWin95(std, "Survive The Day", null, false, false);
|
||||
Program.AddTaskbarItem(toReturn, toReturn.Tag.ToString(), "Survive The Day", null);
|
||||
|
||||
Program.nonimportantapps.Add(toReturn);
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront();
|
||||
Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing);
|
||||
|
||||
toReturn.BringToFront();
|
||||
|
||||
break;
|
||||
case "webchat1998":
|
||||
WebChat1998 wc = new WebChat1998();
|
||||
toReturn = wm.startWin95(wc, "Web Chat 1998", null, true, true);
|
||||
Program.AddTaskbarItem(toReturn, toReturn.Tag.ToString(), "Web Chat 1998", null);
|
||||
|
||||
toReturn.BringToFront();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -12,6 +12,7 @@
|
|||
using TimeHACK.OS.Win95.Win95Apps;
|
||||
using TimeHACK.Engine;
|
||||
using TimeHACK.Engine.Template;
|
||||
using System.Drawing;
|
||||
|
||||
namespace TimeHACK
|
||||
{
|
||||
|
@ -116,5 +117,15 @@ public static void GetAppVeyor()
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
public static void AddTaskbarItem(Form Application, string ApplicationID, string ApplicationName, Image ApplicationIcon)
|
||||
{
|
||||
TitleScreen.frm95.AddTaskBarItem(Application, ApplicationID, ApplicationName, ApplicationIcon);
|
||||
}
|
||||
|
||||
public static void NonImportantApp_Closing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
Program.nonimportantapps.Remove((WinClassic)sender);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
10
TimeHACK.Main/Properties/Resources.Designer.cs
generated
10
TimeHACK.Main/Properties/Resources.Designer.cs
generated
|
@ -483,6 +483,16 @@ internal static System.Drawing.Bitmap WinClassicAddressBookPropertiesIcon {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap WinClassicCalc {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("WinClassicCalc", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
|
|
@ -501,4 +501,7 @@
|
|||
}
|
||||
}</value>
|
||||
</data>
|
||||
<data name="WinClassicCalc" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\WinClassic\WinClassicCalc.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
|
@ -121,6 +121,7 @@
|
|||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="OpenApplication.cs" />
|
||||
<Compile Include="OS\BIOS\BIOS.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -273,10 +274,10 @@
|
|||
<Compile Include="TitleScreen.Designer.cs">
|
||||
<DependentUpon>TitleScreen.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BaseOS.cs">
|
||||
<Compile Include="OS\BaseOS.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BaseOS.Designer.cs">
|
||||
<Compile Include="OS\BaseOS.Designer.cs">
|
||||
<DependentUpon>BaseOS.cs</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="OS\BIOS\BIOS.resx">
|
||||
|
@ -359,7 +360,7 @@
|
|||
<EmbeddedResource Include="TitleScreen.resx">
|
||||
<DependentUpon>TitleScreen.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="BaseOS.resx">
|
||||
<EmbeddedResource Include="OS\BaseOS.resx">
|
||||
<DependentUpon>BaseOS.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<None Include="packages.config" />
|
||||
|
@ -432,6 +433,7 @@
|
|||
<None Include="Resources\WinClassic\WinClassicAddressBookNewIcon.png" />
|
||||
<None Include="Resources\WinClassic\WinClassicAddressBookPropertiesIcon.png" />
|
||||
<None Include="Resources\WinClassic\WinClassicAddressBookDeleteIcon.png" />
|
||||
<None Include="Resources\WinClassic\WinClassicCalc.png" />
|
||||
<Content Include="Resources\WinClassic\WinClassicClock.png" />
|
||||
<Content Include="Resources\WinClassic\WinClassicComputer.png" />
|
||||
<None Include="Resources\WinClassic\WinClassicCopy.png" />
|
||||
|
|
Loading…
Reference in a new issue