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
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.Media;
using System.Text.RegularExpressions;
namespace ShiftOS.Main
{
public partial class HijackScreen : Form
{
public string actualshiftversion = "0.0.1.1";
string rtext;
string gtexttotype;
int charcount;
int currentletter;
int slashcount;
int conversationcount = 0;
Label textgeninput;
bool needtoclose = false;
string oldversion;
public bool upgraded = false;
SoundPlayer player = new SoundPlayer();
FileStream fs;
int hackeffect;
int percentcount;
static DriveInfo[] cdrives = DriveInfo.GetDrives();
DriveInfo cdrive = Array.Find(cdrives, c => "C:\\" == "C:\\");
public HijackScreen()
{
InitializeComponent();
}
private void PlaySound(Stream path)
{
player.Stream = path;
player.Play();
player.Stream.Position = 0;
}
private void HijackScreen_Load(object sender, EventArgs e)
{
//extractdlls();
Control.CheckForIllegalCrossThreadCalls = false;
this.FormBorderStyle = FormBorderStyle.None;
this.WindowState = FormWindowState.Maximized;
if (Directory.Exists("C:\\ShiftOS-Rewind"))
{
if (File.ReadAllText("C:/ShiftOS-Rewind/Shiftum42/HDAccess.sft") == actualshiftversion)
{
//ShiftOSDesktop.Show();
conversationtimer.Start();
needtoclose = true;
}
else
{
if (MessageBox.Show("Your save file is not currently compatible with this version of ShiftOS. Would you like to upgrade your save file so you can continue to play the latest version of ShiftOS without losing your progress? If so click yes below. If you would like to start a new game and wipe all your progress please click no", "Warning: Update your save file", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
{
this.Hide();
//ShiftOS_Save_File_Converter.Show();
// ShiftOS_Save_File_Converter.BringToFront();
}
else
{
oldversion = System.IO.File.ReadAllText("C:/ShiftOS-Rewind/Shiftum42/HDAccess.sft");
upgraded = true;
System.IO.Directory.Delete("C:/ShiftOS-Rewind/", true);
backgroundWorker1.RunWorkerAsync();
conversationtimer.Start();
hackeffecttimer.Start();
}
}
}
else
{
backgroundWorker1.RunWorkerAsync();
conversationtimer.Start();
hackeffecttimer.Start();
}
}
private void TextType(string texttotype)
{
conversationtimer.Stop();
charcount = texttotype.Length;
gtexttotype = texttotype;
currentletter = 0;
slashcount = 1;
textgen.Start();
}
private void textgen_Tick(object sender, EventArgs e)
{
switch (slashcount)
{
case 1:
if (currentletter < gtexttotype.Length)
{
textgeninput.Text = rtext + "\\";
}
break;
case 2:
if (currentletter < gtexttotype.Length)
{
textgeninput.Text = rtext + "|";
}
break;
case 3:
if (currentletter < gtexttotype.Length)
{
textgeninput.Text = rtext + "/";
}
break;
case 4:
if (currentletter < gtexttotype.Length)
{
rtext = rtext + Regex.Split(gtexttotype, string.Empty)[currentletter];
currentletter = currentletter + 1;
textgeninput.Text = rtext;
}
break;
}
slashcount = slashcount + 1;
if (slashcount == 5)
slashcount = 1;
if (currentletter == gtexttotype.Length)
{
gtexttotype = "";
PlaySound(Properties.Resources.typesound);
conversationtimer.Start();
textgen.Stop();
}
}
private void conversationtimer_Tick(object sender, EventArgs e)
{
switch (conversationcount)
{
case 0:
if (needtoclose == true)
this.Close();
break;
case 1:
textgeninput = lblHijack;
TextType("Your computer is now being Hijacked ");
conversationtimer.Interval = 1000;
break;
case 3:
textgeninput = lblhackwords;
textgen.Interval = 10;
rtext = "";
TextType("Congratulations, " + Environment.UserName + "you have been involuntarily selected to be an Alpha Tester for ShiftOS!" + Environment.NewLine + Environment.NewLine);
break;
case 4:
TextType("At this time, I do not wish to reveal any of my intentions and idenity." + Environment.NewLine + Environment.NewLine);
break;
case 5:
TextType("I just need to use you and your computer as an external test bed to evolve my experimental operating system." + Environment.NewLine + Environment.NewLine);
break;
case 6:
TextType("I need to expand the name of ShiftOS, so I'll work on it, and you'll have the chance to use ShiftOS!" + Environment.NewLine + Environment.NewLine);
break;
case 7:
TextType("Your hard drive will now be formatted in preparation for the installation of ShiftOS." + Environment.NewLine + Environment.NewLine);
break;
case 8:
TextType("Starting Format.");
conversationtimer.Interval = 500;
break;
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
case 16:
case 17:
case 18:
TextType(".");
break;
case 19:
rtext = "";
break;
case 20:
TextType("Scanning Drive C:\\...");
break;
case 21:
TextType(Environment.NewLine + Environment.NewLine + "Drive Label: " + cdrive.VolumeLabel);
break;
case 22:
TextType(Environment.NewLine + "Total Drive Size: " + String.Format((cdrive.TotalSize / 1024 / 1024 / 1024).ToString(), "0.00") + "GB. ");
break;
case 23:
TextType(Environment.NewLine + "Old File System: " + cdrive.DriveFormat + ". ");
break;
case 24:
TextType(Environment.NewLine + "New File System: ShiftFS. ");
break;
case 25:
TextType(Environment.NewLine + Environment.NewLine + "Formatting C:\\... - ");
conversationtimer.Interval = 100;
break;
case 26: // TODO: to 126
textgeninput.Text = rtext + percentcount + "%";
if (percentcount < 101)
{
percentcount = percentcount + 1;
PlaySound(Main.Properties.Resources.writesound);
}
break;
case 127:
rtext = rtext + "100%";
conversationtimer.Interval = 1000;
break;
case 128:
TextType(Environment.NewLine + "Format Complete");
break;
case 129:
rtext = "";
percentcount = 0;
TextType("Installing ShiftOS Beta 0.0.1 - ");
conversationtimer.Interval = 200;
break;
case 130: // TODO: to 230
textgeninput.Text = rtext + percentcount + "%" + Environment.NewLine + Environment.NewLine;
if (percentcount < 101)
{
percentcount = percentcount + 1;
PlaySound(Properties.Resources.writesound);
}
switch (percentcount)
{
case 1:
case 2:
textgeninput.Text = textgeninput.Text + "C:/Home";
if ((!System.IO.Directory.Exists("C:/ShiftOS-Rewind/Home")))
System.IO.Directory.CreateDirectory("C:/ShiftOS-Rewind/Home");
break;
case 3:
case 4:
textgeninput.Text = textgeninput.Text + "C:/Home/Documents";
if ((!System.IO.Directory.Exists("C:/ShiftOS-Rewind/Home/Documents")))
System.IO.Directory.CreateDirectory("C:/ShiftOS-Rewind/Home/Documents");
break;
case 5:
case 6:
case 7:
case 8:
case 9:
textgeninput.Text = textgeninput.Text + "C:/Home/Documents/ShiftOSInfo.txt";
fs = File.Create("C:/ShiftOS-Rewind/Home/Documents/ShiftOSInfo.txt");
fs.Close();
break;
case 10:
case 11:
case 12:
textgeninput.Text = textgeninput.Text + "C:/Home/Music";
if ((!System.IO.Directory.Exists("C:/ShiftOS-Rewind/Home/Music")))
System.IO.Directory.CreateDirectory("C:/ShiftOS-Rewind/Home/Music");
break;
case 13:
case 14:
case 15:
textgeninput.Text = textgeninput.Text + "C:/Home/Pictures";
if ((!System.IO.Directory.Exists("C:/ShiftOS-Rewind/Home/Pictures")))
System.IO.Directory.CreateDirectory("C:/ShiftOS-Rewind/Home/Pictures");
break;
case 16:
case 17:
case 18:
textgeninput.Text = textgeninput.Text + "C:/Shiftum42";
if ((!System.IO.Directory.Exists("C:/ShiftOS-Rewind/Shiftum42")))
System.IO.Directory.CreateDirectory("C:/ShiftOS-Rewind/Shiftum42");
break;
case 19:
case 20:
textgeninput.Text = textgeninput.Text + "C:/Shiftum42/Drivers";
if ((!System.IO.Directory.Exists("C:/ShiftOS-Rewind/Shiftum42/Drivers")))
System.IO.Directory.CreateDirectory("C:/ShiftOS-Rewind/Shiftum42/Drivers");
break;
case 21:
case 22:
case 23:
case 24:
case 25:
case 26:
case 27:
textgeninput.Text = textgeninput.Text + "C:/Shiftum42/Drivers/HDD.dri";
fs = File.Create("C:/ShiftOS-Rewind/Shiftum42/Drivers/HDD.dri");
fs.Close();
break;
case 28:
case 29:
case 30:
case 31:
case 32:
case 33:
case 34:
case 35:
textgeninput.Text = textgeninput.Text + "C:/Shiftum42/Drivers/Keyboard.dri";
fs = File.Create("C:/ShiftOS-Rewind/Shiftum42/Drivers/Keyboard.dri");
fs.Close();
break;
case 36:
case 37:
case 38:
case 39:
case 40:
case 41:
case 42:
case 43:
case 44:
textgeninput.Text = textgeninput.Text + "C:/Shiftum42/Drivers/Monitor.dri";
fs = File.Create("C:/ShiftOS-Rewind/Shiftum42/Drivers/Monitor.dri");
fs.Close();
break;
case 45:
case 46:
case 47:
case 48:
case 49:
case 50:
case 51:
case 52:
textgeninput.Text = textgeninput.Text + "C:/Shiftum42/Drivers/Mouse.dri";
fs = File.Create("C:/ShiftOS-Rewind/Shiftum42/Drivers/Mouse.dri");
fs.Close();
break;
case 53:
case 54:
case 55:
case 56:
case 57:
case 58:
case 59:
case 60:
textgeninput.Text = textgeninput.Text + "C:/Shiftum42/Drivers/Printer.dri";
fs = File.Create("C:/ShiftOS-Rewind/Shiftum42/Drivers/Printer.dri");
fs.Close();
break;
case 61:
case 62:
case 63:
case 64:
case 65:
case 66:
case 67:
case 68:
textgeninput.Text = textgeninput.Text + "C:/Shiftum42/Languages/";
if ((!System.IO.Directory.Exists("C:/ShiftOS-Rewind/Shiftum42/Languages/")))
System.IO.Directory.CreateDirectory("C:/ShiftOS-Rewind/Shiftum42/Languages/");
break;
case 69:
case 70:
case 71:
case 72:
case 73:
case 74:
case 75:
case 76:
textgeninput.Text = textgeninput.Text + "C:/Shiftum42/Languages/English.lang";
fs = File.Create("C:/ShiftOS-Rewind/Shiftum42/Languages/English.lang");
fs.Close();
break;
case 77:
case 78:
case 79:
case 80:
case 81:
case 82:
case 83:
case 84:
textgeninput.Text = textgeninput.Text + "C:/Shiftum42/HDAccess.sft";
fs = File.Create("C:/ShiftOS-Rewind/Shiftum42/HDAccess.sft");
fs.Close();
System.IO.StreamWriter objWriter = new System.IO.StreamWriter("C:/ShiftOS-Rewind/Shiftum42/HDAccess.sft", false);
objWriter.Write(actualshiftversion);
objWriter.Close();
break;
case 85:
case 86:
case 87:
case 88:
case 89:
textgeninput.Text = textgeninput.Text + "C:/Shiftum42/ShiftGUI.sft";
fs = File.Create("C:/ShiftOS-Rewind/Shiftum42/ShiftGUI.sft");
fs.Close();
break;
case 90:
case 91:
case 92:
case 93:
textgeninput.Text = textgeninput.Text + "C:/Shiftum42/SKernal.sft";
fs = File.Create("C:/ShiftOS-Rewind/Shiftum42/SKernal.sft");
fs.Close();
break;
case 94:
case 95:
case 96:
case 97:
textgeninput.Text = textgeninput.Text + "C:/Shiftum42/SRead.sft";
fs = File.Create("C:/ShiftOS-Rewind/Shiftum42/SRead.sft");
fs.Close();
break;
case 98:
case 99:
case 100:
case 101:
textgeninput.Text = textgeninput.Text + "C:/Shiftum42/SWrite.sft";
fs = File.Create("C:/ShiftOS-Rewind/Shiftum42/SWrite.sft");
fs.Close();
break;
}
break;
case 231:
textgeninput.Text = rtext + "100%" + Environment.NewLine + Environment.NewLine + "C:/Shiftum42/SWrite.sft";
conversationtimer.Interval = 1000;
PlaySound(Properties.Resources.writesound);
break;
case 232:
textgeninput.Text = rtext + "100%" + Environment.NewLine + Environment.NewLine + "ShiftOS Installation Complete!";
PlaySound(Properties.Resources.typesound);
if ((!System.IO.Directory.Exists("C:/ShiftOS-Rewind/SoftwareData/")))
System.IO.Directory.CreateDirectory("C:/ShiftOS-Rewind/SoftwareData/");
if ((!System.IO.Directory.Exists("C:/ShiftOS-Rewind/SoftwareData/KnowledgeInput")))
System.IO.Directory.CreateDirectory("C:/ShiftOS-Rewind/SoftwareData/KnowledgeInput");
fs = File.Create("C:/ShiftOS-Rewind/SoftwareData/KnowledgeInput/Animals.lst");
fs.Close();
fs = File.Create("C:/ShiftOS-Rewind/SoftwareData/KnowledgeInput/Fruits.lst");
fs.Close();
fs = File.Create("C:/ShiftOS-Rewind/SoftwareData/KnowledgeInput/Countries.lst");
fs.Close();
break;
case 234:
//ShiftOSDesktop.newgame = true;
//ShiftOSDesktop.Show();
//Terminal.Show();
//Terminal.tmrfirstrun.Start();
//this.Close();
break;
}
conversationcount = conversationcount + 1;
}
private void hackeffecttimer_Tick(object sender, EventArgs e)
{
if (hackeffect < 101)
{
switch (hackeffect)
{
case 1:
case 3:
case 5:
case 7:
case 9:
case 11:
case 13:
case 15:
case 17:
case 19:
case 21:
case 23:
case 25:
case 27:
case 29:
case 31:
case 33:
case 35:
case 37:
case 39:
case 41:
case 43:
case 45:
case 47:
case 49:
case 51:
case 53:
case 55:
case 57:
case 59:
case 61:
case 63:
case 65:
case 67:
case 69:
case 71:
case 73:
case 75:
case 77:
case 79:
case 81:
case 83:
case 85:
case 87:
case 89:
case 91:
case 93:
case 95:
this.BackColor = Color.Black;
PlaySound(Properties.Resources.writesound);
break;
case 2:
case 4:
case 6:
case 8:
case 10:
case 12:
case 14:
case 16:
case 18:
case 20:
case 22:
case 24:
case 26:
case 28:
this.BackColor = Color.White;
PlaySound(Properties.Resources.typesound);
break;
case 30:
case 32:
case 34:
case 36:
case 38:
case 40:
case 42:
case 44:
case 46:
case 48:
case 50:
this.BackColor = Color.Gainsboro;
PlaySound(Properties.Resources.typesound);
break;
case 52:
case 54:
case 56:
case 58:
case 60:
case 62:
case 64:
case 66:
case 68:
case 70:
case 72:
case 74:
case 76:
this.BackColor = Color.Silver;
PlaySound(Properties.Resources.typesound);
break;
case 78:
case 80:
case 82:
case 84:
case 86:
case 88:
case 90:
case 92:
case 94:
this.BackColor = Color.DimGray;
PlaySound(Properties.Resources.typesound);
break;
case 96:
lblHijack.BackColor = Color.LightGray;
break;
case 97:
lblHijack.BackColor = Color.DarkGray;
break;
case 98:
lblHijack.BackColor = Color.DimGray;
break;
case 99:
lblHijack.BackColor = Color.Black;
lblHijack.ForeColor = Color.DimGray;
break;
case 100:
lblHijack.Hide();
break;
}
}
else
{
hackeffecttimer.Stop();
}
hackeffect = hackeffect + 1;
}
}
}
|