forked from MarkusMaal/BlueScreenSimulatorPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAboutSettingsDialog.cs
More file actions
1521 lines (1440 loc) · 81.8 KB
/
AboutSettingsDialog.cs
File metadata and controls
1521 lines (1440 loc) · 81.8 KB
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
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using System;
using System.Drawing;
using System.Reflection;
using System.Windows.Forms;
using System.IO;
using SimulatorDatabase;
using System.Collections.Generic;
using System.Threading;
using System.Diagnostics;
namespace UltimateBlueScreenSimulator
{
partial class AboutSettingsDialog : Form
{
//If this flag is set, then help tabs are hidden and setting tabs are visible
public bool SettingTab = false;
public int tab_id = 0;
public bool DevBuild = false;
public bool finished = false;
readonly Random r = new Random();
public AboutSettingsDialog()
{
InitializeComponent();
//Get assembly information about the program
this.Text = String.Format("About {0}", AssemblyTitle);
this.labelProductName.Text = "Blue Screen Simulator Plus";
if (DevBuild) { this.labelProductName.Text += " [Development Build]"; }
this.labelVersion.Text = String.Format("Version {0} with Verifile 1.1", AssemblyVersion);
this.labelCopyright.Text = AssemblyCopyright;
this.labelCompanyName.Text = "Codename *Waffles*\nLanguage: C# (.NET framework, Windows Forms)\nCreated by: Markus Maal a.k.a. mmaal (markustegelane)\n\nThis program can only be provided free of charge (if you had to pay for this, please ask for a refund). This program is provided as is, without a warranty.\n2022 Markuse tarkvara (Markus' software)";
}
#region Assembly Attribute Accessors
public string AssemblyTitle
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
if (attributes.Length > 0)
{
AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0];
if (titleAttribute.Title != "")
{
return titleAttribute.Title;
}
}
return Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
}
}
public string AssemblyVersion
{
get
{
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
}
}
public string AssemblyDescription
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyDescriptionAttribute)attributes[0]).Description;
}
}
public string AssemblyProduct
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyProductAttribute)attributes[0]).Product;
}
}
public string AssemblyCopyright
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
}
}
public string AssemblyCompany
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyCompanyAttribute)attributes[0]).Company;
}
}
#endregion
private void SetInitalInterface(object sender, EventArgs e)
{
if (Program.f1.nightThemeToolStripMenuItem.Checked)
{
aboutSettingsTabControl.Appearance = TabAppearance.FlatButtons;
this.BackColor = Color.Black;
this.ForeColor = Color.Gray;
foreach (Panel p in aboutSettingsTabControl.TabPages)
{
p.BackColor = this.BackColor;
p.ForeColor = this.ForeColor;
}
markusSoftwareLogo.BackColor = Color.DimGray;
veriFileLogo.BackColor = Color.DimGray;
primaryServerBox.BackColor = Color.Black;
primaryServerBox.ForeColor = Color.Gray;
primaryServerBox.BorderStyle = BorderStyle.FixedSingle;
configList.BackColor = Color.Black;
configList.ForeColor = Color.Gray;
configList.BorderStyle = BorderStyle.FixedSingle;
helpDisplay.BackColor = Color.Black;
helpDisplay.ForeColor = Color.Gray;
commandLineHelpDisplay.BackColor = Color.Black;
commandLineHelpDisplay.ForeColor = Color.Gray;
}
//Ping main form that the about box/help/settings dialog is open
Program.f1.abopen = true;
//Hide settings tabs
if (!SettingTab)
{
updatePanel.Dispose();
simulatorSettingsPanel.Dispose();
rndFactButton.Visible = Program.f1.enableeggs;
}
//Hide help/about tabs and get settings
if (SettingTab)
{
aboutPanel.Dispose();
commandLinePanel.Dispose();
helpPanel.Dispose();
eggHunterButton.Checked = Program.f1.enableeggs;
if (Program.f1.GMode == "HighQualityBicubic") { scalingModeBox.SelectedIndex = 0; }
if (Program.f1.GMode == "HighQualityBilinear") { scalingModeBox.SelectedIndex = 1; }
if (Program.f1.GMode == "Bilinear") { scalingModeBox.SelectedIndex = 4; }
if (Program.f1.GMode == "Bicubic") { scalingModeBox.SelectedIndex = 3; }
if (Program.f1.GMode == "NearestNeighbour") { scalingModeBox.SelectedIndex = 2; }
hideInFullscreenButton.Checked = !Program.f1.showcursor;
}
aboutSettingsTabControl.SelectedIndex = tab_id;
}
private void TabSwitcher(object sender, EventArgs e)
{
//Perform specific actions when switching to a specific tab
if (aboutSettingsTabControl.SelectedTab.Text == "Update settings")
{
//I/O test, to make sure that it is possible to write data to current media. If not, then some options become disabled.
try
{
File.WriteAllText("iotest", "This is a test");
File.Delete("iotest");
} catch
{
noticeLabel.Text = "Cannot write to current directory. Settings will not be saved.";
unsignButton.Enabled = false;
updateCheckButton.Enabled = false;
autoUpdateRadio.Enabled = false;
}
//Loads update configuration
autoUpdateRadio.Checked = Program.f1.autoupdate;
noUpdatesRadio.Checked = !Program.f1.autoupdate;
hashBox.Checked = Program.f1.hashverify;
updateImmediatelyRadio.Checked = !Program.f1.postponeupdate;
updateOnCloseRadio.Checked = Program.f1.postponeupdate;
primaryServerBox.Text = Program.update_server;
if (!((primaryServerBox.Text == "http://markustegelane.tk/app") || (primaryServerBox.Text == "http://web-markustegelane.000webhostapp.com/app")))
{
primaryServerBox.Enabled = true;
}
}
if (aboutSettingsTabControl.SelectedTab.Text == "Simulator settings")
{
//Loads simulator configuration
eggHunterButton.Checked = Program.f1.enableeggs;
if (Program.f1.GMode == "HighQualityBicubic") { scalingModeBox.SelectedIndex = 0; }
else if (Program.f1.GMode == "HighQualityBilinear") { scalingModeBox.SelectedIndex = 1; }
else if (Program.f1.GMode == "Bilinear") { scalingModeBox.SelectedIndex = 4; }
else if (Program.f1.GMode == "Bicubic") { scalingModeBox.SelectedIndex = 3; }
else if (Program.f1.GMode == "NearestNeighbour") { scalingModeBox.SelectedIndex = 2; }
switch (Program.multidisplaymode)
{
case "none":
multiDisplayBox.SelectedIndex = 0;
break;
case "blank":
multiDisplayBox.SelectedIndex = 1;
break;
case "mirror":
multiDisplayBox.SelectedIndex = 2;
break;
case "freeze":
multiDisplayBox.SelectedIndex = 3;
break;
}
hideInFullscreenButton.Checked = !Program.f1.showcursor;
configList.ClearSelected();
configList.Items.Clear();
randomnessCheckBox.Checked = Program.randomness;
foreach (BlueScreen bs in Program.bluescreens)
{
configList.Items.Add(bs.GetString("friendlyname"));
}
devFlowPanel.Visible = DevBuild;
}
else if (aboutSettingsTabControl.SelectedTab.Text == "Command line help")
{
//Loads command line help
commandLineHelpDisplay.Text = Program.cmds.Replace("\n", Environment.NewLine);
}
}
//Help texts
private void QuickHelp_Help(object sender, EventArgs e)
{
helpDisplay.Text = "How to quickly get help?\n\nFor items that have [?] at the end, you can just hover over them for more information.".Replace("\n", Environment.NewLine);
}
private void QuickHelp_Purpose(object sender, EventArgs e)
{
helpDisplay.Text = "What is the purpose of this program?\n\nThis program can be used as a way of screenshotting bluescreens without actually crashing your computer or messing with virtual machines. You can also use this program for pranking purposes (no harm will be done to the system).".Replace("\n", Environment.NewLine);
}
private void QuickHelp_SystemRequirements(object sender, EventArgs e)
{
helpDisplay.Text = "System requirements:\n\nOS: Windows XP or later (Windows 8 or later recommended)\n150MB of available RAM (recommended minimum)\n50MB of available RAM (absolute minimum)\nx86 or compatible processor\nRead-Write storage media\nMicrosoft.NET Framework 4.0\n1000bps or internet connection (for updates and online help functionality)\nScreen resolution: 1024x720 or higher (1280x720 or higher recommended)".Replace("\n", Environment.NewLine);
}
//Closes the dialog and sets dialogresult to ok
private void OkButton_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
this.Close();
}
private void UnsignMe(object sender, EventArgs e)
{
//Removes verification signature from the system
try
{
if (File.Exists(Environment.GetEnvironmentVariable("USERPROFILE") + "\\bssp2_firstlaunch.txt"))
{
File.Delete(Environment.GetEnvironmentVariable("USERPROFILE") + "\\bssp2_firstlaunch.txt");
MessageBox.Show("Signature removed successfully.", "Verifile verification system", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch (Exception ex)
{
MessageBox.Show("Something went wrong. Please send the following details to the developer:\n\n" + ex.Message + "\n\n" + ex.StackTrace);
}
}
private void CheckForUpdates(object sender, EventArgs e)
{
//This code starts the check for updates
if (Program.f1.DoWeHaveInternet(1000))
{
if (File.Exists("vercheck.txt"))
{
File.Delete("vercheck.txt");
}
UpdateInterface ui = new UpdateInterface();
ui.DownloadFile(Program.update_server + "/bssp_version.txt", "vercheck.txt");
updateCheckButton.Enabled = false;
updateCheckButton.Text = "Checking for updates...";
updateCheckerTimer.Enabled = true;
Program.f1.updateCheckerTimer.Interval = 5998;
Program.f1.updateCheckerTimer.Enabled = true;
} else
{
MessageBox.Show("No internet connection available", "Couldn't check for updates", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void UpdateTimer_Tick(object sender, EventArgs e)
{
//Checks if check for updates has finished
if (!Program.f1.updateCheckerTimer.Enabled)
{
updateCheckerTimer.Enabled = false;
updateCheckButton.Enabled = true;
updateCheckButton.Text = "Check for updates";
}
}
//Saves configuration
private void EnableDisableUpdateSetup(object sender, EventArgs e)
{
Program.f1.autoupdate = autoUpdateRadio.Checked;
}
private void UpdateWhenDoneSetup(object sender, EventArgs e)
{
if (updateImmediatelyRadio.Checked == true)
{
Program.f1.postponeupdate = false;
}
else
{
Program.f1.postponeupdate = true;
}
}
private void HashcheckSetup(object sender, EventArgs e)
{
Program.f1.hashverify = hashBox.Checked;
}
private void ScalingModeSetup(object sender, EventArgs e)
{
if (scalingModeBox.SelectedIndex == 0)
{
Program.f1.GMode = "HighQualityBicubic";
}
else if (scalingModeBox.SelectedIndex == 1)
{
Program.f1.GMode = "HighQualityBilinear";
}
else if (scalingModeBox.SelectedIndex == 2)
{
Program.f1.GMode = "NearestNeighbour";
}
else if (scalingModeBox.SelectedIndex == 4)
{
Program.f1.GMode = "Bilinear";
}
else if (scalingModeBox.SelectedIndex == 3)
{
Program.f1.GMode = "Bicubic";
}
}
private void CursorVisibilitySetup(object sender, EventArgs e)
{
if (hideInFullscreenButton.Checked == true)
{
Program.f1.showcursor = false;
}
else
{
Program.f1.showcursor = true;
}
}
private void ExitMe(object sender, FormClosingEventArgs e)
{
//Makes sure that the configuration is saved when closing the form
Program.f1.abopen = false;
if (SettingTab)
{
Program.f1.GetOS();
}
}
private void EggHunter(object sender, EventArgs e)
{
Program.f1.enableeggs = eggHunterButton.Checked;
}
private void OnMeResized(object sender, EventArgs e)
{
helpDisplay.Size = new Size(helpPanelChild.Width, Convert.ToInt32(helpPanelChild.Height * 0.8010638));
}
private void ConfigSelector(object sender, EventArgs e)
{
if (configList.SelectedIndices.Count > 0)
{
osName.Text = string.Format("Selected configuration: {0}", Program.bluescreens[configList.SelectedIndex].GetString("friendlyname"));
} else
{
osName.Text = "Select a configuration to modify/remove it";
}
resetButton.Enabled = (configList.SelectedIndices.Count > 0);
resetHackButton.Enabled = (configList.SelectedIndices.Count > 0);
removeCfg.Enabled = (configList.SelectedIndices.Count > 0);
}
private void ConfigHackEraser(object sender, EventArgs e)
{
if (configList.SelectedIndices.Count > 0)
{
if (MessageBox.Show("Warning: This will remove any custom settings from this configuration. ANY UNSAVED CHANGES WILL BE LOST!!! Are you sure you want to continue?", "Reset bugcheck", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
{
string backfriendly = Program.bluescreens[configList.SelectedIndex].GetString("friendlyname");
string backicon = Program.bluescreens[configList.SelectedIndex].GetString("icon");
Program.bluescreens[configList.SelectedIndex] = new BlueScreen(Program.bluescreens[configList.SelectedIndex].GetString("os"));
Program.bluescreens[configList.SelectedIndex].SetString("icon", backicon);
Program.bluescreens[configList.SelectedIndex].SetString("friendlyname", backfriendly);
MessageBox.Show("Configuration was reset", "Reset everything", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("Reason: The user clicked no", "No changes were made", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
} else
{
if (MessageBox.Show("Would you restore default configurations?", "Seecret factory defaults option", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
configList.ClearSelected();
configList.Items.Clear();
Program.bluescreens.Clear();
Program.ReRe();
foreach (BlueScreen bs in Program.bluescreens)
{
configList.Items.Add(bs.GetString("friendlyname"));
}
MessageBox.Show("Configurations were reset", "Seecret factory defaults", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("No action was performed.", "Seecret factory defaults", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
private void ResetConfig(object sender, EventArgs e)
{
if (configList.SelectedIndices.Count > 0)
{
if (MessageBox.Show("Warning: This will remove any setting set under the 'additional options' menu. Other settings set in the main screen will remain the same. ANY UNSAVED CHANGES WILL BE LOST!!! Are you sure you want to continue?", "Reset hacks", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
{
Program.bluescreens[configList.SelectedIndex].ClearAllTitleTexts();
Program.bluescreens[configList.SelectedIndex].SetOSSpecificDefaults();
MessageBox.Show("Hacks were reset", "Reset hacks", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("Reason: The user clicked no", "No changes were made", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
configList.ClearSelected();
} else
{
if (MessageBox.Show("Would you like to reset everything under the 'additional options' menu to defaults for all configurations?", "Seecret factory hacks defaults", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
configList.ClearSelected();
configList.Items.Clear();
foreach (BlueScreen bs in Program.bluescreens)
{
bs.ClearAllTitleTexts();
bs.SetOSSpecificDefaults();
}
MessageBox.Show("Hacks were reset", "Seecret factory hacks defaults", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("No action was performed.", "Seecret factory hacks defaults", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
private void ConfigEraser(object sender, EventArgs e)
{
if (configList.SelectedIndices.Count > 0)
{
if (MessageBox.Show("Warning: This will remove this configuration from the repository. ANY UNSAVED CHANGES WILL BE LOST!!! Are you sure you want to do that?", "Delete bugcheck", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
{
Program.bluescreens.Remove(Program.bluescreens[configList.SelectedIndex]);
configList.ClearSelected();
configList.Items.Clear();
foreach (BlueScreen bs in Program.bluescreens)
{
configList.Items.Add(bs.GetString("friendlyname"));
}
MessageBox.Show("Config removed successfully", "Configuration deletion", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("Reason: The user clicked no", "No changes were made", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
} else
{
if (MessageBox.Show("Would you like to remove all configurations?", "Nuke mode", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
{
configList.ClearSelected();
configList.Items.Clear();
Program.bluescreens.Clear();
resetHackButton.Enabled = false;
resetButton.Enabled = false;
removeCfg.Enabled = false;
MessageBox.Show("Configurations erased. All configurations must be re-added manually.\nNote: Do not use the main interface before adding any configurations!", "Nuke mode", MessageBoxButtons.OK, MessageBoxIcon.Information);
} else
{
MessageBox.Show("No action was performed.", "Nuke mode", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
private void AddConfig(object sender, EventArgs e)
{
if (new AddBluescreen().ShowDialog() == DialogResult.OK)
{
configList.ClearSelected();
configList.Items.Clear();
foreach (BlueScreen bs in Program.bluescreens)
{
configList.Items.Add(bs.GetString("friendlyname"));
}
}
}
private void MultiDisplaySetup(object sender, EventArgs e)
{
switch (multiDisplayBox.SelectedIndex)
{
case 0: Program.multidisplaymode = "none"; break;
case 1: Program.multidisplaymode = "blank"; break;
case 2: Program.multidisplaymode = "mirror"; break;
case 3: Program.multidisplaymode = "freeze"; break;
}
}
private bool CheckExist(string os1, string os2 = "", string os3 = "")
{
foreach (BlueScreen bs in Program.bluescreens)
{
if ((bs.GetString("os") == os1) || (bs.GetString("os") == os2) || (bs.GetString("os") == os3))
{
return true;
}
}
return false;
}
// This function is used create version 1.x compatible save file
private string LegacySave()
{
string filedata = "*** Blue screen simulator plus 1.11 ***";
BlueScreen winmodern = Program.bluescreens[0];
BlueScreen wineight = Program.bluescreens[0];
BlueScreen vista7 = Program.bluescreens[0];
BlueScreen xp = Program.bluescreens[0];
BlueScreen win2k = Program.bluescreens[0];
BlueScreen winnt = Program.bluescreens[0];
BlueScreen ninexme = Program.bluescreens[0];
BlueScreen ce = Program.bluescreens[0];
BlueScreen threeone = Program.bluescreens[0];
bool bsdefined = false;
// select winModern (Windows 10 or 11)
if (!CheckExist("Windows 10", "Windows 11")) { return " * ERROR * "; }
while (!bsdefined)
{
foreach (BlueScreen bs in Program.bluescreens) {if ((bs.GetString("os") == "Windows 11") || (bs.GetString("os") == "Windows 10")) { if (MessageBox.Show(string.Format("Would you like to use the following blue screen as the configuration base for modern blue screens and text data for Windows 10 blue screen:\n\n{0}", bs.GetString("friendlyname")), "Legacy save function", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { winmodern = bs; bsdefined = true; break; } } }
}
if (!CheckExist("Windows 8/8.1")) { return " * ERROR * "; }
bsdefined = false;
while (!bsdefined)
{
foreach (BlueScreen bs in Program.bluescreens) { if ((bs.GetString("os") == "Windows 11") || (bs.GetString("os") == "Windows 10") || (bs.GetString("os") == "Windows 8/8.1")) { if (MessageBox.Show(string.Format("Would you like to use the following blue screen's text data for Windows 8/8.1 blue screens:\n\n{0}", bs.GetString("friendlyname")), "Legacy save function", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { wineight = bs; bsdefined = true; break; } } }
}
if (!CheckExist("Windows Vista", "Windows 7")) { return " * ERROR * "; }
bsdefined = false;
while (!bsdefined)
{
foreach (BlueScreen bs in Program.bluescreens) { if ((bs.GetString("os") == "Windows Vista") || (bs.GetString("os") == "Windows 7")) { if (MessageBox.Show(string.Format("Would you like to use the following blue screen as the configuration base for Windows Vista/7 blue screens:\n\n{0}", bs.GetString("friendlyname")), "Legacy save function", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { vista7 = bs; bsdefined = true; break; } } }
}
if (!CheckExist("Windows XP")) { return " * ERROR * "; }
bsdefined = false;
while (!bsdefined)
{
foreach (BlueScreen bs in Program.bluescreens)
{
if ((bs.GetString("os") == "Windows XP"))
{
if (MessageBox.Show(string.Format("Would you like to use the following blue screen as the configuration base for Windows XP blue screen:\n\n{0}", bs.GetString("friendlyname")), "Legacy save function", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
xp = bs; bsdefined = true; break;
}
}
}
}
if (!CheckExist("Windows 2000")) { return " * ERROR * "; }
bsdefined = false;
while (!bsdefined)
{
foreach (BlueScreen bs in Program.bluescreens)
{
if ((bs.GetString("os") == "Windows 2000"))
{
if (MessageBox.Show(string.Format("Would you like to use the following blue screen as the configuration base for Windows 2000 blue screen:\n\n{0}", bs.GetString("friendlyname")), "Legacy save function", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
win2k = bs; bsdefined = true; break;
}
}
}
}
bsdefined = false;
if (!CheckExist("Windows NT 3.x/4.0")) { return " * ERROR * "; }
while (!bsdefined)
{
foreach (BlueScreen bs in Program.bluescreens)
{
if ((bs.GetString("os") == "Windows NT 3.x/4.0"))
{
if (MessageBox.Show(string.Format("Would you like to use the following blue screen as the configuration base for Windows NT 3.x/4.0 blue screen:\n\n{0}", bs.GetString("friendlyname")), "Legacy save function", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
winnt = bs; bsdefined = true; break;
}
}
}
}
bsdefined = false;
if (!CheckExist("Windows 9x/Me")) { return " * ERROR * "; }
while (!bsdefined)
{
foreach (BlueScreen bs in Program.bluescreens)
{
if ((bs.GetString("os") == "Windows 9x/Me"))
{
if (MessageBox.Show(string.Format("Would you like to use the following blue screen as the configuration base for Windows 9x/Me blue screens:\n\n{0}", bs.GetString("friendlyname")), "Legacy save function", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
ninexme = bs; bsdefined = true; break;
}
}
}
}
bsdefined = false;
if (!CheckExist("Windows CE")) { return " * ERROR * "; }
while (!bsdefined)
{
foreach (BlueScreen bs in Program.bluescreens)
{
if ((bs.GetString("os") == "Windows CE"))
{
if (MessageBox.Show(string.Format("Would you like to use the following blue screen as the configuration base for Windows CE blue screens:\n\n{0}", bs.GetString("friendlyname")), "Legacy save function", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
ce = bs; bsdefined = true; break;
}
}
}
}
bsdefined = false;
if (!CheckExist("Windows 3.1x")) { return " * ERROR * "; }
while (!bsdefined)
{
foreach (BlueScreen bs in Program.bluescreens)
{
if ((bs.GetString("os") == "Windows 3.1x"))
{
if (MessageBox.Show(string.Format("Would you like to use the following blue screen as the configuration base for Windows 3.1x CTRL+ALT+DELETE screen:\n\n{0}", bs.GetString("friendlyname")), "Legacy save function", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
threeone = bs; bsdefined = true; break;
}
}
}
}
filedata += string.Format("\nFACE {0}", winmodern.GetString("emoticon"));
filedata += string.Format("\nMODERN {0}:{1}:{2},{3}:{4}:{5}", winmodern.GetTheme(true).R, winmodern.GetTheme(true).G, winmodern.GetTheme(true).B, winmodern.GetTheme(false).R, winmodern.GetTheme(false).G, winmodern.GetTheme(false).B);
filedata += string.Format("\nW2K {0}:{1}:{2},{3}:{4}:{5}", win2k.GetTheme(true).R, win2k.GetTheme(true).G, win2k.GetTheme(true).B, win2k.GetTheme(false).R, win2k.GetTheme(false).G, win2k.GetTheme(false).B);
filedata += string.Format("\nNT34 {0}:{1}:{2},{3}:{4}:{5}", winnt.GetTheme(true).R, winnt.GetTheme(true).G, winnt.GetTheme(true).B, winnt.GetTheme(false).R, winnt.GetTheme(false).G, winnt.GetTheme(false).B);
filedata += string.Format("\nW9XME {0}:{1}:{2},{3}:{4}:{5}", ninexme.GetTheme(true).R, ninexme.GetTheme(true).G, ninexme.GetTheme(true).B, ninexme.GetTheme(false).R, ninexme.GetTheme(false).G, ninexme.GetTheme(false).B);
filedata += string.Format("\nW9XME_HL {0}:{1}:{2},{3}:{4}:{5}", ninexme.GetTheme(true, true).R, ninexme.GetTheme(true, true).G, ninexme.GetTheme(true, true).B, ninexme.GetTheme(false, true).R, ninexme.GetTheme(false, true).G, ninexme.GetTheme(false, true).B);
filedata += "\n--STRINGBUILD START--\n";
filedata += string.Format("{0}//{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}//--STRINGBUILD END--",
ninexme.GetTitles()["Main"],
ninexme.GetTitles()["System is busy"],
ninexme.GetTitles()["Warning"],
ninexme.GetTexts()["System error"],
ninexme.GetTexts()["Prompt"],
threeone.GetTexts()["No unresponsive programs"],
ninexme.GetInt("blink_speed"),
ninexme.GetTexts()["Application error"],
ninexme.GetTexts()["Driver error"],
ninexme.GetTexts()["System is busy"],
ninexme.GetTexts()["System is unresponsive"],
ce.GetTexts()["A problem has occurred..."],
ce.GetTexts()["CTRL+ALT+DEL message"],
ce.GetTexts()["Technical information"],
ce.GetTexts()["Technical information formatting"],
ce.GetTexts()["Restart message"],
ce.GetInt("timer"),
winnt.GetTexts()["Error code formatting"],
winnt.GetTexts()["CPUID formatting"],
winnt.GetTexts()["Stack trace heading"],
winnt.GetTexts()["Stack trace table formatting"],
winnt.GetTexts()["Memory address dump heading"],
winnt.GetTexts()["Memory address dump table"],
winnt.GetTexts()["Troubleshooting text"],
win2k.GetTexts()["Error code formatting"],
win2k.GetTexts()["Troubleshooting introduction"],
xp.GetTexts()["A problem has been detected..."],
win2k.GetTexts()["Troubleshooting text"],
win2k.GetTexts()["Additional troubleshooting information"],
xp.GetTexts()["Troubleshooting introduction"],
xp.GetTexts()["Troubleshooting"],
xp.GetTexts()["Technical information"],
xp.GetTexts()["Technical information formatting"],
xp.GetTexts()["Physical memory dump"],
xp.GetTexts()["Technical support"] + "\n" + vista7.GetTexts()["Technical support"],
vista7.GetTexts()["Physical memory dump"],
wineight.GetTexts()["Information text with dump"],
wineight.GetTexts()["Information text without dump"],
wineight.GetTexts()["Error code"],
winmodern.GetTexts()["Information text without dump"],
winmodern.GetTexts()["Information text with dump"],
winmodern.GetTexts()["Additional information"],
winmodern.GetTexts()["Culprit file"],
winmodern.GetTexts()["Progress"],
winmodern.GetTexts()["Error code"]);
filedata += "\n--FONT START--";
Font textfont = winmodern.GetFont();
float textsize = textfont.Size;
Font emotifont = new Font(winmodern.GetFont().FontFamily, textsize * 5f, winmodern.GetFont().Style);
Font modernDetailFont = new Font(winmodern.GetFont().FontFamily, textsize * 0.55f, winmodern.GetFont().Style);
filedata += string.Format("\nemotiFont: {0},Bold={1},Italic={2},Underline={3}", emotifont.ToString().Replace("[Font: Name=", "").Replace("]", "").Replace(", ", ","), winmodern.GetFont().Bold, winmodern.GetFont().Italic, winmodern.GetFont().Underline);
filedata += string.Format("\nmodernTextFont: {0},Bold={1},Italic={2},Underline={3}", textfont.ToString().Replace("[Font: Name=", "").Replace("]", "").Replace(", ", ","), winmodern.GetFont().Bold, winmodern.GetFont().Italic, winmodern.GetFont().Underline);
filedata += string.Format("\nmodernDetailFont: {0},Bold={1},Italic={2},Underline={3}", modernDetailFont.ToString().Replace("[Font: Name=", "").Replace("]", "").Replace(", ", ","), winmodern.GetFont().Bold, winmodern.GetFont().Italic, winmodern.GetFont().Underline);
filedata += string.Format("\nlabel50: {0},Bold={1},Italic={2},Underline={3}", vista7.GetFont().ToString().Replace("[Font: Name=", "").Replace("]", "").Replace(", ", ","), vista7.GetFont().Bold, vista7.GetFont().Italic, vista7.GetFont().Underline);
filedata += string.Format("\nlabel49: {0},Bold={1},Italic={2},Underline={3}", xp.GetFont().ToString().Replace("[Font: Name=", "").Replace("]", "").Replace(", ", ","), xp.GetFont().Bold, xp.GetFont().Italic, xp.GetFont().Underline);
filedata += "\nlabel39: Lucida Console,Size=8,Units=3,GdiCharSet=1,GdiVerticalFont=False,Bold=True,Italic=False,Underline=False";
filedata += string.Format("\nlabel26: {0},Bold={1},Italic={2},Underline={3}", ce.GetFont().ToString().Replace("[Font: Name=", "").Replace("]", "").Replace(", ", ","), ce.GetFont().Bold, ce.GetFont().Italic, ce.GetFont().Underline);
filedata += "\n--FONT END--";
filedata += "\n--MISC START--";
filedata += string.Format("\nqrSize: {0}", winmodern.GetInt("qr_size"));
if (winmodern.GetString("qr_file").Contains("local:"))
{
if (winmodern.GetString("qr_file").Contains("local:0"))
{
filedata += "\nqrType: Default";
} else
{
filedata += "\nqrType: Transparent";
}
} else
{
filedata += "\nqrType: Custom";
}
filedata += string.Format("\nqrPath: {0}", winmodern.GetString("qr_file"));
filedata += "\n--MISC END--\n";
return filedata;
}
private void SaveData(string filename)
{
string filedata;
if (saveBsconfig.FilterIndex == 1)
{
filedata = "*** Blue screen simulator plus 2.1 ***";
} else if (saveBsconfig.FilterIndex == 2)
{
filedata = "*** Blue screen simulator plus 2.0 ***";
} else
{
filedata = LegacySave();
if (filedata != " * ERROR * ")
{
File.WriteAllText(filename, filedata, System.Text.Encoding.Unicode);
MessageBox.Show("Blue screen configuration saved successfully", "Blue screen simulator 1.x configuration file creator", MessageBoxButtons.OK, MessageBoxIcon.Information);
} else
{
MessageBox.Show("Blue screen configuration was not saved, because an error occoured.\n\nBefore attempting to save to 1.x format, make sure that the following operating systems exist in your configuration list:\n\nWindows 10 and/or 11\nWindows Vista or Windows 7\nWindows XP\nWindows CE\nWindows NT 3.x/4.0\nWindows 9x/Me\nWindows 3.1x", "Blue screen simulator 1.x configuration file creator", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
finished = true;
Thread.CurrentThread.Abort();
}
foreach (BlueScreen bs in Program.bluescreens)
{
if (saveBsconfig.FilterIndex == 1)
{
filedata += "\n\n\n#" + bs.GetString("os") + "\n\n";
} else
{
filedata += "\n\n\n#" + bs.GetString("os").Replace("Windows Vista", "Windows Vista/7").Replace("Windows 7", "Windows Vista/7") + "\n\n";
}
if (bs.AllStrings().Count > 0)
{
filedata += "\n\n[string]";
foreach (KeyValuePair<string, string> entry in bs.AllStrings())
{
filedata += "\n" + entry.Key + "=" + entry.Value.Replace(":", "::").Replace("#", ":h:").Replace(";", ":sc:").Replace("[", ":sb:").Replace("]", ":eb:") + ";";
}
}
filedata += "\necode1=" + bs.GetString("ecode1") + ";";
filedata += "\necode2=" + bs.GetString("ecode2") + ";";
filedata += "\necode3=" + bs.GetString("ecode3") + ";";
filedata += "\necode4=" + bs.GetString("ecode4") + ";";
filedata += "\nicon=" + bs.GetString("icon") + ";";
if ((bs.AllProgress().Count > 0) && (saveBsconfig.FilterIndex == 1))
{
filedata += "\n\n[progress]";
foreach (KeyValuePair<int, int> entry in bs.AllProgress())
{
filedata += string.Format("\n{0}={1};", entry.Key, entry.Value);
}
}
if (bs.GetFiles().Count > 0)
{
filedata += "\n\n[nt_codes]";
foreach (KeyValuePair<string, string[]> entry in bs.GetFiles())
{
filedata += "\n" + entry.Key + "=" + string.Join(",", entry.Value) + ";";
}
}
if (bs.AllBools().Count > 0)
{
filedata += "\n\n[boolean]";
foreach (KeyValuePair<string, bool> entry in bs.AllBools())
{
if (!((entry.Key == "font_support") && (bs.GetString("os") == "Windows 2000") && (saveBsconfig.FilterIndex != 1)))
{
filedata += "\n" + entry.Key + "=" + entry.Value.ToString() + ";";
}
else
{
// makes sure that Windows 2k blue screens have font support if saving in older format
filedata += "\nfont_support=True;";
}
}
}
if (bs.AllInts().Count > 0)
{
filedata += "\n\n[integer]";
foreach (KeyValuePair<string, int> entry in bs.AllInts())
{
filedata += "\n" + entry.Key + "=" + entry.Value.ToString() + ";";
}
}
filedata += "\n\n[theme]";
filedata += "\nbg=" + RGB_String(bs.GetTheme(true)) + ";";
filedata += "\nfg=" + RGB_String(bs.GetTheme(false)) + ";";
filedata += "\nhbg=" + RGB_String(bs.GetTheme(true, true)) + ";";
filedata += "\nhfg=" + RGB_String(bs.GetTheme(false, true)) + ";";
if (bs.GetTitles().Count > 0)
{
filedata += "\n\n[title]";
foreach (KeyValuePair<string, string> entry in bs.GetTitles())
{
filedata += "\n" + entry.Key + "=" + entry.Value.Replace(":", "::").Replace("#", ":h:").Replace(";", ":sc:").Replace("[", ":sb:").Replace("]", ":eb:") + ";";
}
}
if (bs.GetTexts().Count > 0)
{
filedata += "\n\n[text]";
foreach (KeyValuePair<string, string> entry in bs.GetTexts())
{
filedata += "\n" + entry.Key + "=" + entry.Value.Replace(":", "::").Replace("#", ":h:").Replace(";", ":sc:").Replace("[", ":sb:").Replace("]", ":eb:") + ";";
}
}
if (bs.GetBool("font_support") || ((saveBsconfig.FilterIndex == 2) && (bs.GetString("os") == "Windows 2000")))
{
if (bs.GetString("os") != "Windows 2000")
{
filedata += "\n\n[format]";
filedata += "\nfontfamily=" + bs.GetFont().FontFamily.Name + ";";
filedata += "\nsize=" + bs.GetFont().Size.ToString() + ";";
filedata += "\nstyle=" + bs.GetFont().Style.ToString() + ";";
} else
{
// Added to support saving to version 2.0 format
filedata += "\n\n[format]";
filedata += "\nfontfamily=Lucida Console;";
filedata += "\nsize=8;";
filedata += "\nstyle=Bold;";
}
}
}
}
private void SaveConfig(object sender, EventArgs e)
{
if (saveBsconfig.ShowDialog() == DialogResult.OK)
{
Thread t = new Thread(() => SaveData(saveBsconfig.FileName));
t.Start();
finished = false;
checkIfLoadedSaved.Enabled = true;
this.Enabled = false;
}
}
private Color StringToRGB(string rgb)
{
string[] splitted_rgb = rgb.Split(',');
return Color.FromArgb(Convert.ToInt32(splitted_rgb[0]), Convert.ToInt32(splitted_rgb[1]), Convert.ToInt32(splitted_rgb[2]));
}
private string RGB_String(Color rgb)
{
return rgb.R.ToString() + "," + rgb.G.ToString() + "," + rgb.B.ToString();
}
// This function only exists to support backwards compatibility with older BSSP config files
// don't judge it
// it is a reworked version of spaghetti that existed in the first version
public void LegacyLoad(string[] filelines)
{
try
{
// remove versions that aren't supported by 1.x files
Program.bluescreens.Clear();
Program.bluescreens.Add(new BlueScreen("Windows 3.1x"));
Program.bluescreens.Add(new BlueScreen("Windows 9x/Me"));
Program.bluescreens.Add(new BlueScreen("Windows CE"));
Program.bluescreens.Add(new BlueScreen("Windows NT 3.x/4.0"));
Program.bluescreens.Add(new BlueScreen("Windows 2000"));
Program.bluescreens.Add(new BlueScreen("Windows XP"));
Program.bluescreens.Add(new BlueScreen("Windows 7"));
Program.bluescreens.Add(new BlueScreen("Windows 8/8.1"));
Program.bluescreens.Add(new BlueScreen("Windows 10"));
foreach (string fileline in filelines)
{
if (fileline.Contains("***")) { continue; }
if (fileline.StartsWith("FACE "))
{
Program.bluescreens[7].SetString("emoticon", fileline.Replace("FACE ", ""));
Program.bluescreens[8].SetString("emoticon", fileline.Replace("FACE ", ""));
}
else if (fileline.StartsWith("MODERN "))
{
Program.bluescreens[7].SetTheme(Color.FromArgb(Convert.ToInt32(fileline.Replace("MODERN ", "").Split(',')[0].ToString().Split(':')[0].ToString()), Convert.ToInt32(fileline.Replace("MODERN ", "").Split(',')[0].ToString().Split(':')[1].ToString()), Convert.ToInt32(fileline.Replace("MODERN ", "").Split(',')[0].ToString().Split(':')[2].ToString())), Color.FromArgb(Convert.ToInt32(fileline.Replace("MODERN ", "").Split(',')[1].ToString().Split(':')[0].ToString()), Convert.ToInt32(fileline.Replace("MODERN ", "").Split(',')[1].ToString().Split(':')[1].ToString()), Convert.ToInt32(fileline.Replace("MODERN ", "").Split(',')[1].ToString().Split(':')[2].ToString())));
Program.bluescreens[8].SetTheme(Program.bluescreens[7].GetTheme(true), Program.bluescreens[7].GetTheme(false));
}
else if (fileline.StartsWith("W2K "))
{
Color[] modests = { Color.FromArgb(Convert.ToInt32(fileline.Replace("W2K ", "").Split(',')[0].ToString().Split(':')[0].ToString()), Convert.ToInt32(fileline.Replace("W2K ", "").Split(',')[0].ToString().Split(':')[1].ToString()), Convert.ToInt32(fileline.Replace("W2K ", "").Split(',')[0].ToString().Split(':')[2].ToString())), Color.FromArgb(Convert.ToInt32(fileline.Replace("W2K ", "").Split(',')[1].ToString().Split(':')[0].ToString()), Convert.ToInt32(fileline.Replace("W2K ", "").Split(',')[1].ToString().Split(':')[1].ToString()), Convert.ToInt32(fileline.Replace("W2K ", "").Split(',')[1].ToString().Split(':')[2].ToString())) };
Program.bluescreens[4].SetTheme(modests[0], modests[1]);
}
else if (fileline.StartsWith("NT34 "))
{
Color[] modests = { Color.FromArgb(Convert.ToInt32(fileline.Replace("NT34 ", "").Split(',')[0].ToString().Split(':')[0].ToString()), Convert.ToInt32(fileline.Replace("NT34 ", "").Split(',')[0].ToString().Split(':')[1].ToString()), Convert.ToInt32(fileline.Replace("W2K ", "").Split(',')[0].ToString().Split(':')[2].ToString())), Color.FromArgb(Convert.ToInt32(fileline.Replace("W2K ", "").Split(',')[1].ToString().Split(':')[0].ToString()), Convert.ToInt32(fileline.Replace("W2K ", "").Split(',')[1].ToString().Split(':')[1].ToString()), Convert.ToInt32(fileline.Replace("W2K ", "").Split(',')[1].ToString().Split(':')[2].ToString())) };
Program.bluescreens[3].SetTheme(modests[0], modests[1]);
}
else if (fileline.StartsWith("W9XME "))
{
Color me9xbsodbg = Color.FromArgb(Convert.ToInt32(fileline.Replace("W9XME ", "").Split(',')[0].ToString().Split(':')[0].ToString()), Convert.ToInt32(fileline.Replace("W9XME ", "").Split(',')[0].ToString().Split(':')[1].ToString()), Convert.ToInt32(fileline.Replace("W9XME ", "").Split(',')[0].ToString().Split(':')[2].ToString()));
Color me9xbsodfg = Color.FromArgb(Convert.ToInt32(fileline.Replace("W9XME ", "").Split(',')[1].ToString().Split(':')[0].ToString()), Convert.ToInt32(fileline.Replace("W9XME ", "").Split(',')[1].ToString().Split(':')[1].ToString()), Convert.ToInt32(fileline.Replace("W9XME ", "").Split(',')[1].ToString().Split(':')[2].ToString()));
Program.bluescreens[0].SetTheme(me9xbsodbg, me9xbsodfg);
Program.bluescreens[1].SetTheme(me9xbsodbg, me9xbsodfg);
}
else if (fileline.StartsWith("W9XME_HL "))
{
Color me9xbsodhlbg = Color.FromArgb(Convert.ToInt32(fileline.Replace("W9XME_HL ", "").Split(',')[0].ToString().Split(':')[0].ToString()), Convert.ToInt32(fileline.Replace("W9XME_HL ", "").Split(',')[0].ToString().Split(':')[1].ToString()), Convert.ToInt32(fileline.Replace("W9XME_HL ", "").Split(',')[0].ToString().Split(':')[2].ToString()));
Color me9xbsodhlfg = Color.FromArgb(Convert.ToInt32(fileline.Replace("W9XME_HL ", "").Split(',')[1].ToString().Split(':')[0].ToString()), Convert.ToInt32(fileline.Replace("W9XME_HL ", "").Split(',')[1].ToString().Split(':')[1].ToString()), Convert.ToInt32(fileline.Replace("W9XME_HL ", "").Split(',')[1].ToString().Split(':')[2].ToString()));
Program.bluescreens[0].SetTheme(me9xbsodhlbg, me9xbsodhlfg, true);
Program.bluescreens[1].SetTheme(me9xbsodhlbg, me9xbsodhlfg, true);
}
}
string restof = "";
for (int i = 7; i < filelines.Length; i++)
{
restof += filelines[i] + "\n";
}
string[] sections = restof.Replace("--", "\t").Split('\t');
string strings = "";
string fonts = "";
string miscs = "";
for (int i = 0; i < sections.Length; i++)
{
Thread.Sleep(10);
if (sections[i] == "STRINGBUILD START")
{
strings = sections[i + 1];
}
if (sections[i] == "FONT START")
{
fonts = sections[i + 1];
}
if (sections[i] == "MISC START")
{
miscs = sections[i + 1];
}
}
string[] stringlist = { };
string[] misclist = { };
string[] fontlist = { };
try