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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
|
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Media;
using System.Windows.Forms;
using Histacom2.Engine;
using Histacom2.Engine.Template;
using Histacom2.Engine.Template.Taskbars;
using Histacom2.OS.Win95.Win95Apps;
using Histacom2.OS.Win95.Win95Apps.Story;
using static Histacom2.Engine.SaveSystem;
using Histacom2.OS.Win98.Win98Apps;
using Histacom2.GlobalPrograms;
namespace Histacom2.OS.Win98
{
public partial class Windows98 : Form
{
private SoundPlayer startsound;
public WindowManager wm = new WindowManager();
public List<WinClassic> nonimportantapps = new List<WinClassic>();
public WebChat1999 webchat;
public WinClassic ie;
public WinClassic welcome;
public TaskBarController tb = new TaskBarController();
public int currentappcount = 0;
public bool webchatInstalled = false;
public bool hiddenpadamsFound = false;
public WinClassicTimeDistorter2 distort;
// Overrides the Painting function of the Form, so that you don't see all that crap drawing.
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000; // Turn on WS_EX_COMPOSITED
return cp;
}
}
// Init the form
public Windows98()
{
InitializeComponent();
startmenu.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
ProgramsToolStripMenuItem.DropDown.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
AccessoriesToolStripMenuItem.DropDown.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
CommunicationsToolStripMenuItem.DropDown.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
MultimediaToolStripMenuItem.DropDown.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
SystemToolsToolStripMenuItem.DropDown.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
StartUpToolStripMenuItem.DropDown.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
MSDOSPromptToolStripMenuItem.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);
FindToolStripMenuItem.DropDown.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
BackgroundImage = currentTheme.defaultWallpaper;
foreach (ToolStripMenuItem item in startmenuitems.Items)
{
item.MouseEnter += new EventHandler(MenuItem_MouseEnter);
item.MouseLeave += new EventHandler(MenuItem_MouseLeave);
}
foreach (ToolStripMenuItem item in ProgramsToolStripMenuItem.DropDown.Items)
{
item.MouseEnter += new EventHandler(MenuItem_MouseEnter);
item.MouseLeave += new EventHandler(MenuItem_MouseLeave);
}
}
private void MenuItem_MouseEnter(object sender, EventArgs e)
{
//((ToolStripMenuItem)sender).ForeColor = Color.White;
}
private void MenuItem_MouseLeave(object sender, EventArgs e)
{
//((ToolStripMenuItem)sender).ForeColor = Color.Black;
}
// When New Game is clicked in TitleScreen.cs
private void Desktop_Load(object sender, EventArgs e)
{
if (!CurrentSave.FTime95) UpgradeFileSystem( "98");
if (currentTheme.defaultWallpaper != null) desktopicons.BackgroundImage = new Bitmap(currentTheme.defaultWallpaper, Width, Height);
//Start Menu Color - Commented until it works reliably
//startmenuitems.Renderer = new MyRenderer();
//ProgramsToolStripMenuItem.DropDown.Renderer = new MyRenderer();
// Make Font Mandatory
fontLoad();
// Play Windows 95 Start Sound
Stream audio = currentTheme.startSound;
startsound = new SoundPlayer(audio);
startsound.Play();
// Hide the Startmenu
startmenu.Hide();
// Check for and set VM Mode
if (this.FormBorderStyle != FormBorderStyle.None)
{
this.Text = "Histacom2 - VM Mode";
}
// Start the ClockTimer
clockTimer.Start();
// Set the StartMenu seperator
startmenuitems.Items.Insert(6, new ToolStripSeparator());
//nonimportantapps.Capacity = 100;
this.SendToBack();
// Update the taskbar
UpdateTaskbar();
// Bring to this the front
this.BringToFront();
// Update the desktop Icons!
DesktopController.RefreshDesktopIcons(new ListViewItem[] { new System.Windows.Forms.ListViewItem("My Computer", 0),
new System.Windows.Forms.ListViewItem("Network Neighborhood", 5),
new System.Windows.Forms.ListViewItem("Inbox", 3),
new System.Windows.Forms.ListViewItem("Recycle Bin", 7),
new System.Windows.Forms.ListViewItem("Internet Explorer", 2),
new System.Windows.Forms.ListViewItem("Online Services", 1),
new System.Windows.Forms.ListViewItem("Set Up The Microsoft Network", 4),
new System.Windows.Forms.ListViewItem("Outlook Express", 6) }, ref desktopicons, Path.Combine(ProfileWindowsDirectory, "Desktop"));
}
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
// StartButton Click
private void startbutton_Click(object sender, EventArgs e)
{
startmenu.Show();
startmenu.BringToFront();
if (taskbar.Visible) taskbar.BringToFront();
}
// Shutdown button
private void ShutdownToolStripMenuItem_Click(object sender, EventArgs e)
{
SaveGame();
Program.ShutdownApplication(currentTheme.stopSound);
}
#endregion //Region
// Give Year Code - NYI
private void taskbartime_Click(object sender, EventArgs e)
{
}
// 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)
{
if (e.Button == MouseButtons.Right)
{
// Check if an item is selected and if so show the Delete option
if (desktopicons.FocusedItem != null)
{
deleteToolStripMenuItem.Visible = true;
}
else
{
deleteToolStripMenuItem.Visible = false;
}
desktopupdate_Tick(null, null); // Update the Desktop Icons
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)
{
WinClassicNotepad wp = new WinClassicNotepad();
WinClassic app = wm.Init(wp, "Notepad", Properties.Resources.Win95IconNotepad, true, true);
AddTaskBarItem(app, app.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad);
nonimportantapps.Add(app);
nonimportantapps[nonimportantapps.Count - 1].BringToFront();
nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
app.BringToFront();
startmenu.Hide();
}
private void downloaderTestToolStripMenuItem_Click(object sender, EventArgs e)
{
WinClassicDownloader opendownload = new WinClassicDownloader();
WinClassic app = wm.Init(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("Testing");
WinClassic app = wm.Init(openinstaller, "Installer", null, false, true);
AddTaskBarItem(app, app.Tag.ToString(), "Installer", null);
app.BringToFront();
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.", InfoboxType.Warning, InfoboxButtons.OK); return; }
ie = wm.Init(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_DoubleClick(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.", InfoboxType.Warning, InfoboxButtons.OK); return; }
ie = wm.Init(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 == "My Computer")
{
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();
}
else if (objListViewItem.Text == "Network Neighborhood")
{
// Alex's TODO here
}
else if (objListViewItem.Text == "Recycle Bin")
{
// Another thing you may need to digital poke Alex about doing.
}
else if (objListViewItem.Text == "Set Up The Microsoft Network")
{
wm.StartInfobox95("Microsoft Network", "The Microsoft Network is already set up!", InfoboxType.Info, InfoboxButtons.OK);
}
else if (objListViewItem.Text == "Outlook Express")
{
//wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error);
}
else if (objListViewItem.Text == "Inbox")
{
//wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error);
}
else
{
// It is an actual file on the disk
WinClassicWindowsExplorer we = new WinClassicWindowsExplorer();
// If it is a directory
if (Directory.Exists(objListViewItem.Tag.ToString()))
{
we.CurrentDirectory = objListViewItem.Tag.ToString();
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();
}
else we.OpenFile(objListViewItem.Tag.ToString()); // Just open the file...
}
}
}
}
private void infoboxTestToolStripMenuItem_Click(object sender, EventArgs e)
{
WinClassic app = wm.StartInfobox95("AShifter's Infobox", "This is the very first Histacom2 Infobox. It's really easy to call, too! \n Just use wm.startInfobox95(string title, string text, InfoboxType type, InfoboxButtons btns)!", InfoboxType.Info, InfoboxButtons.OK);
app.BringToFront();
startmenu.Hide();
}
private void WebChatToolStripMenuItem_Click(object sender, EventArgs e)
{
if (webchat != null) return;
webchat = new WebChat1999();
WinClassic app = wm.Init(webchat, "Web Chat 1999", null, true, true);
AddTaskBarItem(app, app.Tag.ToString(), "Web Chat 1999", null);
app.BringToFront();
startmenu.Hide();
app.FormClosing += (s, fe) => webchat = null;
}
public void NonImportantApp_Closing(object sender, FormClosingEventArgs e)
{
nonimportantapps.Remove((WinClassic)sender);
}
public void InternetExplorer4_Closing(object sender, FormClosingEventArgs e)
{
ie = null;
}
private void WordPadToolStripMenuItem_Click(object sender, EventArgs e)
{
WinClassicWordPad wp = new WinClassicWordPad();
WinClassic app = wm.Init(wp, "Wordpad", Properties.Resources.Win95IconWordpad, true, true);
AddTaskBarItem(app, app.Tag.ToString(), "Wordpad", Properties.Resources.Win95IconWordpad);
nonimportantapps.Add(app);
nonimportantapps[nonimportantapps.Count - 1].BringToFront();
nonimportantapps[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)
{
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);
Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront();
Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing);
app.BringToFront();
}
private void WindowsExplorerToolStripMenuItem1_Click(object sender, EventArgs e)
{
FileDialogBoxManager.IsInOpenDialog = false;
FileDialogBoxManager.IsInSaveDialog = false;
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);
nonimportantapps[nonimportantapps.Count - 1].BringToFront();
nonimportantapps[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)
{
Win2K.Win2KApps.SurviveTheDay std = new Win2K.Win2KApps.SurviveTheDay();
WinClassic app = wm.Init(std, "Survive The Day", null, false, false);
AddTaskBarItem(app, app.Tag.ToString(), "Survive The Day", null);
nonimportantapps.Add(app);
nonimportantapps[nonimportantapps.Count - 1].BringToFront();
nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
app.BringToFront();
startmenu.Hide();
}
private void MSDOSPromptToolStripMenuItem1_Click(object sender, EventArgs e)
{
WinClassicTerminal msdos = new WinClassicTerminal(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();
startmenu.Hide();
}
private void PropertiesToolStripMenuItem1_Click(object sender, EventArgs e)
{
WinClassicThemePanel theme = new WinClassicThemePanel();
WinClassic app = wm.Init(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)
{
if (distort != null) return;
distort = new WinClassicTimeDistorter2();
WinClassic app = wm.Init(distort, "Time Distorter", null, false, false, false);
AddTaskBarItem(app, app.Tag.ToString(), "Time Distorter", null);
app.BringToFront();
startmenu.Hide();
}
private void CalculatorToolStripMenuItem_Click(object sender, EventArgs e)
{
WinClassic app = wm.Init(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();
}
private void desktopupdate_Tick(object sender, EventArgs e)
{
DesktopController.RefreshDesktopIcons(new ListViewItem[] { new ListViewItem("My Computer", 0),
new ListViewItem("Network Neighborhood", 5),
new ListViewItem("Inbox", 3),
new ListViewItem("Recycle Bin", 7),
new ListViewItem("Internet Explorer", 2),
new ListViewItem("Online Services", 1),
new ListViewItem("Set Up The Microsoft Network", 4),
new ListViewItem("Outlook Express", 6) }, ref desktopicons, Path.Combine(ProfileWindowsDirectory, "Desktop"));
}
private void FolderToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Directory.Exists(Path.Combine(ProfileWindowsDirectory, "Desktop", "New Folder")))
{
wm.StartInfobox95("Windows Explorer", "A folder called New Folder already exists - please rename it.", InfoboxType.Error, InfoboxButtons.OK);
}
else
{
SaveDirectoryInfo(Path.Combine(ProfileWindowsDirectory, "Desktop"), "New Folder", false, "New folder", true);
}
}
private void TextDocumentToolStripMenuItem_Click(object sender, EventArgs e)
{
if (File.Exists(Path.Combine(ProfileWindowsDirectory, "Desktop", "New Text Document.txt")))
{
wm.StartInfobox95("Windows Explorer", "A folder called New Text Document already exists - please rename it.", InfoboxType.Error, InfoboxButtons.OK);
}
else
{
File.Create(Path.Combine(ProfileWindowsDirectory, "Desktop", "New Text Document.txt"));
}
desktopupdate_Tick(null, null); // Update the Desktop Icons
}
private void deleteToolStripMenuItem_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.Tag != null)
{
if (Directory.Exists(objListViewItem.Tag.ToString()))
{
Directory.Delete(objListViewItem.Tag.ToString(), true);
desktopupdate_Tick(null, null); // Update the desktop Icons
}
else
{
if (File.Exists(objListViewItem.Tag.ToString()))
{
File.Delete(objListViewItem.Tag.ToString());
desktopupdate_Tick(null, null); // Update the desktop Icons
}
else
{
wm.StartInfobox95("Windows Explorer", "This object cannot be deleted.", InfoboxType.Error, InfoboxButtons.OK);
}
}
}
else
{
wm.StartInfobox95("Windows Explorer", "This object cannot be deleted.", InfoboxType.Error, InfoboxButtons.OK);
}
}
}
}
private void waitUntil98Loaded_Tick(object sender, EventArgs e)
{
if (Visible)
{
//Check if it is the first time
if (!CurrentSave.FTime98)
{
CurrentSave.FTime98 = true;
SaveGame();
welcome = wm.Init(new Win98Welcome(), "Welcome", null, false, false, resize: false);
AddTaskBarItem(welcome, welcome.Tag.ToString(), "Welcome", null);
nonimportantapps.Add(welcome);
nonimportantapps[nonimportantapps.Count - 1].BringToFront();
nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
welcome.BringToFront();
welcome.Activate();
waitUntil98Loaded.Enabled = false;
}
}
}
}
}
|