private void Win_Load(object sender, EventArgs e)
        {
            try
            {
                this.Icon             = me.GetIcon();
                this.Text             = me.GetString("friendlyname");
                Program.load_progress = 101;
                watermark.Visible     = me.GetBool("watermark");
                if (me.GetString("qr_file") != "local:null")
                {
                    switch (me.GetString("qr_file"))
                    {
                    case "local:0":
                        splash = Properties.Resources.win1_splash;
                        break;

                    case "local:1":
                        splash = Properties.Resources.win2_splash;
                        break;

                    default:
                        splash = (Bitmap)Image.FromFile(me.GetString("qr_file"));
                        break;
                    }

                    if (this.BackColor == this.ForeColor)
                    {
                        Color bg = Color.FromArgb(r.Next(0, 255), r.Next(0, 255), r.Next(0, 255));
                        Color fg = Color.FromArgb(r.Next(0, 255), r.Next(0, 255), r.Next(0, 255));
                        splash = Changecolor(fg, Changecolor(bg, CreateNonIndexedImage(splash), Color.FromArgb(19, 19, 19)), Color.FromArgb(255, 255, 255));
                    }
                    else
                    {
                        splash = Changecolor(me.GetTheme(false), Changecolor(me.GetTheme(true), CreateNonIndexedImage(splash), Color.FromArgb(19, 19, 19)), Color.FromArgb(255, 255, 255));
                    }
                    int z = 1;
                    for (int y = 0; y < 224; y += 12)
                    {
                        Bitmap bmp = new Bitmap(pictureBox1.Width, 12);

                        Rectangle cropRect = new Rectangle(0, y, pictureBox1.Width, 12);
                        using (Graphics g = Graphics.FromImage(bmp))
                        {
                            g.DrawImage(splash, new Rectangle(0, 0, bmp.Width, bmp.Height), cropRect, GraphicsUnit.Pixel);
                        }
                        ((PictureBox)tableLayoutPanel1.Controls["pictureBox" + z.ToString()]).Image = bmp;
                        z++;
                    }
                }
                if (me.GetBool("playsound"))
                {
                    sp.Stream = Properties.Resources.beep;
                    sp.PlayLooping();
                }
                int[] colors = { this.BackColor.R + 50, this.BackColor.G + 50, this.BackColor.B + 50 };
                if (colors[0] > 255)
                {
                    colors[0] -= 255;
                }
                if (colors[1] > 255)
                {
                    colors[1] -= 255;
                }
                if (colors[2] > 255)
                {
                    colors[2] -= 255;
                }
                watermark.ForeColor  = Color.FromArgb(colors[0], colors[1], colors[2]);
                Program.loadfinished = true;
                if (!me.GetBool("windowed"))
                {
                    this.FormBorderStyle = FormBorderStyle.None;
                    this.TopMost         = false;

                    if (Screen.AllScreens.Length > 1)
                    {
                        foreach (Screen s in Screen.AllScreens)
                        {
                            WindowScreen ws = new WindowScreen();
                            if (!s.Primary)
                            {
                                if (Program.multidisplaymode != "none")
                                {
                                    ws.StartPosition = FormStartPosition.Manual;
                                    ws.Location      = s.WorkingArea.Location;
                                    ws.Size          = new Size(s.WorkingArea.Width, s.WorkingArea.Height);
                                    ws.primary       = false;

                                    if (Program.multidisplaymode == "freeze")
                                    {
                                        Bitmap screenshot = new Bitmap(s.Bounds.Width,
                                                                       s.Bounds.Height,
                                                                       System.Drawing.Imaging.PixelFormat.Format32bppArgb);
                                        Graphics gfxScreenshot = Graphics.FromImage(screenshot);
                                        gfxScreenshot.CopyFromScreen(
                                            s.Bounds.X,
                                            s.Bounds.Y,
                                            0,
                                            0,
                                            s.Bounds.Size,
                                            CopyPixelOperation.SourceCopy
                                            );
                                        freezescreens.Add(screenshot);
                                    }
                                }
                            }
                            wss.Add(ws);
                        }
                    }
                    else
                    {
                        wss.Add(new WindowScreen());
                    }
                    for (int i = 0; i < wss.Count; i++)
                    {
                        WindowScreen ws = wss[i];
                        ws.Show();
                        if (!ws.primary)
                        {
                            if (Program.multidisplaymode == "freeze")
                            {
                                ws.screenDisplay.Image = freezescreens[i - 1];
                            }
                        }
                    }
                }
                else
                {
                    //this.Size = new Size(640, 320);
                }
                t            = new ThreadStart(WriteWord);
                secondThread = new Thread(t);
                secondThread.Start();
            } catch (Exception ex)
            {
                Program.loadfinished  = true;
                screenUpdater.Enabled = false;
                this.Hide();
                if (Program.f1.enableeggs)
                {
                    me.Crash(ex.Message, ex.StackTrace, "OrangeScreen");
                }
                else
                {
                    MessageBox.Show("The blue screen cannot be displayed due to an error.\n\n" + ex.Message + "\n\n" + ex.StackTrace, "E R R O R", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                this.Close();
            }
            Program.load_progress = 100;
        }
        private void Xvsbs_Load(object sender, EventArgs e)
        {
            try
            {
                this.Icon = me.GetIcon();
                this.Text = me.GetString("friendlyname");
                bg        = me.GetTheme(true);
                fg        = me.GetTheme(false);
                txt       = me.GetTexts();
                foreach (Control c in this.Controls)
                {
                    if (c is AliasedLabel)
                    {
                        c.BackColor = this.BackColor;
                        c.ForeColor = this.ForeColor;
                    }
                }
                if (Program.f1.enableeggs)
                {
                    if (me.GetString("culprit").ToLower() == "tardis.sys")
                    {
                        tardisFade.Enabled = true;
                    }
                    if (bg == fg)
                    {
                        this.BackColor        = Color.FromArgb(255, 0, 0);
                        rainBowScreen.Enabled = true;
                    }
                }
                if (whatfail != "")
                {
                    errorCode.Text         = txt["Culprit file"] + whatfail.ToUpper() + "\n\n" + errorCode.Text;
                    supportInfo.Location   = new Point(supportInfo.Location.X, supportInfo.Location.Y + 24);
                    technicalCode.Location = new Point(dumpLabel.Location.X, technicalCode.Location.Y + 24);
                    dumpLabel.Location     = new Point(dumpLabel.Location.X, dumpLabel.Location.Y + 24);
                }
                introductionText.Text = txt["A problem has been detected..."];
                supportInfo.Text      = txt["Troubleshooting introduction"] + "\n\n" + txt["Troubleshooting"] + "\n\n\n" + txt["Technical information"];
                string[] esplit = technicalCode.Text.Replace("*** STOP: ", "").Replace(")", "").Replace(" (", "*").Split('*');
                technicalCode.Text = txt["Technical information formatting"].Replace("{0}", esplit[0]).Replace("{1}", esplit[1]);

                if (me.GetBool("extrafile") && (whatfail != ""))
                {
                    technicalCode.Text += "\r\n\r\n\r\n***  " + whatfail.ToUpper() + " - Address " + me.GenHex(8, me.GetFiles().ElementAt(0).Value[0]) + " base at " + me.GenHex(8, me.GetFiles().ElementAt(0).Value[1]) + ", DateStamp " + me.GenHex(8, me.GetFiles().ElementAt(0).Value[2]).ToLower() + "\r\n\r\n\r\n";
                }
                try
                {
                    if (me.GetBool("autoclose") && !me.GetBool("extrafile"))
                    {
                        dumpLabel.Text = txt["Physical memory dump"].Split('\n')[0].Trim();
                    }
                    dumpTimer.Enabled = (me.GetBool("autoclose") && !me.GetBool("extrafile"));
                }
                catch
                {
                }

                foreach (Control c in this.Controls)
                {
                    if (c is Label && (c.Name != "waterMarkText"))
                    {
                        c.Font = me.GetFont();
                    }
                }
                if (!fullscreen)
                {
                    this.FormBorderStyle = FormBorderStyle.FixedSingle; this.ShowInTaskbar = true; this.ShowIcon = true;
                }
                if (!errorCode.Visible && !dumpLabel.Visible)
                {
                    supportInfo.Visible      = false;
                    introductionText.Visible = false;
                }
                errorCode.Text     = errorCode.Text.Replace("IRQL", "DRIVER_IRQL");
                errorCode.Text     = errorCode.Text.Replace("MANUALLY_INITIATED_CRASH", "The end-user manually generated the crash dump.");
                errorCode.Text     = errorCode.Text.Replace("VIDEO_TDR_", "VIDEO_TDR_ERROR");
                technicalCode.Text = technicalCode.Text.Replace("STOP: ERROR", "STOP: 0x00000116");
                int[] colors = { this.BackColor.R + 50, this.BackColor.G + 50, this.BackColor.B + 50 };
                if (colors[0] > 255)
                {
                    colors[0] -= 255;
                }
                if (colors[1] > 255)
                {
                    colors[1] -= 255;
                }
                if (colors[2] > 255)
                {
                    colors[2] -= 255;
                }
                technicalCode.Location  = new Point(supportInfo.Location.X, supportInfo.ClientRectangle.Height + supportInfo.ClientRectangle.Top + errorCode.ClientRectangle.Top + errorCode.ClientRectangle.Height + introductionText.ClientRectangle.Height + introductionText.ClientRectangle.Top + 54);
                dumpLabel.Location      = new Point(technicalCode.Location.X, technicalCode.Location.Y + 48);
                waterMarkText.ForeColor = Color.FromArgb(colors[0], colors[1], colors[2]);
                Program.loadfinished    = true;
                if (fullscreen)
                {
                    this.TopMost = false;
                    if (Screen.AllScreens.Length > 1)
                    {
                        foreach (Screen s in Screen.AllScreens)
                        {
                            WindowScreen ws = new WindowScreen();
                            if (!s.Primary)
                            {
                                if (Program.multidisplaymode != "none")
                                {
                                    ws.StartPosition = FormStartPosition.Manual;
                                    ws.Location      = s.WorkingArea.Location;
                                    ws.Size          = new Size(s.WorkingArea.Width, s.WorkingArea.Height);
                                    ws.primary       = false;

                                    if (Program.multidisplaymode == "freeze")
                                    {
                                        Bitmap screenshot = new Bitmap(s.Bounds.Width,
                                                                       s.Bounds.Height,
                                                                       System.Drawing.Imaging.PixelFormat.Format32bppArgb);
                                        Graphics gfxScreenshot = Graphics.FromImage(screenshot);
                                        gfxScreenshot.CopyFromScreen(
                                            s.Bounds.X,
                                            s.Bounds.Y,
                                            0,
                                            0,
                                            s.Bounds.Size,
                                            CopyPixelOperation.SourceCopy
                                            );
                                        freezescreens.Add(screenshot);
                                    }
                                }
                            }
                            wss.Add(ws);
                        }
                    }
                    else
                    {
                        wss.Add(new WindowScreen());
                    }
                    for (int i = 0; i < wss.Count; i++)
                    {
                        WindowScreen ws = wss[i];
                        ws.Show();
                        if (!ws.primary)
                        {
                            if (Program.multidisplaymode == "freeze")
                            {
                                ws.screenDisplay.Image = freezescreens[i - 1];
                            }
                        }
                    }
                    this.Hide();
                }
                errorCode.Visible = me.GetBool("show_description");
                if (!errorCode.Visible && this.Visible)
                {
                    supportInfo.Location   = new Point(supportInfo.Location.X, supportInfo.Location.Y + 39);
                    technicalCode.Location = new Point(technicalCode.Location.X, technicalCode.Location.Y + 39);
                    dumpLabel.Location     = new Point(dumpLabel.Location.X, dumpLabel.Location.Y + 39);
                }
                naturalclose      = false;
                dumpLabel.Visible = me.GetBool("autoclose") && !me.GetBool("extrafile");
            } catch (Exception ex)
            {
                Program.loadfinished = true;
                if (Program.f1.enableeggs)
                {
                    me.Crash(ex.Message, ex.StackTrace, "OrangeScreen");
                }
                else
                {
                    MessageBox.Show("The blue screen cannot be displayed due to an error.\n\n" + ex.Message + "\n\n" + ex.StackTrace, "E R R O R", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                this.Close();
            }
        }
Example #3
0
        private void NTBSOD_Load(object sender, EventArgs e)
        {
            try
            {
                this.Icon             = me.GetIcon();
                this.Text             = me.GetString("friendlyname");
                txt                   = me.GetTexts();
                blinkyThing.BackColor = me.GetTheme(false);
                if (!blink)
                {
                    blinkyThing.Visible = false;
                }
                Program.load_progress = 2;
                Program.load_message  = "Processing error code";
                errorCode.Image       = WriteWord(txt["Error code formatting"].Replace("{0}", error.Split(' ')[1].Replace(")", "").Replace("(", "").Replace(" ", "").ToString()).Replace("{1}", me.GenAddress(4, 8, false)).Trim(), me.GetTheme(true), me.GetTheme(false));
                Program.load_progress = 10;
                if (whatfail == "")
                {
                    errorDescription.Image = WriteWord(error.Split(' ')[0].ToString(), me.GetTheme(true), me.GetTheme(false));
                }
                else
                {
                    errorDescription.Image = WriteWord(error.Split(' ')[0].ToString() + "*** Address " + me.GenHex(8, "RRRRRRRR").ToLower() + " has base at " + me.GenHex(8, "RRRRRRRR").ToLower() + " - " + whatfail.ToLower(), me.GetTheme(true), me.GetTheme(false));
                }

                Program.load_progress = 15;
                if (stacktrace)
                {
                    Program.load_message = "Processing CPUID";
                    cpuID.Image          = WriteWord(txt["CPUID formatting"].Replace("{0}", processortype).Trim(), me.GetTheme(true), me.GetTheme(false));
                    Program.load_message = "Processing stack trace heading";
                    tableHeader.Image    = WriteWord(txt["Stack trace heading"].Trim() + GenSpace(40 - txt["Stack trace heading"].Trim().Length) + txt["Stack trace heading"].Trim(), me.GetTheme(true), me.GetTheme(false));
                    int i = 0;

                    Program.load_progress += 5;
                    foreach (PictureBox ctrl in flowLayoutPanel2.Controls)
                    {
                        Program.load_message = "Processing table (column 1, row " + (i + 1).ToString() + ")";
                        if (me.GetFiles().Count < i + 1)
                        {
                            break;
                        }
                        if (me.GetFiles().Values.ElementAt(i).Length == 6)
                        {
                            break;
                        }
                        string file = me.GetFiles().Keys.ElementAt(i);
                        string rnd1 = me.GenHex(8, me.GetFiles().Values.ElementAt(i)[0]).ToLower();
                        string rnd2 = me.GenHex(8, me.GetFiles().Values.ElementAt(i)[1]).ToLower();
                        ctrl.Image = WriteWord(txt["Stack trace table formatting"].Trim().Replace("{0}", rnd1).Replace("{1}", rnd2).Replace("{2}", file), me.GetTheme(true), me.GetTheme(false));
                        i++;
                        Program.load_progress += 1;
                    }
                    int firstcol = i;
                    foreach (PictureBox ctrl in flowLayoutPanel3.Controls)
                    {
                        Program.load_message = "Processing table (column 2, row " + (i - firstcol + 1).ToString() + ")";
                        if (me.GetFiles().Count < i + 1)
                        {
                            break;
                        }
                        if (me.GetFiles().Values.ElementAt(i).Length == 6)
                        {
                            break;
                        }
                        string file = me.GetFiles().Keys.ElementAt(i);
                        string rnd1 = me.GenHex(8, me.GetFiles().Values.ElementAt(i)[0]).ToLower();
                        string rnd2 = me.GenHex(8, me.GetFiles().Values.ElementAt(i)[1]).ToLower();
                        ctrl.Image = WriteWord(txt["Stack trace table formatting"].Trim().Replace("{0}", rnd1).Replace("{1}", rnd2).Replace("{2}", file), me.GetTheme(true), me.GetTheme(false));
                        i++;
                        Program.load_progress += 1;
                    }
                    Program.load_message  = "Processing memory address dump heading";
                    table2.Image          = WriteWord(txt["Memory address dump heading"], me.GetTheme(true), me.GetTheme(false));
                    Program.load_progress = 90;
                    i = 0;
                    foreach (KeyValuePair <string, string[]> kvp in me.GetFiles())
                    {
                        if (me.GetFiles().Count < i + 1)
                        {
                            break;
                        }
                        if (kvp.Value.Length == 6)
                        {
                            break;
                        }
                        i++;
                    }
                    for (int n = 1; n < 5; n++)
                    {
                        Program.load_message = "Processing table (row " + n.ToString() + ")";
                        if (me.GetFiles().Count < i + 1)
                        {
                            break;
                        }
                        if (i < me.GetFiles().Count)
                        {
                            string file = me.GetFiles().Keys.ElementAt(i);
                            string r1   = me.GenHex(8, me.GetFiles().Values.ElementAt(i)[0]).ToLower();
                            string r2   = me.GenHex(8, me.GetFiles().Values.ElementAt(i)[1]).ToLower();
                            string r3   = me.GenHex(8, me.GetFiles().Values.ElementAt(i)[2]).ToLower();
                            string r4   = me.GenHex(8, me.GetFiles().Values.ElementAt(i)[3]).ToLower();
                            string r5   = me.GenHex(8, me.GetFiles().Values.ElementAt(i)[4]).ToLower();
                            string r6   = me.GenHex(8, me.GetFiles().Values.ElementAt(i)[5]).ToLower();
                            ((PictureBox)ntContainer.Controls["tablerow_" + n.ToString()]).Image = WriteWord(txt["Memory address dump table"].Replace("{0}", r1).Replace("{1}", r2).Replace("{2}", r3).Replace("{3}", r4).Replace("{4}", r5).Replace("{5}", r6).Replace("{6}", file), me.GetTheme(true), me.GetTheme(false));
                            i++;
                            Program.load_progress += 6;
                        }
                    }
                    Program.load_progress   = 100;
                    Program.load_message    = "";
                    Program.f1.label10.Text = "";
                }
                else
                {
                    cpuID.Visible             = false;
                    tableLayoutPanel1.Visible = false;
                    tableHeader.Visible       = false;
                    table2.Visible            = false;
                    tablerow_1.Visible        = false;
                    tablerow_2.Visible        = false;
                    tablerow_3.Visible        = false;
                    tablerow_4.Visible        = false;
                }
                try
                {
                    troubleShoot1.Image = WriteWord(txt["Troubleshooting text"].Split('\n')[0].Trim(), me.GetTheme(true), me.GetTheme(false));
                    troubleShoot2.Image = WriteWord(txt["Troubleshooting text"].Split('\n')[1].Trim(), me.GetTheme(true), me.GetTheme(false));
                }
                catch { }

                if (!fullscreen)
                {
                    this.FormBorderStyle = FormBorderStyle.FixedSingle;
                }
                if (fullscreen)
                {
                    if (Screen.AllScreens.Length > 1)
                    {
                        foreach (Screen s in Screen.AllScreens)
                        {
                            WindowScreen ws = new WindowScreen();
                            if (!s.Primary)
                            {
                                if (Program.multidisplaymode != "none")
                                {
                                    ws.StartPosition = FormStartPosition.Manual;
                                    ws.Location      = s.WorkingArea.Location;
                                    ws.Size          = new Size(s.WorkingArea.Width, s.WorkingArea.Height);
                                    ws.primary       = false;

                                    if (Program.multidisplaymode == "freeze")
                                    {
                                        Bitmap screenshot = new Bitmap(s.Bounds.Width,
                                                                       s.Bounds.Height,
                                                                       System.Drawing.Imaging.PixelFormat.Format32bppArgb);
                                        Graphics gfxScreenshot = Graphics.FromImage(screenshot);
                                        gfxScreenshot.CopyFromScreen(
                                            s.Bounds.X,
                                            s.Bounds.Y,
                                            0,
                                            0,
                                            s.Bounds.Size,
                                            CopyPixelOperation.SourceCopy
                                            );
                                        freezescreens.Add(screenshot);
                                    }
                                }
                            }
                            wss.Add(ws);
                        }
                    }
                    else
                    {
                        wss.Add(new WindowScreen());
                    }
                    for (int i = 0; i < wss.Count; i++)
                    {
                        WindowScreen ws = wss[i];
                        ws.Show();
                        if (!ws.primary)
                        {
                            if (Program.multidisplaymode == "freeze")
                            {
                                ws.screenDisplay.Image = freezescreens[i - 1];
                            }
                        }
                    }
                    this.TopMost = false;
                }
                int[] colors = { this.BackColor.R + 50, this.BackColor.G + 50, this.BackColor.B + 50 };
                if (colors[0] > 255)
                {
                    colors[0] -= 255;
                }
                if (colors[1] > 255)
                {
                    colors[1] -= 255;
                }
                if (colors[2] > 255)
                {
                    colors[2] -= 255;
                }
                waterMarkText.ForeColor = Color.FromArgb(colors[0], colors[1], colors[2]);
                Program.loadfinished    = true;
            } catch (Exception ex)
            {
                Program.loadfinished  = true;
                screenUpdater.Enabled = false;
                this.Hide();
                if (Program.f1.enableeggs)
                {
                    me.Crash(ex.Message, ex.StackTrace, "OrangeScreen");
                }
                else
                {
                    MessageBox.Show("The blue screen cannot be displayed due to an error.\n\n" + ex.Message + "\n\n" + ex.StackTrace, "E R R O R", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                this.Close();
            }
        }
        private void Xvsbs_Load(object sender, EventArgs e)
        {
            try
            {
                this.Icon = me.GetIcon();
                this.Text = me.GetString("friendlyname");
                h1        = me.GenHex(8, me.GetFiles().ElementAt(0).Value[0]);
                h2        = me.GenHex(8, me.GetFiles().ElementAt(0).Value[1]);
                h3        = me.GenHex(8, me.GetFiles().ElementAt(0).Value[2]);
                // disable ClearType, if the OS is Windows Vista
                if (me.GetString("os") == "Windows Vista")
                {
                    introductionText.UseCompatibleTextRendering = true;
                    errorCode.UseCompatibleTextRendering        = true;
                    supportInfo.UseCompatibleTextRendering      = true;
                    technicalCode.UseCompatibleTextRendering    = true;
                    dumpText.UseCompatibleTextRendering         = true;
                }
                bg  = me.GetTheme(true);
                fg  = me.GetTheme(false);
                txt = me.GetTexts();
                foreach (Control c in this.Controls)
                {
                    if (c is AliasedLabel)
                    {
                        c.BackColor = this.BackColor;
                        c.ForeColor = this.ForeColor;
                    }
                }
                if (Program.f1.enableeggs)
                {
                    if (me.GetString("culprit").ToLower() == "tardis.sys")
                    {
                        tardisFade.Enabled = true;
                    }
                    if (bg == fg)
                    {
                        this.BackColor        = Color.FromArgb(255, 0, 0);
                        rainBowScreen.Enabled = true;
                    }
                }
                float HeightInPixels;
                using (Graphics g = this.CreateGraphics())
                {
                    var points = me.GetFont().SizeInPoints;
                    HeightInPixels = points * g.DpiX / 72;
                }

                introductionText.Text = txt["A problem has been detected..."];
                supportInfo.Text      = txt["Troubleshooting introduction"] + "\n\n" + txt["Troubleshooting"] + "\n\n" + txt["Technical information"];
                string[] esplit = technicalCode.Text.Replace("*** STOP: ", "").Replace(")", "").Replace(" (", "*").Split('*');
                technicalCode.Text = txt["Technical information formatting"].Replace("{0}", esplit[0]).Replace("{1}", esplit[1]);
                foreach (Control c in this.Controls)
                {
                    if (c is Label && (c.Name != "waterMarkText"))
                    {
                        c.Font = me.GetFont();
                    }
                }
                if (me.GetBool("extrafile") && (me.GetBool("show_file")))
                {
                    technicalCode.Text += "\r\n\r\n" + txt["Culprit file memory address"].Replace("{0}", whatfail.ToUpper()).Replace("{1}", h1).Replace("{2}", h2).Replace("{3}", h3.ToLower());
                }
                errorCode.Visible = me.GetBool("show_description");
                if (me.GetBool("autoclose"))
                {
                    dumpText.Text  = txt["Collecting data for crash dump"]; dumpText.Text += "\n" + txt["Initializing crash dump"];
                    dumpText.Text += "\n" + txt["Begin dump"] + "\n" + txt["Physical memory dump"] + "   0";
                }
                else
                {
                    dumpText.Visible = false;
                }
                if (whatfail != "")
                {
                    errorCode.Text  = txt["Culprit file"] + whatfail.ToUpper() + "\n\n" + errorCode.Text;
                    dumpText.Margin = new Padding(3, 15, 3, 0);
                }
                int addsome = 0;
                if (errorCode.Visible)
                {
                    addsome = (int)(2.25 * HeightInPixels);
                    if (whatfail != "")
                    {
                        addsome += (int)(HeightInPixels * 2);
                    }
                }
                int support = introductionText.Location.Y + introductionText.Size.Height + (int)(HeightInPixels / 2) + addsome;
                int ecode   = introductionText.Location.Y + (int)(HeightInPixels / 2) + introductionText.Size.Height;
                if (me.GetString("os") == "Windows 7")
                {
                    ecode   += (int)(HeightInPixels);
                    support += (int)(HeightInPixels * 1.5);
                }
                supportInfo.Location   = new Point(supportInfo.Location.X, support);
                errorCode.Location     = new Point(errorCode.Location.X, ecode);
                technicalCode.Location = new Point(technicalCode.Location.X, (int)(support + supportInfo.Size.Height + HeightInPixels));
                errorCode.Margin       = new Padding(3, 15, 3, 0);
                supportInfo.Margin     = new Padding(3, 15, 3, 0);
                technicalCode.Margin   = new Padding(3, 15, 3, 0);
                supportInfo.Text       = supportInfo.Text.Replace("\n\n\n", "\n\n");
                dumpText.Margin        = new Padding(3, 15, 3, 0);
                technicalCode.Size     = new Size(technicalCode.Size.Width, (int)((technicalCode.Text.Split('\n').Length + 2) * HeightInPixels));
                dumpText.Location      = new Point(dumpText.Location.X, technicalCode.Location.Y + 4 * (int)HeightInPixels);
                if (!fullscreen)
                {
                    this.FormBorderStyle = FormBorderStyle.FixedSingle; this.ShowInTaskbar = true; this.ShowIcon = true;
                }
                if (!errorCode.Visible && !dumpText.Visible)
                {
                    supportInfo.Visible      = false;
                    introductionText.Visible = false;
                }
                int[] colors = { this.BackColor.R + 50, this.BackColor.G + 50, this.BackColor.B + 50 };
                if (colors[0] > 255)
                {
                    colors[0] -= 255;
                }
                if (colors[1] > 255)
                {
                    colors[1] -= 255;
                }
                if (colors[2] > 255)
                {
                    colors[2] -= 255;
                }
                waterMarkText.ForeColor = Color.FromArgb(colors[0], colors[1], colors[2]);
                Program.loadfinished    = true;
                if (fullscreen)
                {
                    this.TopMost = false;
                    if (Screen.AllScreens.Length > 1)
                    {
                        foreach (Screen s in Screen.AllScreens)
                        {
                            WindowScreen ws = new WindowScreen();
                            if (!s.Primary)
                            {
                                if (Program.multidisplaymode != "none")
                                {
                                    ws.StartPosition = FormStartPosition.Manual;
                                    ws.Location      = s.WorkingArea.Location;
                                    ws.Size          = new Size(s.WorkingArea.Width, s.WorkingArea.Height);
                                    ws.primary       = false;

                                    if (Program.multidisplaymode == "freeze")
                                    {
                                        Bitmap screenshot = new Bitmap(s.Bounds.Width,
                                                                       s.Bounds.Height,
                                                                       System.Drawing.Imaging.PixelFormat.Format32bppArgb);
                                        Graphics gfxScreenshot = Graphics.FromImage(screenshot);
                                        gfxScreenshot.CopyFromScreen(
                                            s.Bounds.X,
                                            s.Bounds.Y,
                                            0,
                                            0,
                                            s.Bounds.Size,
                                            CopyPixelOperation.SourceCopy
                                            );
                                        freezescreens.Add(screenshot);
                                    }
                                }
                            }
                            wss.Add(ws);
                        }
                    }
                    else
                    {
                        wss.Add(new WindowScreen());
                    }
                    for (int i = 0; i < wss.Count; i++)
                    {
                        WindowScreen ws = wss[i];
                        ws.Show();
                        if (!ws.primary)
                        {
                            if (Program.multidisplaymode == "freeze")
                            {
                                ws.screenDisplay.Image = freezescreens[i - 1];
                            }
                        }
                    }
                    this.Hide();
                }
                errorCode.Visible = me.GetBool("show_description");
                errorCode.Text    = errorCode.Text.Replace("CRITICAL_OBJECT_TERMINATION", "A process or thread crucial to system operation has unexpectedly exited or been terminated.");
                if (!errorCode.Visible && this.Visible)
                {
                    supportInfo.Location   = new Point(supportInfo.Location.X, supportInfo.Location.Y + 39);
                    technicalCode.Location = new Point(technicalCode.Location.X, technicalCode.Location.Y + 39);
                    dumpText.Location      = new Point(dumpText.Location.X, dumpText.Location.Y + 39);
                }
                naturalclose = false;
                if (me.GetBool("acpi"))
                {
                    supportInfo.Text         = technicalCode.Text;
                    errorCode.Visible        = false;
                    technicalCode.Visible    = false;
                    dumpText.Visible         = false;
                    introductionText.Visible = false;
                }
            } catch (Exception ex)
            {
                Program.loadfinished  = true;
                screenUpdater.Enabled = false;
                this.Hide();
                if (Program.f1.enableeggs)
                {
                    me.Crash(ex.Message, ex.StackTrace, "OrangeScreen");
                }
                else
                {
                    MessageBox.Show("The blue screen cannot be displayed due to an error.\n\n" + ex.Message + "\n\n" + ex.StackTrace, "E R R O R", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                this.Close();
            }
        }
        private void W2kbs_Load(object sender, EventArgs e)
        {
            try
            {
                if (Program.f1.enableeggs)
                {
                    if (this.BackColor == this.ForeColor)
                    {
                        this.BackColor        = Color.Red;
                        rainBowScreen.Enabled = true;
                    }
                }
                this.Icon = me.GetIcon();
                this.Text = me.GetString("friendlyname");
                List <Bitmap> lines = new List <Bitmap>
                {
                    WriteWord(" ", this.BackColor, this.ForeColor)
                };
                if (whatfail != "")
                {
                    // set file information template to default value if not found for backwards compatibility with version 2.0 configuration formats
                    string addr = me.GetTexts().ContainsKey("File information") ? me.GetTexts()["File information"] : "*** Address {0} base at {1}, DateStamp {2} - {3}";
                    errorCode += "\n\n";
                    errorCode += string.Format(addr, me.GenHex(8, me.GetFiles()[me.GetString("culprit")][0]), me.GenHex(8, me.GetFiles()[me.GetString("culprit")][1]), me.GenHex(8, me.GetFiles()[me.GetString("culprit")][2]).ToLower(), whatfail.ToLower());
                }
                errorCode = errorCode.Replace("IRQL", "DRIVER_IRQL");

                foreach (string l in errorCode.Split('\n'))
                {
                    if (l.Replace("\r", "\n").Replace("\n", "") == "")
                    {
                        lines.Add(WriteWord(" ", this.BackColor, this.ForeColor)); continue;
                    }
                    lines.Add(WriteWord(l.Replace("\r", "\n").Replace("\n", ""), this.BackColor, this.ForeColor));
                }
                lines.Add(WriteWord(" ", this.BackColor, this.ForeColor));

                foreach (string l in me.GetTexts()["Troubleshooting introduction"].Split('\n'))
                {
                    if (l.Replace("\r", "\n").Replace("\n", "") == "")
                    {
                        lines.Add(WriteWord(" ", this.BackColor, this.ForeColor)); continue;
                    }
                    lines.Add(WriteWord(l.Replace("\r", "\n").Replace("\n", ""), this.BackColor, this.ForeColor));
                }
                lines.Add(WriteWord(" ", this.BackColor, this.ForeColor));

                foreach (string l in me.GetTexts()["Troubleshooting text"].Split('\n'))
                {
                    if (l.Replace("\r", "\n").Replace("\n", "") == "")
                    {
                        lines.Add(WriteWord(" ", this.BackColor, this.ForeColor)); continue;
                    }
                    lines.Add(WriteWord(l.Replace("\r", "\n").Replace("\n", ""), this.BackColor, this.ForeColor));
                }
                lines.Add(WriteWord(" ", this.BackColor, this.ForeColor));

                foreach (string l in me.GetTexts()["Additional troubleshooting information"].Split('\n'))
                {
                    if (l.Replace("\r", "\n").Replace("\n", "") == "")
                    {
                        lines.Add(WriteWord(" ", this.BackColor, this.ForeColor)); continue;
                    }
                    lines.Add(WriteWord(l.Replace("\r", "\n").Replace("\n", ""), this.BackColor, this.ForeColor));
                }
                int z = 1;
                foreach (Bitmap line in lines)
                {
                    ((PictureBox)tableLayoutPanel1.Controls[string.Format("pictureBox{0}", z)]).Image = line;
                    z++;
                }
                if (!fullscreen)
                {
                    this.FormBorderStyle = FormBorderStyle.FixedSingle; this.ShowInTaskbar = true; this.ShowIcon = true;
                }
                int[] colors = { this.BackColor.R + 50, this.BackColor.G + 50, this.BackColor.B + 50 };
                if (colors[0] > 255)
                {
                    colors[0] -= 255;
                }
                if (colors[1] > 255)
                {
                    colors[1] -= 255;
                }
                if (colors[2] > 255)
                {
                    colors[2] -= 255;
                }
                waterMarkText.ForeColor = Color.FromArgb(colors[0], colors[1], colors[2]);
                Program.loadfinished    = true;
                if (fullscreen)
                {
                    if (Screen.AllScreens.Length > 1)
                    {
                        foreach (Screen s in Screen.AllScreens)
                        {
                            WindowScreen ws = new WindowScreen();
                            if (!s.Primary)
                            {
                                if (Program.multidisplaymode != "none")
                                {
                                    ws.StartPosition = FormStartPosition.Manual;
                                    ws.Location      = s.WorkingArea.Location;
                                    ws.Size          = new Size(s.WorkingArea.Width, s.WorkingArea.Height);
                                    ws.primary       = false;

                                    if (Program.multidisplaymode == "freeze")
                                    {
                                        Bitmap screenshot = new Bitmap(s.Bounds.Width,
                                                                       s.Bounds.Height,
                                                                       System.Drawing.Imaging.PixelFormat.Format32bppArgb);
                                        Graphics gfxScreenshot = Graphics.FromImage(screenshot);
                                        gfxScreenshot.CopyFromScreen(
                                            s.Bounds.X,
                                            s.Bounds.Y,
                                            0,
                                            0,
                                            s.Bounds.Size,
                                            CopyPixelOperation.SourceCopy
                                            );
                                        freezescreens.Add(screenshot);
                                    }
                                }
                            }
                            wss.Add(ws);
                        }
                    }
                    else
                    {
                        wss.Add(new WindowScreen());
                    }
                    for (int i = 0; i < wss.Count; i++)
                    {
                        WindowScreen ws = wss[i];
                        ws.Show();
                        if (!ws.primary)
                        {
                            if (Program.multidisplaymode == "freeze")
                            {
                                ws.screenDisplay.Image = freezescreens[i - 1];
                            }
                        }
                    }
                    foreach (WindowScreen ws in wss)
                    {
                        Program.dr.Draw(ws);
                    }
                    this.TopMost = false;
                    for (int i = 0; i < wss.Count; i++)
                    {
                        WindowScreen ws = wss[i];
                        ws.Show();
                        if (!ws.primary)
                        {
                            if (Program.multidisplaymode == "freeze")
                            {
                                ws.screenDisplay.Image = freezescreens[i - 1];
                            }
                        }
                    }
                    this.Hide();
                }
            } catch (Exception ex)
            {
                Program.loadfinished  = true;
                screenUpdater.Enabled = false;
                this.Hide();
                if (Program.f1.enableeggs)
                {
                    me.Crash(ex.Message, ex.StackTrace, "OrangeScreen");
                }
                else
                {
                    MessageBox.Show("The blue screen cannot be displayed due to an error.\n\n" + ex.Message + "\n\n" + ex.StackTrace, "E R R O R", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                this.Close();
            }
        }
        private void Old_bluescreen_Load(object sender, EventArgs e)
        {
            try
            {
                this.Icon = me.GetIcon();
                this.Text = me.GetString("friendlyname");
                string prompt;
                titles = me.GetTitles();
                texts  = me.GetTexts();
                if (screenmode == "No unresponsive programs")
                {
                    screenUpdater.Interval = me.GetInt("timer");
                    bg     = me.GetTheme(true);
                    fg     = me.GetTheme(false);
                    hlb    = me.GetTheme(true, true);
                    hlf    = me.GetTheme(false, true);
                    prompt = texts["Prompt"];
                }
                else
                {
                    screenUpdater.Interval = me.GetInt("timer");
                    bg     = me.GetTheme(true);
                    fg     = me.GetTheme(false);
                    hlb    = me.GetTheme(true, true);
                    hlf    = me.GetTheme(false, true);
                    prompt = texts["Prompt"];
                }

                titleBorder.BackColor   = me.GetTheme(true, true);
                blinkingColor.BackColor = me.GetTheme(true, true);
                if (screenmode == "System error")
                {
                    titleText.Image      = WriteWord(titles["Main"], hlb, hlf);
                    titleText.Size       = new Size(8 * titles["Main"].Length, titleText.Height);
                    titleBorder.Size     = new Size(titleText.Width + 20, titleBorder.Height);
                    titleBorder.Location = new Point((this.Width / 2) - (titleBorder.Width / 2) - 8, titleBorder.Location.Y);
                    titleText.Location   = new Point(10, 2);

                    try { line1.Image = WriteWord(texts["System error"].Split('\n')[0].Replace("{0}", errorCode).Substring(0, texts["System error"].Split('\n')[0].Replace("{0}", errorCode).Length - 1), bg, fg); } catch { }
                    try { line2.Image = WriteWord(texts["System error"].Split('\n')[1].Replace("{0}", errorCode).Substring(0, texts["System error"].Split('\n')[1].Replace("{0}", errorCode).Length - 1), bg, fg); } catch { }
                    try { line3.Image = WriteWord(texts["System error"].Split('\n')[2].Replace("{0}", errorCode).Substring(0, texts["System error"].Split('\n')[2].Replace("{0}", errorCode).Length - 1), bg, fg); } catch { }
                    try { line4.Image = WriteWord(texts["System error"].Split('\n')[3].Replace("{0}", errorCode).Substring(0, texts["System error"].Split('\n')[3].Replace("{0}", errorCode).Length - 1), bg, fg); } catch { }
                    try { line5.Image = WriteWord(texts["System error"].Split('\n')[4].Replace("{0}", errorCode).Substring(0, texts["System error"].Split('\n')[4].Replace("{0}", errorCode).Length - 1), bg, fg); } catch { }
                    try { line6.Image = WriteWord(texts["System error"].Split('\n')[5].Replace("{0}", errorCode).Substring(0, texts["System error"].Split('\n')[5].Replace("{0}", errorCode).Length - 1), bg, fg); } catch { }
                    try { line7.Image = WriteWord(texts["System error"].Split('\n')[6].Replace("{0}", errorCode).Substring(0, texts["System error"].Split('\n')[6].Replace("{0}", errorCode).Length - 1), bg, fg); } catch { }
                    try { line8.Image = WriteWord(texts["System error"].Split('\n')[7].Replace("{0}", errorCode).Substring(0, texts["System error"].Split('\n')[7].Replace("{0}", errorCode).Length - 1), bg, fg); } catch { }
                }
                else if (screenmode == "Application error")
                {
                    titleText.Image      = WriteWord(titles["Main"], hlb, hlf);
                    titleText.Size       = new Size(8 * titles["Main"].Length, titleText.Height);
                    titleBorder.Size     = new Size(titleText.Width + 20, titleBorder.Height);
                    titleBorder.Location = new Point((this.Width / 2) - (titleBorder.Width / 2) - 8, titleBorder.Location.Y);
                    titleText.Location   = new Point(10, 2);

                    try { line1.Image = WriteWord(texts["Application error"].Split('\n')[0].Substring(0, texts["Application error"].Split('\n')[0].Length - 1).Replace("{2}", me.GenHex(2, me.GetString("ecode1"))).Replace("{0}", errorCode.ToString().Split(':')[1].ToString().Replace(" ", "").ToString()).Replace("{1}", errorCode.ToString().Split(':')[2].ToString().Replace(" ", "").ToString()), bg, fg); } catch { }
                    try { line2.Image = WriteWord(texts["Application error"].Split('\n')[1].Substring(0, texts["Application error"].Split('\n')[1].Length - 1).Replace("{2}", me.GenHex(2, me.GetString("ecode1"))).Replace("{0}", errorCode.ToString().Split(':')[1].ToString().Replace(" ", "").ToString()).Replace("{1}", errorCode.ToString().Split(':')[2].ToString().Replace(" ", "").ToString()), bg, fg); } catch { }
                    try { line3.Image = WriteWord(texts["Application error"].Split('\n')[2].Substring(0, texts["Application error"].Split('\n')[2].Length - 1).Replace("{2}", me.GenHex(2, me.GetString("ecode1"))).Replace("{0}", errorCode.ToString().Split(':')[1].ToString().Replace(" ", "").ToString()).Replace("{1}", errorCode.ToString().Split(':')[2].ToString().Replace(" ", "").ToString()), bg, fg); } catch { }
                    try { line4.Image = WriteWord(texts["Application error"].Split('\n')[3].Substring(0, texts["Application error"].Split('\n')[3].Length - 1).Replace("{2}", me.GenHex(2, me.GetString("ecode1"))).Replace("{0}", errorCode.ToString().Split(':')[1].ToString().Replace(" ", "").ToString()).Replace("{1}", errorCode.ToString().Split(':')[2].ToString().Replace(" ", "").ToString()), bg, fg); } catch { }
                    try { line5.Image = WriteWord(texts["Application error"].Split('\n')[4].Substring(0, texts["Application error"].Split('\n')[4].Length - 1).Replace("{2}", me.GenHex(2, me.GetString("ecode1"))).Replace("{0}", errorCode.ToString().Split(':')[1].ToString().Replace(" ", "").ToString()).Replace("{1}", errorCode.ToString().Split(':')[2].ToString().Replace(" ", "").ToString()), bg, fg); } catch { }
                    try { line6.Image = WriteWord(texts["Application error"].Split('\n')[5].Substring(0, texts["Application error"].Split('\n')[5].Length - 1).Replace("{2}", me.GenHex(2, me.GetString("ecode1"))).Replace("{0}", errorCode.ToString().Split(':')[1].ToString().Replace(" ", "").ToString()).Replace("{1}", errorCode.ToString().Split(':')[2].ToString().Replace(" ", "").ToString()), bg, fg); } catch { }

                    line7.Visible          = false;
                    line8.Visible          = false;
                    simplePanel.Location   = new Point(simplePanel.Location.X, simplePanel.Location.Y + 20);
                    anyKeyMsg.Location     = new Point(anyKeyMsg.Location.X, anyKeyMsg.Location.Y - 30);
                    blinkingColor.Location = new Point(blinkingColor.Location.X, blinkingColor.Location.Y - 30);
                }
                else if (screenmode == "Driver error")
                {
                    titleText.Image      = WriteWord(titles["Main"], hlb, hlf);
                    titleText.Size       = new Size(8 * titles["Main"].Length, titleText.Height);
                    titleBorder.Size     = new Size(titleText.Width + 20, titleBorder.Height);
                    titleBorder.Location = new Point((this.Width / 2) - (titleBorder.Width / 2) - 8, titleBorder.Location.Y);
                    titleText.Location   = new Point(10, 2);

                    try { line1.Image = WriteWord(texts["Driver error"].Split('\n')[0].Substring(0, texts["Driver error"].Split('\n')[0].Length - 1).Replace("{2}", me.GenHex(2, me.GetString("ecode1"))).Replace("{0}", errorCode.ToString().Split(':')[1].ToString().Replace(" ", "").ToString()).Replace("{1}", errorCode.ToString().Split(':')[2].ToString().Replace(" ", "").ToString()), bg, fg); } catch { }
                    try { line2.Image = WriteWord(texts["Driver error"].Split('\n')[1].Substring(0, texts["Driver error"].Split('\n')[1].Length - 1).Replace("{2}", me.GenHex(2, me.GetString("ecode1"))).Replace("{0}", errorCode.ToString().Split(':')[1].ToString().Replace(" ", "").ToString()).Replace("{1}", errorCode.ToString().Split(':')[2].ToString().Replace(" ", "").ToString()), bg, fg); } catch { }
                    try { line3.Image = WriteWord(texts["Driver error"].Split('\n')[2].Substring(0, texts["Driver error"].Split('\n')[2].Length - 1).Replace("{2}", me.GenHex(2, me.GetString("ecode1"))).Replace("{0}", errorCode.ToString().Split(':')[1].ToString().Replace(" ", "").ToString()).Replace("{1}", errorCode.ToString().Split(':')[2].ToString().Replace(" ", "").ToString()), bg, fg); } catch { }
                    try { line4.Image = WriteWord(texts["Driver error"].Split('\n')[3].Substring(0, texts["Driver error"].Split('\n')[3].Length - 1).Replace("{2}", me.GenHex(2, me.GetString("ecode1"))).Replace("{0}", errorCode.ToString().Split(':')[1].ToString().Replace(" ", "").ToString()).Replace("{1}", errorCode.ToString().Split(':')[2].ToString().Replace(" ", "").ToString()), bg, fg); } catch { }
                    try { line5.Image = WriteWord(texts["Driver error"].Split('\n')[4].Substring(0, texts["Driver error"].Split('\n')[4].Length - 1).Replace("{2}", me.GenHex(2, me.GetString("ecode1"))).Replace("{0}", errorCode.ToString().Split(':')[1].ToString().Replace(" ", "").ToString()).Replace("{1}", errorCode.ToString().Split(':')[2].ToString().Replace(" ", "").ToString()), bg, fg); } catch { }
                    try { line6.Image = WriteWord(texts["Driver error"].Split('\n')[5].Substring(0, texts["Driver error"].Split('\n')[5].Length - 1).Replace("{2}", me.GenHex(2, me.GetString("ecode1"))).Replace("{0}", errorCode.ToString().Split(':')[1].ToString().Replace(" ", "").ToString()).Replace("{1}", errorCode.ToString().Split(':')[2].ToString().Replace(" ", "").ToString()), bg, fg); } catch { }
                    line7.Visible          = false;
                    line8.Visible          = false;
                    simplePanel.Location   = new Point(simplePanel.Location.X, simplePanel.Location.Y + 20);
                    anyKeyMsg.Location     = new Point(anyKeyMsg.Location.X, anyKeyMsg.Location.Y - 30);
                    blinkingColor.Location = new Point(blinkingColor.Location.X, blinkingColor.Location.Y - 30);
                }
                else if (screenmode == "System is unresponsive (Warning)")
                {
                    titleText.Image      = WriteWord(titles["Warning"], hlb, hlf);
                    titleText.Size       = new Size(8 * titles["Warning"].Length, titleText.Height);
                    titleBorder.Size     = new Size(titleText.Width + 20, titleBorder.Height);
                    titleBorder.Location = new Point((this.Width / 2) - (titleBorder.Width / 2) - 8, titleBorder.Location.Y);
                    titleText.Location   = new Point(10, 2);
                    try { line1.Image = WriteWord(texts["System is unresponsive"].Split('\n')[0].Substring(0, texts["System is unresponsive"].Split('\n')[0].Length - 1), bg, fg); } catch { }
                    try { line2.Image = WriteWord(texts["System is unresponsive"].Split('\n')[1].Substring(0, texts["System is unresponsive"].Split('\n')[1].Length - 1), bg, fg); } catch { }
                    try { line3.Image = WriteWord(texts["System is unresponsive"].Split('\n')[2].Substring(0, texts["System is unresponsive"].Split('\n')[2].Length - 1), bg, fg); } catch { }
                    try { line4.Image = WriteWord(texts["System is unresponsive"].Split('\n')[3].Substring(0, texts["System is unresponsive"].Split('\n')[3].Length - 1), bg, fg); } catch { }
                    try { line5.Image = WriteWord(texts["System is unresponsive"].Split('\n')[4].Substring(0, texts["System is unresponsive"].Split('\n')[4].Length - 1), bg, fg); } catch { }
                    try { line6.Image = WriteWord(texts["System is unresponsive"].Split('\n')[5].Substring(0, texts["System is unresponsive"].Split('\n')[5].Length - 1), bg, fg); } catch { }
                    line7.Visible          = false;
                    line8.Visible          = false;
                    simplePanel.Location   = new Point(simplePanel.Location.X, simplePanel.Location.Y + 20);
                    anyKeyMsg.Location     = new Point(anyKeyMsg.Location.X, anyKeyMsg.Location.Y - 30);
                    blinkingColor.Location = new Point(blinkingColor.Location.X, blinkingColor.Location.Y - 30);
                }
                else if (screenmode == "System is busy")
                {
                    titleText.Image      = WriteWord(titles["System is busy"], hlb, hlf);
                    titleText.Size       = new Size(8 * titles["System is busy"].Length, titleText.Height);
                    titleBorder.Size     = new Size(titleText.Width + 20, titleBorder.Height);
                    titleBorder.Location = new Point((this.Width / 2) - (titleBorder.Width / 2) - 8, titleBorder.Location.Y);
                    titleText.Location   = new Point(10, 2);
                    try { line1.Image = WriteWord(texts["System is busy"].Split('\n')[0].Substring(0, texts["System is busy"].Split('\n')[0].Length - 1), bg, fg); } catch { }
                    try { line2.Image = WriteWord(texts["System is busy"].Split('\n')[1].Substring(0, texts["System is busy"].Split('\n')[1].Length - 1), bg, fg); } catch { }
                    try { line3.Image = WriteWord(texts["System is busy"].Split('\n')[2].Substring(0, texts["System is busy"].Split('\n')[2].Length - 1), bg, fg); } catch { }
                    try { line4.Image = WriteWord(texts["System is busy"].Split('\n')[3].Substring(0, texts["System is busy"].Split('\n')[3].Length - 1), bg, fg); } catch { }
                    try { line5.Image = WriteWord(texts["System is busy"].Split('\n')[4].Substring(0, texts["System is busy"].Split('\n')[4].Length - 1), bg, fg); } catch { }
                    try { line6.Image = WriteWord(texts["System is busy"].Split('\n')[5].Substring(0, texts["System is busy"].Split('\n')[5].Length - 1), bg, fg); } catch { }
                    try { line7.Image = WriteWord(texts["System is busy"].Split('\n')[6].Substring(0, texts["System is busy"].Split('\n')[6].Length - 1), bg, fg); } catch { }

                    line8.Visible          = false;
                    titleText.Size         = new Size(titleText.Width + 70, titleText.Height);
                    titleText.Location     = new Point(10, 2);
                    simplePanel.Location   = new Point(simplePanel.Location.X, simplePanel.Location.Y + 10);
                    anyKeyMsg.Location     = new Point(anyKeyMsg.Location.X, anyKeyMsg.Location.Y - 10);
                    blinkingColor.Location = new Point(blinkingColor.Location.X, blinkingColor.Location.Y - 10);
                }
                else if (screenmode == "No unresponsive programs")
                {
                    titleText.Image      = WriteWord(titles["Main"], hlb, hlf);
                    titleText.Size       = new Size(8 * titles["Main"].Length, titleText.Height);
                    titleBorder.Size     = new Size(titleText.Width + 20, titleBorder.Height);
                    titleBorder.Location = new Point((this.Width / 2) - (titleBorder.Width / 2) - 8, titleBorder.Location.Y);
                    titleText.Location   = new Point(10, 2);
                    try { line1.Image = WriteWord(texts["No unresponsive programs"].Split('\n')[0].Substring(0, texts["No unresponsive programs"].Split('\n')[0].Length - 1), bg, fg); } catch { }
                    try { line2.Image = WriteWord(texts["No unresponsive programs"].Split('\n')[1].Substring(0, texts["No unresponsive programs"].Split('\n')[1].Length - 1), bg, fg); } catch { }
                    try { line3.Image = WriteWord(texts["No unresponsive programs"].Split('\n')[2].Substring(0, texts["No unresponsive programs"].Split('\n')[2].Length - 1), bg, fg); } catch { }
                    try { line4.Image = WriteWord(texts["No unresponsive programs"].Split('\n')[3].Substring(0, texts["No unresponsive programs"].Split('\n')[3].Length - 1), bg, fg); } catch { }
                    try { line5.Image = WriteWord(texts["No unresponsive programs"].Split('\n')[4].Substring(0, texts["No unresponsive programs"].Split('\n')[4].Length - 1), bg, fg); } catch { }
                    try { line6.Image = WriteWord(texts["No unresponsive programs"].Split('\n')[5].Substring(0, texts["No unresponsive programs"].Split('\n')[5].Length - 1), bg, fg); } catch { }
                    try { line7.Image = WriteWord(texts["No unresponsive programs"].Split('\n')[6].Substring(0, texts["No unresponsive programs"].Split('\n')[6].Length - 1), bg, fg); } catch { }
                    try { line8.Image = WriteWord(texts["No unresponsive programs"].Split('\n')[7].Substring(0, texts["No unresponsive programs"].Split('\n')[7].Length - 1), bg, fg); } catch { }
                    line4.Location         = new Point(line4.Location.X, line4.Location.Y + 14);
                    line5.Location         = new Point(line5.Location.X, line5.Location.Y + 14);
                    line6.Location         = new Point(line6.Location.X, line6.Location.Y + 26);
                    line7.Location         = new Point(line7.Location.X, line7.Location.Y + 26);
                    line8.Location         = new Point(line8.Location.X, line8.Location.Y + 26);
                    simplePanel.Location   = new Point(simplePanel.Location.X, simplePanel.Location.Y - 15);
                    anyKeyMsg.Location     = new Point(anyKeyMsg.Location.X, anyKeyMsg.Location.Y + 26);
                    blinkingColor.Location = new Point(blinkingColor.Location.X, blinkingColor.Location.Y + 26);
                }
                anyKeyMsg.Image        = WriteWord(prompt, bg, fg);
                anyKeyMsg.Size         = new Size(prompt.Length * 8, anyKeyMsg.Height);
                anyKeyMsg.Location     = new Point((this.Width / 2) - (anyKeyMsg.Width / 2) - 16, anyKeyMsg.Location.Y);
                blinkingColor.Location = new Point(anyKeyMsg.Location.X + anyKeyMsg.Width + 8, blinkingColor.Location.Y);
                Program.loadfinished   = true;
                if (!window)
                {
                    this.FormBorderStyle = FormBorderStyle.None;
                    this.TopMost         = false;

                    if (Screen.AllScreens.Length > 1)
                    {
                        foreach (Screen s in Screen.AllScreens)
                        {
                            WindowScreen ws = new WindowScreen();
                            if (!s.Primary)
                            {
                                if (Program.multidisplaymode != "none")
                                {
                                    ws.StartPosition = FormStartPosition.Manual;
                                    ws.Location      = s.WorkingArea.Location;
                                    ws.Size          = new Size(s.WorkingArea.Width, s.WorkingArea.Height);
                                    ws.primary       = false;

                                    if (Program.multidisplaymode == "freeze")
                                    {
                                        Bitmap screenshot = new Bitmap(s.Bounds.Width,
                                                                       s.Bounds.Height,
                                                                       System.Drawing.Imaging.PixelFormat.Format32bppArgb);
                                        Graphics gfxScreenshot = Graphics.FromImage(screenshot);
                                        gfxScreenshot.CopyFromScreen(
                                            s.Bounds.X,
                                            s.Bounds.Y,
                                            0,
                                            0,
                                            s.Bounds.Size,
                                            CopyPixelOperation.SourceCopy
                                            );
                                        freezescreens.Add(screenshot);
                                    }
                                }
                            }
                            wss.Add(ws);
                        }
                    }
                    else
                    {
                        wss.Add(new WindowScreen());
                    }
                    for (int i = 0; i < wss.Count; i++)
                    {
                        WindowScreen ws = wss[i];
                        ws.Show();
                        if (!ws.primary)
                        {
                            if (Program.multidisplaymode == "freeze")
                            {
                                ws.screenDisplay.Image = freezescreens[i - 1];
                            }
                        }
                    }
                }
                else
                {
                    this.Size = new Size(640, 320);
                }
                int[] colors = { this.BackColor.R + 50, this.BackColor.R + 50, this.BackColor.B + 50 };
                if (colors[0] > 255)
                {
                    colors[0] -= 255;
                }
                if (colors[1] > 255)
                {
                    colors[1] -= 255;
                }
                if (colors[2] > 255)
                {
                    colors[2] -= 255;
                }
                waterMarkText.ForeColor = Color.FromArgb(colors[0], colors[1], colors[2]);
            } catch (Exception ex)
            {
                Program.loadfinished  = true;
                screenUpdater.Enabled = false;
                this.Hide();
                if (Program.f1.enableeggs)
                {
                    me.Crash(ex.Message, ex.StackTrace, "OrangeScreen");
                }
                else
                {
                    MessageBox.Show("The blue screen cannot be displayed due to an error.\n\n" + ex.Message + "\n\n" + ex.StackTrace, "E R R O R", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                this.Close();
            }
        }
Example #7
0
        private void Initialization(object sender, EventArgs e)
        {
            try
            {
                this.Icon = me.GetIcon();
                this.Text = me.GetString("friendlyname");
                Color bg  = me.GetTheme(true);
                Color fg  = me.GetTheme(false);
                Color hbg = me.GetTheme(true, true);
                Color hfg = me.GetTheme(false, true);
                this.BackColor = bg; this.ForeColor = fg;
                IDictionary <string, string> txt    = me.GetTexts();
                IDictionary <string, string> titles = me.GetTitles();
                //this.Font = me.GetFont();
                bootmgrTitle.BackColor         = fg; bootmgrTitle.ForeColor = bg; bootmgrTitle.Text = titles["Main"];
                bootmgrEnterContinue.BackColor = fg; bootmgrEnterContinue.ForeColor = bg; bootmgrEnterContinue.Text = txt["Continue"];
                bootmgrEscapeExit.BackColor    = fg; bootmgrEscapeExit.ForeColor = bg; bootmgrEscapeExit.Text = txt["Exit"];

                bootmgrIntro.BackColor        = bg; bootmgrIntro.ForeColor = fg; bootmgrIntro.Text = txt["Troubleshooting introduction"];
                bootmgrTroubleshoot.BackColor = bg; bootmgrTroubleshoot.ForeColor = fg; bootmgrTroubleshoot.Text = txt["Troubleshooting"];
                bootmgrConsultAdmin.BackColor = bg; bootmgrConsultAdmin.ForeColor = fg; bootmgrConsultAdmin.Text = txt["Troubleshooting without disc"];
                bootmgrStatus.BackColor       = bg; bootmgrStatus.ForeColor = fg; bootmgrStatus.Text = txt["Status"];
                bootmgrInfo.BackColor         = bg; bootmgrInfo.ForeColor = fg; bootmgrInfo.Text = txt["Info"];

                bootmgrStatusCode.BackColor  = hbg; bootmgrStatusCode.ForeColor = hfg; bootmgrStatusCode.Text = me.GetString("code").ToLower();
                bootmgrInfoDetails.BackColor = hbg; bootmgrInfoDetails.ForeColor = hfg; bootmgrInfoDetails.Text = txt["Error description"];

                this.TopMost         = false;
                Program.loadfinished = true;
                if (Screen.AllScreens.Length > 1)
                {
                    foreach (Screen s in Screen.AllScreens)
                    {
                        WindowScreen ws = new WindowScreen();
                        if (!s.Primary)
                        {
                            if (Program.multidisplaymode != "none")
                            {
                                ws.StartPosition = FormStartPosition.Manual;
                                ws.Location      = s.WorkingArea.Location;
                                ws.Size          = new Size(s.WorkingArea.Width, s.WorkingArea.Height);
                                ws.primary       = false;
                            }
                        }
                        wss.Add(ws);
                    }
                }
                foreach (WindowScreen ws in wss)
                {
                    ws.Show();
                }
                this.waterMarkText.Visible = me.GetBool("watermark");
                int[] colors = { this.BackColor.R + 50, this.BackColor.G + 50, this.BackColor.B + 50 };
                if (colors[0] > 255)
                {
                    colors[0] -= 255;
                }
                if (colors[1] > 255)
                {
                    colors[1] -= 255;
                }
                if (colors[2] > 255)
                {
                    colors[2] -= 255;
                }
                waterMarkText.ForeColor = Color.FromArgb(colors[0], colors[1], colors[2]);
                this.Hide();
            } catch (Exception ex)
            {
                Program.loadfinished  = true;
                screenUpdater.Enabled = false;
                this.Hide();
                if (Program.f1.enableeggs)
                {
                    me.Crash(ex.Message, ex.StackTrace, "OrangeScreen");
                }
                else
                {
                    MessageBox.Show("The blue screen cannot be displayed due to an error.\n\n" + ex.Message + "\n\n" + ex.StackTrace, "E R R O R", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                this.Close();
            }
        }
        private void Initialize(object sender, EventArgs e)
        {
            try
            {
                this.Icon = me.GetIcon();
                this.Text = me.GetString("friendlyname");
                if (Program.f1.enableeggs)
                {
                    if (this.BackColor == this.ForeColor)
                    {
                        this.BackColor        = Color.FromArgb(255, 0, 0);
                        rainBowScreen.Enabled = true;
                    }
                }
                try { progress = me.GetInt("timer"); } catch { progress = 30; }
                timeOut.Text = me.GetTexts()["Restart message"].Replace("{0}", progress.ToString());
                string[] codez = technicalCode.Text.Replace("*** STOP: ", "").Replace(" (", "-").Replace(")", "").Split('-');
                technicalCode.Text = me.GetTexts()["Technical information formatting"].Replace("{0}", codez[0].ToString()).Replace("{1}", codez[1]).ToString();
                techinfoLabel.Text = me.GetTexts()["Technical information"];
                infoLabel.Text     = me.GetTexts()["A problem has occurred..."] + "\n" + me.GetTexts()["CTRL+ALT+DEL message"];
                foreach (Control c in this.Controls)
                {
                    if (c is Label)
                    {
                        if (c.Name != "waterMarkText")
                        {
                            c.Font = me.GetFont();
                        }
                    }
                }
                Program.loadfinished = true;
                if (!fullscreen)
                {
                    this.FormBorderStyle = FormBorderStyle.FixedSingle;
                }
                if (fullscreen)
                {
                    this.TopMost = false;
                    if (Screen.AllScreens.Length > 1)
                    {
                        foreach (Screen s in Screen.AllScreens)
                        {
                            WindowScreen ws = new WindowScreen();
                            if (!s.Primary)
                            {
                                if (Program.multidisplaymode != "none")
                                {
                                    ws.StartPosition = FormStartPosition.Manual;
                                    ws.Location      = s.WorkingArea.Location;
                                    ws.Size          = new Size(s.WorkingArea.Width, s.WorkingArea.Height);
                                    ws.primary       = false;

                                    if (Program.multidisplaymode == "freeze")
                                    {
                                        Bitmap screenshot = new Bitmap(s.Bounds.Width,
                                                                       s.Bounds.Height,
                                                                       System.Drawing.Imaging.PixelFormat.Format32bppArgb);
                                        Graphics gfxScreenshot = Graphics.FromImage(screenshot);
                                        gfxScreenshot.CopyFromScreen(
                                            s.Bounds.X,
                                            s.Bounds.Y,
                                            0,
                                            0,
                                            s.Bounds.Size,
                                            CopyPixelOperation.SourceCopy
                                            );
                                        freezescreens.Add(screenshot);
                                    }
                                }
                            }
                            wss.Add(ws);
                        }
                    }
                    else
                    {
                        wss.Add(new WindowScreen());
                    }
                    for (int i = 0; i < wss.Count; i++)
                    {
                        WindowScreen ws = wss[i];
                        ws.Show();
                        if (!ws.primary)
                        {
                            if (Program.multidisplaymode == "freeze")
                            {
                                ws.screenDisplay.Image = freezescreens[i - 1];
                            }
                        }
                    }
                    try
                    {
                        foreach (WindowScreen ws in wss)
                        {
                            var frm = Form.ActiveForm;
                            if (frm != null)
                            {
                                if (ws.primary || Program.multidisplaymode == "mirror")
                                {
                                    using (var bmp = new Bitmap(frm.Width, frm.Height))
                                    {
                                        frm.DrawToBitmap(bmp, new Rectangle(0, 0, bmp.Width, bmp.Height));

                                        Bitmap newImage = new Bitmap(ws.Width, ws.Height);
                                        using (Graphics g = Graphics.FromImage(newImage))
                                        {
                                            if (Program.f1.GMode == "HighQualityBicubic")
                                            {
                                                g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
                                            }
                                            if (Program.f1.GMode == "HighQualityBilinear")
                                            {
                                                g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBilinear;
                                            }
                                            if (Program.f1.GMode == "Bilinear")
                                            {
                                                g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.Bilinear;
                                            }
                                            if (Program.f1.GMode == "Bicubic")
                                            {
                                                g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.Bicubic;
                                            }
                                            if (Program.f1.GMode == "NearestNeighbour")
                                            {
                                                g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
                                            }
                                            g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
                                            g.DrawImage(bmp, new Rectangle(0, 0, ws.Width, ws.Height));
                                        }
                                        ws.screenDisplay.Image = newImage;
                                    }
                                }
                            }
                        }
                    }
                    catch
                    {
                    }
                    Program.loadfinished = true;
                }
            } catch (Exception ex)
            {
                Program.loadfinished  = true;
                screenUpdater.Enabled = false;
                this.Hide();
                if (Program.f1.enableeggs)
                {
                    me.Crash(ex.Message, ex.StackTrace, "OrangeScreen");
                }
                else
                {
                    MessageBox.Show("The blue screen cannot be displayed due to an error.\n\n" + ex.Message + "\n\n" + ex.StackTrace, "E R R O R", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                this.Close();
            }
            int[] colors = { this.BackColor.R + 50, this.BackColor.G + 50, this.BackColor.B + 50 };
            if (colors[0] > 255)
            {
                colors[0] -= 255;
            }
            if (colors[1] > 255)
            {
                colors[1] -= 255;
            }
            if (colors[2] > 255)
            {
                colors[2] -= 255;
            }
            waterMarkText.ForeColor = Color.FromArgb(colors[0], colors[1], colors[2]);
        }
        private void WXBS_Load(object sender, EventArgs e)
        {
            try
            {
                oldmode = me.AllProgress().Keys.Count == 0;
                if (!oldmode)
                {
                    progressUpdater.Interval = 1;
                }
                this.Icon        = me.GetIcon();
                this.Text        = me.GetString("friendlyname");
                memCodes.Visible = me.GetBool("extracodes");
                Font  textfont         = me.GetFont();
                float textsize         = textfont.Size;
                Font  emotifont        = new Font(me.GetFont().FontFamily, textsize * 5f, me.GetFont().Style);
                Font  modernDetailFont = new Font(me.GetFont().FontFamily, textsize * 0.55f, me.GetFont().Style);
                emoticonLabel.Font     = emotifont;
                yourPCranLabel.Font    = textfont;
                progressIndicator.Font = textfont;
                supportInfo.Font       = modernDetailFont;
                errorCode.Font         = modernDetailFont;
                yourPCranLabel.Text    = me.GetTexts()["Information text with dump"];

                qrCode.Size = new Size(me.GetInt("qr_size"), me.GetInt("qr_size"));

                if (me.GetString("qr_file") == "local:1")
                {
                    qrCode.Image = Properties.Resources.bsodqr_transparent;
                }
                else if (me.GetString("qr_file") == "local:0")
                {
                    qrCode.Image = Properties.Resources.bsodqr;
                }
                else
                {
                    try { qrCode.Image = Image.FromFile(me.GetString("qr_file")); } catch { qrCode.Image = Properties.Resources.bsodqr; }
                }
                if (w8 == true)
                {
                    yourPCranLabel.Text = me.GetTexts()["Information text with dump"].Replace("{0}", "0");
                    if (close == true)
                    {
                        close = false; w8close = true;
                    }
                }
                else
                {
                    progressIndicator.Text = me.GetTexts()["Progress"].Replace("{0}", "0");
                    supportInfo.Text       = me.GetTexts()["Additional information"];
                }
                if (me.GetBool("blackscreen"))
                {
                    this.BackColor = Color.Black;
                }
                if (!w8close)
                {
                    if (close == false)
                    {
                        yourPCranLabel.Text = me.GetTexts()["Information text without dump"];
                    }
                    if (green)
                    {
                        this.BackColor      = Color.FromArgb(47, 121, 42);
                        yourPCranLabel.Text = yourPCranLabel.Text.Replace("PC", "Windows Insider Build");
                    }
                    if (server)
                    {
                        emoticonLabel.Visible = false;
                        yourPCranLabel.Margin = new Padding(yourPCranLabel.Margin.Left, 80, 0, 0);
                    }
                    if (me.GetBool("device"))
                    {
                        yourPCranLabel.Text = yourPCranLabel.Text.Replace("PC", "device");
                    }
                }
                try { waterMarkText.ForeColor = Color.FromArgb(this.BackColor.R + 60, this.BackColor.G + 60, this.BackColor.B + 60); } catch { }
                if (this.FormBorderStyle == FormBorderStyle.None)
                {
                    if (!Program.f1.showcursor)
                    {
                        Cursor.Hide();
                    }
                }
                emoticonLabel.Padding     = new Padding(0, Convert.ToInt32(this.Height * ((double)me.GetInt("margin-y") / 100.0)), 0, 0);
                qrMargin.Width            = Convert.ToInt32(this.Width * ((double)me.GetInt("margin-x") / 100.0)) - 10;
                yourPCranLabel.Padding    = new Padding(qrMargin.Width - 3, 0, 0, 0);
                progressIndicator.Padding = yourPCranLabel.Padding;
                emoticonLabel.Margin      = new Padding(Convert.ToInt32(qrMargin.Width * 0.8), 0, 0, 0);
                horizontalFlowPanel.Width = this.Width - 10;
                if (w8 == false)
                {
                    if (whatfail == "")
                    {
                        errorCode.Text = me.GetTexts()["Error code"].Replace("{0}", code);
                    }
                    else
                    {
                        errorCode.Location = new Point(3, 36);
                        errorCode.Text     = me.GetTexts()["Error code"].Replace("{0}", code + "\n\n" + me.GetTexts()["Culprit file"].Replace("{0}", whatfail.ToLower()));
                    }
                }
                if (w8 == true)
                {
                    progressIndicator.Visible = false;
                    if (whatfail == "")
                    {
                        errorCode.Text = me.GetTexts()["Error code"].Replace("{0}", code);
                    }
                    else
                    {
                        errorCode.Text = me.GetTexts()["Error code"].Replace("{0}", code + " (" + whatfail.ToLower() + ")");
                    }
                }
                if (qr == true)
                {
                    qrCode.Visible      = true;
                    supportInfo.Visible = true;
                    errorCode.Location  = new Point(3, 56);
                    Point locationOnForm = qrCode.FindForm().PointToClient(qrCode.Parent.PointToScreen(qrCode.Location));
                    supportContainer.Location = new Point(qrMargin.Width + qrCode.Width + 20, locationOnForm.Y);
                }
                else
                {
                    qrCode.Visible      = false;
                    supportInfo.Visible = false;
                    errorCode.Location  = new Point(3, 0);
                    Point locationOnForm = horizontalFlowPanel.FindForm().PointToClient(horizontalFlowPanel.Parent.PointToScreen(horizontalFlowPanel.Location));
                    supportContainer.Location = new Point(qrMargin.Width - 13, locationOnForm.Y);
                }
                if (qr == false)
                {
                    if (close == false)
                    {
                        if (w8)
                        {
                            Point locationOnForm = yourPCranLabel.FindForm().PointToClient(yourPCranLabel.Parent.PointToScreen(yourPCranLabel.Location));
                            supportContainer.Location = new Point(supportContainer.Location.X, locationOnForm.Y + 150);
                        }
                    }
                }
                if (w8)
                {
                    if (w8close == false)
                    {
                        yourPCranLabel.Text       = me.GetTexts()["Information text without dump"];
                        progressUpdater.Enabled   = false;
                        progressIndicator.Visible = false;
                        Point locationOnForm = yourPCranLabel.FindForm().PointToClient(yourPCranLabel.Parent.PointToScreen(yourPCranLabel.Location));
                        supportContainer.Location = new Point(qrMargin.Width - 13, locationOnForm.Y + 120);
                    }
                }
                if (w8close == true)
                {
                    progressUpdater.Enabled = true;
                }
                Program.loadfinished = true;
                if (!me.GetBool("windowed"))
                {
                    if (Screen.AllScreens.Length > 1)
                    {
                        foreach (Screen s in Screen.AllScreens)
                        {
                            if (!s.Primary)
                            {
                                if (Program.multidisplaymode != "none")
                                {
                                    WindowScreen ws = new WindowScreen
                                    {
                                        StartPosition = FormStartPosition.Manual,
                                        Location      = s.WorkingArea.Location,
                                        Size          = new Size(s.WorkingArea.Width, s.WorkingArea.Height),
                                        primary       = false
                                    };
                                    if (Program.multidisplaymode == "freeze")
                                    {
                                        screenUpdater.Enabled = false;
                                        Bitmap screenshot = new Bitmap(s.Bounds.Width,
                                                                       s.Bounds.Height,
                                                                       System.Drawing.Imaging.PixelFormat.Format32bppArgb);
                                        Graphics gfxScreenshot = Graphics.FromImage(screenshot);
                                        gfxScreenshot.CopyFromScreen(
                                            s.Bounds.X,
                                            s.Bounds.Y,
                                            0,
                                            0,
                                            s.Bounds.Size,
                                            CopyPixelOperation.SourceCopy
                                            );
                                        freezescreens.Add(screenshot);
                                    }
                                    wss.Add(ws);
                                }
                            }
                        }
                        for (int i = 0; i < wss.Count; i++)
                        {
                            WindowScreen ws = wss[i];
                            ws.Show();
                            if (Program.multidisplaymode == "freeze")
                            {
                                ws.screenDisplay.Image = freezescreens[i];
                            }
                        }
                    }
                }
            } catch (Exception ex)
            {
                Program.loadfinished    = true;
                screenUpdater.Enabled   = false;
                progressUpdater.Enabled = false;
                this.Hide();
                if (Program.f1.enableeggs)
                {
                    me.Crash(ex.Message, ex.StackTrace, "OrangeScreen");
                }
                else
                {
                    MessageBox.Show("The blue screen cannot be displayed due to an error.\n\n" + ex.Message + "\n\n" + ex.StackTrace, "E R R O R", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                this.Close();
            }
        }