// Decompiled with JetBrains decompiler
// Type: FiestaLauncher.Main
// Assembly: FiestaOnline, Version=2019.5.22.0, Culture=neutral, PublicKeyToken=null
// MVID: 2FD5EB61-BC25-469D-997E-88998E849F6A
// Assembly location: C:\Users\marbo\Documents\Gamigo 2020 Client\FiestaOnline.exe

using FiestaLauncher.Services;
using Properties;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;

namespace FiestaLauncher
{
  public class Main : Form
  {
    internal string CurrentFile = "";
    private IContainer components = (IContainer) null;
    internal bool MaintMode;
    internal bool CanLaunch;
    private ProgressBar progressBar1;
    private PictureBox pictureBox13;
    private Label l_n_Text;
    private Label l_n_Title;
    private PictureBox pictureBox12;
    private PictureBox pictureBox11;
    private PictureBox pictureBox10;
    private PictureBox pictureBox9;
    private PictureBox pictureBox8;
    private PictureBox pictureBox5;
    private PictureBox pictureBox4;
    private PictureBox pictureBox3;
    private PictureBox pictureBox2;
    private PictureBox pictureBox1;
    private Label l_S2;
    private Label l_V;
    private Label l_S1;
    private PictureBox pictureBox6;
    private PictureBox pictureBox7;
    private System.Windows.Forms.Timer tmr_MaintCheck;

    public Main()
    {
      this.InitializeComponent();
      Application.ThreadException += new ThreadExceptionEventHandler(Main.MyCommonExceptionHandlingMethod);
      this.l_S1.Location = this.pictureBox6.PointToClient(this.PointToScreen(this.l_S1.Location));
      this.l_S1.Parent = (Control) this.pictureBox6;
      this.l_S2.Location = this.pictureBox6.PointToClient(this.PointToScreen(this.l_S2.Location));
      this.l_S2.Parent = (Control) this.pictureBox6;
      this.l_V.Location = this.pictureBox6.PointToClient(this.PointToScreen(this.l_V.Location));
      this.l_V.Parent = (Control) this.pictureBox6;
      this.l_n_Title.Location = this.pictureBox12.PointToClient(this.PointToScreen(this.l_n_Title.Location));
      this.l_n_Title.Parent = (Control) this.pictureBox12;
      this.l_n_Text.Location = this.pictureBox12.PointToClient(this.PointToScreen(this.l_n_Text.Location));
      this.l_n_Text.Parent = (Control) this.pictureBox12;
    }

    private static int ConvertBytesToMegabytes(long bytes)
    {
      return Convert.ToInt32((float) ((double) bytes / 1024.0 / 1024.0));
    }

    internal void DownloadComplete()
    {
      this.SetStatus(LangService.Get("download_complete"));
      this.SetStatus2("");
      this.SetProgressWidth(0);
      this.SetProgressVisible(true);
      if (this.CurrentFile.ToLower().EndsWith(".gdp"))
        this.StartGdpExtract();
      if (!this.CurrentFile.ToLower().EndsWith(".exe") && !this.CurrentFile.ToLower().EndsWith(".msi"))
        return;
      this.StartExePatch();
    }

    internal void DownloadProgressChanged(long bytesReceived, long totalToReceive, int percent)
    {
      this.SetProgressWidth(percent);
      int num = Main.ConvertBytesToMegabytes(totalToReceive);
      if (num == 0)
        num = 1;
      this.SetStatus2(string.Format("{0}MB / {1}MB - {2}%", (object) Main.ConvertBytesToMegabytes(bytesReceived), (object) num, (object) percent));
    }

    internal void CheckForUpdates()
    {
      this.SetStatus(LangService.Get("update_check"));
      this.SetVersion(gFiestaLauncher.CURRENT_PATCH);
      this.SetProgressVisible(false);
      this.SetProgressWidth(0);
      ClientUpdateService.CheckForUpdates(false);
    }

    internal void ClientUpToDate()
    {
      this.SetStatus(LangService.Get("up_to_date"));
      this.SetProgressVisible(false);
      this.CanLaunch = true;
      this.SetCanLaunch(this.CanLaunch);
    }

    private static void MyCommonExceptionHandlingMethod(object sender, ThreadExceptionEventArgs t)
    {
      FeedbackService.Exception(t.Exception);
    }

    internal void GdpExtractComplete()
    {
      try
      {
        File.Delete(Path.GetTempPath() + this.CurrentFile);
      }
      catch (Exception ex)
      {
        gFiestaLauncher.onCrash(ex);
      }
      VersionService.GdpUpdateComplete();
      this.SetStatus(LangService.Get("patch_finish"));
      this.SetStatus2("");
      this.SetProgressWidth(0);
      this.SetProgressVisible(false);
      this.CheckForUpdates();
    }

    internal void PageChange(int p)
    {
      WebFrameService.PageChange(p);
    }

    internal void Init()
    {
      Main.CoInternetSetFeatureEnabled(21, 2, true);
      this.SetPng("reslauncher\\" + gFiestaLauncher.Settings["swf.PNG"]);
    }

    private void LaunchClient()
    {
      if (this.MaintMode)
      {
        int num = (int) MessageBox.Show(gFiestaLauncher.MaintError, "Fiesta Launcher", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
      }
      else
      {
        try
        {
          NoticeService.Disable();
          this.CanLaunch = false;
          this.Hide();
          this.Visible = false;
          this.FormBorderStyle = FormBorderStyle.None;
          this.Size = new Size(0, 0);
          this.ShowInTaskbar = false;
          this.ShowIcon = false;
          ProcessStartInfo startInfo = new ProcessStartInfo()
          {
            FileName = gFiestaLauncher.Settings["StartupBin"],
            Arguments = gFiestaLauncher.Settings["Startup"] + gFiestaLauncher.ADDED_BIN_ARGS,
            WorkingDirectory = Directory.GetCurrentDirectory(),
            UseShellExecute = false
          };
          if (gFiestaLauncher.Settings["EW.enabled"] != "1")
          {
            Process.Start(startInfo);
            Environment.Exit(0);
          }
          else
            Process.Start(startInfo)?.WaitForExit();
        }
        catch (Exception ex)
        {
          gFiestaLauncher.onCrash(ex);
        }
      }
    }

    private void Main_FormClosed(object sender, FormClosedEventArgs e)
    {
      Environment.Exit(0);
    }

    private void Main_Load(object sender, EventArgs e)
    {
      new Thread(new ThreadStart(NoticeService.Init)).Start();
    }

    private void pictureBox13_Click(object sender, EventArgs e)
    {
      if (this.pictureBox12.Visible)
      {
        this.l_n_Title.Visible = false;
        this.l_n_Text.Visible = false;
        this.pictureBox12.Visible = false;
      }
      else
      {
        this.l_n_Title.Visible = true;
        this.l_n_Text.Visible = true;
        this.pictureBox12.Visible = true;
      }
    }

    private void pictureBox2_Click(object sender, EventArgs e)
    {
      FeedbackService.SwfButton("btn_News");
    }

    private void pictureBox3_Click(object sender, EventArgs e)
    {
      FeedbackService.SwfButton("btn_Shop");
    }

    private void pictureBox4_Click(object sender, EventArgs e)
    {
      FeedbackService.SwfButton("btn_Forum");
    }

    private void pictureBox5_Click(object sender, EventArgs e)
    {
      FeedbackService.SwfButton("btn_Videos");
    }

    private void pictureBox8_Click(object sender, EventArgs e)
    {
      if (!this.CanLaunch)
        return;
      this.LaunchClient();
    }

    internal void ReloadSettingsComplete()
    {
      if (!(gFiestaLauncher.Settings["Maint"] == "0"))
        return;
      this.MaintMode = false;
      this.tmr_MaintCheck.Stop();
      HttpService.GetPatchHive();
    }

    public void RunOnUiThread(Main.RunOnUiThreadDelegate action)
    {
      try
      {
        this.Invoke((Delegate) new MethodInvoker(action.Invoke));
      }
      catch (Exception ex)
      {
        FeedbackService.Exception(ex);
      }
    }

    internal void SetCanLaunch(bool w)
    {
      this.CanLaunch = w;
      if (w)
      {
        this.pictureBox8.Visible = true;
        this.pictureBox9.Visible = false;
      }
      else
      {
        this.pictureBox8.Visible = false;
        this.pictureBox9.Visible = true;
      }
    }

    internal void SetNotification(string title, string text, int type, int auto)
    {
      this.l_n_Text.Text = text;
      this.l_n_Title.Text = title;
      this.pictureBox13.Visible = true;
      if (auto != 1)
        return;
      this.pictureBox12.Visible = true;
      this.l_n_Title.Visible = true;
      this.l_n_Text.Visible = true;
    }

    private void SetPng(string p)
    {
      try
      {
        this.BackgroundImage = Image.FromFile(p);
      }
      catch
      {
        this.BackColor = Color.White;
      }
    }

    internal void SetProgressMax(int GDPSpaceCount)
    {
      this.progressBar1.Maximum = GDPSpaceCount;
    }

    internal void SetProgressVisible(bool w)
    {
      this.progressBar1.Visible = w;
    }

    internal void SetProgressWidth(int w)
    {
      this.progressBar1.Value = w;
    }

    internal void SetStatus(string status)
    {
      this.l_S1.Text = status;
    }

    internal void SetStatus2(string status)
    {
      this.l_S2.Text = status;
    }

    internal void SetVersion(string version)
    {
      this.l_V.Text = version;
    }

    private void StartExePatch()
    {
      ProcessStartInfo startInfo = new ProcessStartInfo()
      {
        FileName = Path.GetTempPath() + this.CurrentFile,
        Arguments = Directory.GetCurrentDirectory()
      };
      NoticeService.Disable();
      this.Hide();
      Process.Start(startInfo)?.WaitForExit();
      NoticeService.Enable();
      this.GdpExtractComplete();
      this.Show();
    }

    internal void StartGdpExtract()
    {
      this.SetStatus(LangService.Get("applying"));
      this.SetStatus2("");
      this.SetProgressWidth(0);
      this.SetProgressVisible(true);
      new Thread((ThreadStart) (() => GDPService.ExtractGDP(Path.GetTempPath() + this.CurrentFile))).Start();
    }

    internal void StartPatchDownload(string p)
    {
      this.SetStatus(LangService.Get("downloading"));
      this.SetProgressVisible(true);
      this.CurrentFile = p;
      this.CanLaunch = false;
      this.SetCanLaunch(this.CanLaunch);
      this.progressBar1.Maximum = 100;
      HttpService.StartDownloadPatch(p);
    }

    private void tmr_MaintCheck_Tick(object sender, EventArgs e)
    {
      HttpService.ReloadSettings();
    }

    [DllImport("urlmon.dll")]
    private static extern int CoInternetSetFeatureEnabled(
      int featureEntry,
      int dwFlags,
      bool fEnable);

    protected override void Dispose(bool disposing)
    {
      if (disposing && this.components != null)
        this.components.Dispose();
      base.Dispose(disposing);
    }

    private void InitializeComponent()
    {
      this.components = (IContainer) new Container();
      ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (Main));
      this.progressBar1 = new ProgressBar();
      this.pictureBox13 = new PictureBox();
      this.l_n_Text = new Label();
      this.l_n_Title = new Label();
      this.pictureBox12 = new PictureBox();
      this.pictureBox11 = new PictureBox();
      this.pictureBox10 = new PictureBox();
      this.pictureBox9 = new PictureBox();
      this.pictureBox8 = new PictureBox();
      this.pictureBox5 = new PictureBox();
      this.pictureBox4 = new PictureBox();
      this.pictureBox3 = new PictureBox();
      this.pictureBox2 = new PictureBox();
      this.pictureBox1 = new PictureBox();
      this.l_S2 = new Label();
      this.l_V = new Label();
      this.l_S1 = new Label();
      this.pictureBox6 = new PictureBox();
      this.pictureBox7 = new PictureBox();
      this.tmr_MaintCheck = new System.Windows.Forms.Timer(this.components);
      ((ISupportInitialize) this.pictureBox13).BeginInit();
      ((ISupportInitialize) this.pictureBox12).BeginInit();
      ((ISupportInitialize) this.pictureBox11).BeginInit();
      ((ISupportInitialize) this.pictureBox10).BeginInit();
      ((ISupportInitialize) this.pictureBox9).BeginInit();
      ((ISupportInitialize) this.pictureBox8).BeginInit();
      ((ISupportInitialize) this.pictureBox5).BeginInit();
      ((ISupportInitialize) this.pictureBox4).BeginInit();
      ((ISupportInitialize) this.pictureBox3).BeginInit();
      ((ISupportInitialize) this.pictureBox2).BeginInit();
      ((ISupportInitialize) this.pictureBox1).BeginInit();
      ((ISupportInitialize) this.pictureBox6).BeginInit();
      ((ISupportInitialize) this.pictureBox7).BeginInit();
      this.SuspendLayout();
      this.progressBar1.BackColor = Color.White;
      this.progressBar1.ForeColor = Color.LimeGreen;
      this.progressBar1.Location = new Point(11, 548);
      this.progressBar1.Name = "progressBar1";
      this.progressBar1.Size = new Size(934, 16);
      this.progressBar1.Step = 1;
      this.progressBar1.Style = ProgressBarStyle.Continuous;
      this.progressBar1.TabIndex = 39;
      this.pictureBox13.BackColor = Color.Transparent;
      this.pictureBox13.Image = (Image) Resources.NoticeIcon;
      this.pictureBox13.Location = new Point(878, 401);
      this.pictureBox13.Name = "pictureBox13";
      this.pictureBox13.Size = new Size(56, 52);
      this.pictureBox13.SizeMode = PictureBoxSizeMode.AutoSize;
      this.pictureBox13.TabIndex = 38;
      this.pictureBox13.TabStop = false;
      this.pictureBox13.Visible = false;
      this.pictureBox13.Click += new EventHandler(this.pictureBox13_Click);
      this.l_n_Text.BackColor = Color.Transparent;
      this.l_n_Text.Font = new Font("Microsoft Sans Serif", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
      this.l_n_Text.ForeColor = Color.White;
      this.l_n_Text.Location = new Point(534, 410);
      this.l_n_Text.Name = "l_n_Text";
      this.l_n_Text.Size = new Size(320, 53);
      this.l_n_Text.TabIndex = 37;
      this.l_n_Text.Text = "N_TEXT";
      this.l_n_Text.TextAlign = ContentAlignment.MiddleCenter;
      this.l_n_Text.Visible = false;
      this.l_n_Title.BackColor = Color.Transparent;
      this.l_n_Title.Font = new Font("Microsoft Sans Serif", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
      this.l_n_Title.ForeColor = Color.White;
      this.l_n_Title.Location = new Point(534, 391);
      this.l_n_Title.Name = "l_n_Title";
      this.l_n_Title.Size = new Size(320, 18);
      this.l_n_Title.TabIndex = 36;
      this.l_n_Title.Text = "N_TITLE";
      this.l_n_Title.TextAlign = ContentAlignment.MiddleCenter;
      this.l_n_Title.Visible = false;
      this.pictureBox12.Image = (Image) Resources.NoticeBox;
      this.pictureBox12.Location = new Point(532, 390);
      this.pictureBox12.Name = "pictureBox12";
      this.pictureBox12.Size = new Size(323, 75);
      this.pictureBox12.SizeMode = PictureBoxSizeMode.AutoSize;
      this.pictureBox12.TabIndex = 35;
      this.pictureBox12.TabStop = false;
      this.pictureBox12.Visible = false;
      this.pictureBox11.BackColor = Color.Transparent;
      this.pictureBox11.Image = (Image) Resources.CurrentNews;
      this.pictureBox11.Location = new Point(17, 74);
      this.pictureBox11.Name = "pictureBox11";
      this.pictureBox11.Size = new Size(352, 212);
      this.pictureBox11.SizeMode = PictureBoxSizeMode.AutoSize;
      this.pictureBox11.TabIndex = 34;
      this.pictureBox11.TabStop = false;
      this.pictureBox10.BackColor = Color.Transparent;
      this.pictureBox10.Image = (Image) Resources.ShowcaseBG;
      this.pictureBox10.Location = new Point(17, 296);
      this.pictureBox10.Name = "pictureBox10";
      this.pictureBox10.Size = new Size(353, 224);
      this.pictureBox10.SizeMode = PictureBoxSizeMode.AutoSize;
      this.pictureBox10.TabIndex = 33;
      this.pictureBox10.TabStop = false;
      this.pictureBox9.BackColor = Color.Transparent;
      this.pictureBox9.Image = (Image) Resources.Patching;
      this.pictureBox9.Location = new Point(773, 494);
      this.pictureBox9.Name = "pictureBox9";
      this.pictureBox9.Size = new Size(178, 41);
      this.pictureBox9.SizeMode = PictureBoxSizeMode.AutoSize;
      this.pictureBox9.TabIndex = 32;
      this.pictureBox9.TabStop = false;
      this.pictureBox8.BackColor = Color.Transparent;
      this.pictureBox8.Image = (Image) Resources.LaunchGame;
      this.pictureBox8.Location = new Point(773, 494);
      this.pictureBox8.Name = "pictureBox8";
      this.pictureBox8.Size = new Size(178, 41);
      this.pictureBox8.SizeMode = PictureBoxSizeMode.AutoSize;
      this.pictureBox8.TabIndex = 31;
      this.pictureBox8.TabStop = false;
      this.pictureBox8.Visible = false;
      this.pictureBox8.Click += new EventHandler(this.pictureBox8_Click);
      this.pictureBox5.Image = (Image) Resources.Vids_ButtonOverlay;
      this.pictureBox5.Location = new Point(205, 3);
      this.pictureBox5.Name = "pictureBox5";
      this.pictureBox5.Size = new Size(102, 44);
      this.pictureBox5.SizeMode = PictureBoxSizeMode.AutoSize;
      this.pictureBox5.TabIndex = 28;
      this.pictureBox5.TabStop = false;
      this.pictureBox5.Click += new EventHandler(this.pictureBox5_Click);
      this.pictureBox4.Image = (Image) Resources.Forum_ButtonOverlay;
      this.pictureBox4.Location = new Point(319, 3);
      this.pictureBox4.Name = "pictureBox4";
      this.pictureBox4.Size = new Size(102, 44);
      this.pictureBox4.SizeMode = PictureBoxSizeMode.AutoSize;
      this.pictureBox4.TabIndex = 27;
      this.pictureBox4.TabStop = false;
      this.pictureBox4.Click += new EventHandler(this.pictureBox4_Click);
      this.pictureBox3.Image = (Image) Resources.Shop_ButtonOverlay;
      this.pictureBox3.Location = new Point(95, 3);
      this.pictureBox3.Name = "pictureBox3";
      this.pictureBox3.Size = new Size(102, 44);
      this.pictureBox3.SizeMode = PictureBoxSizeMode.AutoSize;
      this.pictureBox3.TabIndex = 26;
      this.pictureBox3.TabStop = false;
      this.pictureBox3.Click += new EventHandler(this.pictureBox3_Click);
      this.pictureBox2.BackColor = Color.Transparent;
      this.pictureBox2.Image = (Image) Resources.News_ButtonOverlay;
      this.pictureBox2.Location = new Point(2, 2);
      this.pictureBox2.Name = "pictureBox2";
      this.pictureBox2.Size = new Size(87, 46);
      this.pictureBox2.SizeMode = PictureBoxSizeMode.AutoSize;
      this.pictureBox2.TabIndex = 25;
      this.pictureBox2.TabStop = false;
      this.pictureBox2.Click += new EventHandler(this.pictureBox2_Click);
      this.pictureBox1.BackColor = Color.Transparent;
      this.pictureBox1.Image = (Image) Resources.banner;
      this.pictureBox1.Location = new Point(0, 0);
      this.pictureBox1.Name = "pictureBox1";
      this.pictureBox1.Size = new Size(507, 53);
      this.pictureBox1.SizeMode = PictureBoxSizeMode.AutoSize;
      this.pictureBox1.TabIndex = 24;
      this.pictureBox1.TabStop = false;
      this.l_S2.BackColor = Color.Transparent;
      this.l_S2.Font = new Font("Microsoft Sans Serif", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
      this.l_S2.ForeColor = Color.White;
      this.l_S2.Location = new Point(563, 569);
      this.l_S2.Name = "l_S2";
      this.l_S2.Size = new Size(381, 15);
      this.l_S2.TabIndex = 23;
      this.l_S2.TextAlign = ContentAlignment.MiddleRight;
      this.l_V.AutoSize = true;
      this.l_V.BackColor = Color.Transparent;
      this.l_V.Font = new Font("Microsoft Sans Serif", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
      this.l_V.ForeColor = Color.White;
      this.l_V.Location = new Point(480, 569);
      this.l_V.Name = "l_V";
      this.l_V.Size = new Size(60, 15);
      this.l_V.TabIndex = 22;
      this.l_V.Text = "VERSION";
      this.l_S1.AutoSize = true;
      this.l_S1.BackColor = Color.Transparent;
      this.l_S1.Font = new Font("Microsoft Sans Serif", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
      this.l_S1.ForeColor = Color.White;
      this.l_S1.Location = new Point(12, 569);
      this.l_S1.Name = "l_S1";
      this.l_S1.Size = new Size(53, 15);
      this.l_S1.TabIndex = 21;
      this.l_S1.Text = "STATUS";
      this.pictureBox6.BackColor = Color.Transparent;
      this.pictureBox6.Image = (Image) Resources.footer;
      this.pictureBox6.Location = new Point(0, 542);
      this.pictureBox6.Name = "pictureBox6";
      this.pictureBox6.Size = new Size(966, 46);
      this.pictureBox6.SizeMode = PictureBoxSizeMode.AutoSize;
      this.pictureBox6.TabIndex = 29;
      this.pictureBox6.TabStop = false;
      this.pictureBox7.BackColor = Color.Transparent;
      this.pictureBox7.Image = (Image) Resources.StartContainer;
      this.pictureBox7.Location = new Point(764, 485);
      this.pictureBox7.Name = "pictureBox7";
      this.pictureBox7.Size = new Size(193, 59);
      this.pictureBox7.SizeMode = PictureBoxSizeMode.AutoSize;
      this.pictureBox7.TabIndex = 30;
      this.pictureBox7.TabStop = false;
      this.tmr_MaintCheck.Interval = 10000;
      this.tmr_MaintCheck.Tick += new EventHandler(this.tmr_MaintCheck_Tick);
      this.AutoScaleDimensions = new SizeF(6f, 13f);
      this.AutoScaleMode = AutoScaleMode.Font;
      this.BackColor = Color.Black;
      this.BackgroundImage = (Image) Resources.background;
      this.ClientSize = new Size(957, 588);
      this.Controls.Add((Control) this.progressBar1);
      this.Controls.Add((Control) this.pictureBox13);
      this.Controls.Add((Control) this.l_n_Text);
      this.Controls.Add((Control) this.l_n_Title);
      this.Controls.Add((Control) this.pictureBox12);
      this.Controls.Add((Control) this.pictureBox11);
      this.Controls.Add((Control) this.pictureBox10);
      this.Controls.Add((Control) this.pictureBox9);
      this.Controls.Add((Control) this.pictureBox8);
      this.Controls.Add((Control) this.pictureBox5);
      this.Controls.Add((Control) this.pictureBox4);
      this.Controls.Add((Control) this.pictureBox3);
      this.Controls.Add((Control) this.pictureBox2);
      this.Controls.Add((Control) this.pictureBox1);
      this.Controls.Add((Control) this.l_S2);
      this.Controls.Add((Control) this.l_V);
      this.Controls.Add((Control) this.l_S1);
      this.Controls.Add((Control) this.pictureBox6);
      this.Controls.Add((Control) this.pictureBox7);
      this.FormBorderStyle = FormBorderStyle.FixedSingle;
      this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
      this.MaximizeBox = false;
      this.Name = nameof (Main);
      this.StartPosition = FormStartPosition.CenterScreen;
      this.Text = "Fiesta Online";
      this.FormClosed += new FormClosedEventHandler(this.Main_FormClosed);
      this.Load += new EventHandler(this.Main_Load);
      ((ISupportInitialize) this.pictureBox13).EndInit();
      ((ISupportInitialize) this.pictureBox12).EndInit();
      ((ISupportInitialize) this.pictureBox11).EndInit();
      ((ISupportInitialize) this.pictureBox10).EndInit();
      ((ISupportInitialize) this.pictureBox9).EndInit();
      ((ISupportInitialize) this.pictureBox8).EndInit();
      ((ISupportInitialize) this.pictureBox5).EndInit();
      ((ISupportInitialize) this.pictureBox4).EndInit();
      ((ISupportInitialize) this.pictureBox3).EndInit();
      ((ISupportInitialize) this.pictureBox2).EndInit();
      ((ISupportInitialize) this.pictureBox1).EndInit();
      ((ISupportInitialize) this.pictureBox6).EndInit();
      ((ISupportInitialize) this.pictureBox7).EndInit();
      this.ResumeLayout(false);
      this.PerformLayout();
    }

    public delegate void RunOnUiThreadDelegate();
  }
}
