1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
|
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Media;
using System.Windows.Forms;
using TimeHACK.Engine;
using TimeHACK.Engine.Template;
using TimeHACK.Engine.Template.Taskbars;
using TimeHACK.OS.Win95.Win95Apps;
using TimeHACK.WinClassicForms;
using TimeHACK.OS.Win95.Win95Apps.Story;
using TimeHACK.OS;
namespace TimeHACK.OS.Win95
{
public partial class Windows95 : BaseOS
{
private SoundPlayer startsound;
private SoundPlayer stopsound;
public WindowManager wm = new WindowManager();
public WinClassic webchat;
public WinClassic ie;
public TaskBarController tb = new TaskBarController();
public int currentappcount = 0;
public bool webchatInstalled = false;
public bool hiddenpadamsFound = false;
// Init the form
public Windows95()
{
InitializeComponent();
}
// When New Game is clicked in TitleScreen.cs
private void Desktop_Load(object sender, EventArgs e)
{
// Setup the Form
startmenu.Hide();
// Make Font Mandatory
fontLoad();
// Play Windows 95 Start Sound
Stream audio = Properties.Resources.Win95Start;
startsound = new SoundPlayer(audio);
startsound.Play();
//Program.nonimportantapps.Capacity = 100;
// Update the taskbar
UpdateTaskbar();
// Bring to this the front
this.BringToFront();
}
private void fontLoad()
{
this.taskbartime.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
this.ProgramsToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
this.DocumentsToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
this.SettingsToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
this.FindToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
this.HelpToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
this.RunToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
this.SuspendToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
this.ShutdownToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
this.desktopicons.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
}
#region StartMenu
#endregion //Region
// On Desktop MouseDown
private void desktop_mousedown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
rightclickbackproperties.Show();
rightclickbackproperties.BringToFront();
rightclickbackproperties.Location = MousePosition;
}
// If
else if (e.Button == MouseButtons.Left)
{
rightclickbackproperties.Hide();
startmenu.Hide();
}
else if (e.Button == MouseButtons.Middle)
{
rightclickbackproperties.Hide();
}
}
private void NotePadToolStripMenuItem_Click(object sender, EventArgs e)
{
openApp.OpenApp("notepad");
startmenu.Hide();
}
private void windowManagerTestToolStripMenuItem_Click(object sender, EventArgs e)
{
TestApp test = new TestApp();
WinClassic app = wm.startWin95(test, "TestApp", null, true, true);
AddTaskBarItem(app, app.Tag.ToString(), "TestApp", null);
app.BringToFront();
startmenu.Hide();
}
private void downloaderTestToolStripMenuItem_Click(object sender, EventArgs e)
{
WinClassicDownloader opendownload = new WinClassicDownloader();
WinClassic app = wm.startWin95(opendownload, "Downloader", null, false, true);
opendownload.appName.Text = "Downloading: Survive The Day";
AddTaskBarItem(app, app.Tag.ToString(), "Downloader", null);
app.BringToFront();
startmenu.Hide();
}
private void installerTestToolStripMenuItem_Click(object sender, EventArgs e)
{
WinClassicInstaller openinstaller = new WinClassicInstaller();
WinClassic app = wm.startWin95(openinstaller, "Installer", null, false, true);
AddTaskBarItem(app, app.Tag.ToString(), "Installer", null);
app.BringToFront();
startmenu.Hide();
}
private void InternetExplorerToolStripMenuItem_Click(object sender, EventArgs e)
{
openApp.OpenApp("ie4");
}
private void infoboxTestToolStripMenuItem_Click(object sender, EventArgs e)
{
WinClassic app = wm.startInfobox95("AShifter's Infobox", "This is the very first TimeHACK Infobox. It's really easy to call, too! \n Just use wm.startInfobox95(String title, String text, Image erroricon)!", Properties.Resources.Win95Info);
app.BringToFront();
startmenu.Hide();
}
private void WebChatToolStripMenuItem_Click(object sender, EventArgs e)
{
WebChat1998 wc = new WebChat1998();
WinClassic app = wm.startWin95(wc, "Web Chat 1998", null, true, true);
AddTaskBarItem(app, app.Tag.ToString(), "Web Chat 1998", null);
app.BringToFront();
startmenu.Hide();
}
private void storyTest1ToolStripMenuItem_Click(object sender, EventArgs e)
{
Hack1.startObjective();
}
//TODO: Add Outlook Express 4
}
}
|