예제 #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (!File.Exists("scripts\\mwonline.ini") || !File.Exists("NFSScriptLoader.exe") || !File.Exists("scripts\\MW_Online.dll"))
     {
         InstallationClass.CloseAndOpen(this, new FirstRunFormReq());
     }
     else
     {
         InstallationClass.CloseAndOpen(this, new Form1());
     }
 }
예제 #2
0
        public void ThrInstall()
        {
            BeginInvoke(new Action(delegate { SetVisP(true); }));
            if (Directory.Exists("temp"))
            {
                foreach (var f in Directory.EnumerateFiles("temp"))
                {
                    File.Delete(f);
                }
                Directory.Delete("temp");
            }

            Directory.CreateDirectory("temp");

            if (!depNFSSCript.Checked)
            {
                foreach (string url in nfsScriptFiles)
                {
                    try
                    {
                        string[] t    = url.Split('/');
                        string   name = t[t.Length - 1];
                        InstallationClass.DownloadFile(url, "temp\\" + name);
                        string tp = Path.Combine("temp", name);
                        File.Copy(tp, name);
                    }
                    catch { }
                }
                Directory.CreateDirectory("scripts");
            }
            BeginInvoke(new Action(delegate { CheckDep(); }));

            if (!depMWO.Checked)
            {
                foreach (string url in mwoModFiles)
                {
                    try
                    {
                        string[] t    = url.Split('/');
                        string   name = t[t.Length - 1];
                        InstallationClass.DownloadFile(url, "temp\\" + name);
                        string tp = Path.Combine("temp", name);
                        File.Copy(tp, "scripts\\" + name);
                    }
                    catch { }
                }
            }

            BeginInvoke(new Action(delegate { CheckDep(); }));
            Thread.Sleep(1000);
            BeginInvoke(new Action(delegate { this.Close(); }));
        }
예제 #3
0
 private void startButton_Click(object sender, EventArgs e)
 {
     InstallationClass.CloseAndOpen(this, new Form1());
 }
예제 #4
0
 private void button3_Click(object sender, EventArgs e)
 {
     InstallationClass.CloseAndOpen(this, new FirstRunForm());
 }