WebClient webClient; // Webclient which is used to download the updates.

        #endregion Fields

        #region Constructors

        public DolphinLauncher()
        {
            //Read Config
            String Path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            if (File.Exists(Path + "\\HtmlAgilityPack.dll") != true)
            {
                System.IO.File.WriteAllBytes(Path + "\\HtmlAgilityPack.dll", DolphinUpdater.Properties.Resources.HtmlAgilityPack);
                Application.Restart();
            }
            if (File.Exists(Path + "\\config.ini") != true)
            {
                //File.Create(Path + "\\config.ini");
                ConfigForm c_form = new ConfigForm();
                this.Hide();
                c_form.ShowDialog();
                Config = true;
            }
            else
            {

                //Check if user is holding down shift. If so, show config menu.
                if (Control.ModifierKeys == Keys.Shift)
                {
                    ConfigForm c_form = new ConfigForm();
                    this.Hide();
                    c_form.ShowDialog();
                    Config = true;
                    return;
                }

                //Load Config
                TextReader reader = File.OpenText(Path + "\\config.ini");
                String line = "";
                Int16 c = 0;
                while ((line = reader.ReadLine()) != null)
                {
                    switch (c)
                    {
                        case 0:
                            DolphinDir = line;
                            break;
                        case 1:
                            DolphinVer = line;
                            break;
                        case 2:
                            BuildType = line;
                            break;
                        case 3:
                            if (line == "1")
                            {
                                this.Visible = true;
                            }
                            else
                            {
                                this.Visible = false;
                            }
                            break;
                    }
                    c++;
                }
                reader.Close();
            }
            InitializeComponent();
            Thread1.RunWorkerAsync();
        }
 private void button1_Click(object sender, EventArgs e)
 {
     ConfigForm c_form = new ConfigForm();
     this.Hide();
     c_form.ShowDialog();
 }