Beispiel #1
0
        public void DownloadMissingSoundBanks()
        {
            List <DownloadJob> jobs = new List <DownloadJob>();

            foreach (Car c in AllCars)
            {
                if (!c.banks_exist && c.link_banks != null)
                {
                    DownloadJob job;
                    job.title = c.manufacturer + " " + c.name;
                    job.URL   = c.link_banks;
                    job.path  = ".";
                    jobs.Add(job);
                }
            }
            if (jobs.Count == 0)
            {
                MessageBox.Show("No missing SoundBanks. All available SoundBanks are there.");
                return;
            }
            FormDownload fd = new FormDownload(jobs, this);

            fd.FormClosed += FormDownloadClosedAllCars;
            fd.ShowAtCenterParent(mainForm);
        }
Beispiel #2
0
        public void UpdateAllExistingSoundBanks()
        {
            List <DownloadJob> jobs = new List <DownloadJob>();

            foreach (Car c in AllCars)
            {
                if (c.banks_exist)
                {
                    DownloadJob job;
                    job.title = c.manufacturer + " " + c.name;
                    job.URL   = c.link_banks;
                    job.path  = ".";
                    jobs.Add(job);
                }
            }
            if (jobs.Count == 0)
            {
                MessageBox.Show("No existing SoundBanks. Download SoundBanks first.");
                return;
            }
            FormDownload fd = new FormDownload(jobs, this);

            fd.FormClosed += FormDownloadClosedAllCars;
            fd.ShowAtCenterParent(mainForm);
        }
Beispiel #3
0
        public void DownloadMissingPhysics()
        {
            List <DownloadJob> jobs = new List <DownloadJob>();

            foreach (Car c in AllCars)
            {
                if (!c.physics_exists)
                {
                    DownloadJob job;
                    job.title = c.manufacturer + " " + c.name;
                    job.URL   = c.link_physics;
                    job.path  = "RBRCIT\\physics\\";
                    jobs.Add(job);
                }
            }
            if (jobs.Count == 0)
            {
                MessageBox.Show("No missing physics. All physics are there.");
                return;
            }
            FormDownload fd = new FormDownload(jobs, this);

            fd.FormClosed += FormDownloadClosedAllCars;
            fd.ShowAtCenterParent(mainForm);
        }
Beispiel #4
0
        private void FormDownloadClosedAudioFMOD(object sender, FormClosedEventArgs e)
        {
            FormDownload fd      = (FormDownload)sender;
            string       version = fd.filename.Replace(".7z", "").Split('-')[1];

            IniFileHelper.WriteValue("Versions", "AudioFMOD", version, FILEPATH_VERSIONS_INI);
            UpdateFMOD();
            mainForm.UpdateFMODPanel();
        }
Beispiel #5
0
        public void DownloadAudioFMOD()
        {
            DownloadJob dj = new DownloadJob();

            dj.title = "AudioFMOD";
            dj.path  = ".";
            dj.URL   = GetAudioFMOD_URL();
            FormDownload fd = new FormDownload(dj, this);

            fd.FormClosed += FormDownloadClosedAudioFMOD;
            fd.ShowAtCenterParent(mainForm);
        }
Beispiel #6
0
        public void DownloadCarSoundBank(Car c)
        {
            DownloadJob job = new DownloadJob();

            job.title = c.manufacturer + " " + c.name;
            job.URL   = c.link_banks;
            job.path  = ".";
            FormDownload fd = new FormDownload(job, this);

            fd.FormClosed += FormDownloadClosedAllCars;
            fd.ShowAtCenterParent(mainForm);
        }
Beispiel #7
0
        public void DownloadCarPhysics(Car c)
        {
            DownloadJob job = new DownloadJob();

            job.title = c.manufacturer + " " + c.name;
            job.URL   = c.link_physics;
            job.path  = "RBRCIT\\physics\\";
            FormDownload fd = new FormDownload(job, this);

            fd.FormClosed += FormDownloadClosedAllCars;
            fd.ShowAtCenterParent(mainForm);
        }
Beispiel #8
0
        public void DownloadPluginNGP()
        {
            DownloadJob dj = new DownloadJob();

            dj.path  = ".";
            dj.title = "NGP Plugin";
            //dj.URL = rbrcit_ini.GetParameterValue("plugin_physics_url");
            dj.URL = carlist_ini.GetParameterValue("plugin_physics_url", "Plugins");
            FormDownload fd = new FormDownload(dj, this);

            fd.FormClosed += FormDownloadClosedNGP;
            fd.ShowAtCenterParent(mainForm);
        }
Beispiel #9
0
        void DownloadRBRCIT()
        {
            DownloadJob dj = new DownloadJob();

            dj.path  = ".";
            dj.title = "RBRCIT";
            //dj.URL = rbrcit_ini.GetParameterValue("plugin_physics_url");
            dj.URL = IniFileHelper.ReadValue("Misc", "rbrcit_url", FILEPATH_CARLIST_INI);
            FormDownload fd = new FormDownload(dj, this);

            fd.FormClosed += FormDownloadClosedRBRCIT;
            fd.ShowAtCenterParent(mainForm);
        }
Beispiel #10
0
        public void DownloadPluginFixUp()
        {
            DownloadJob dj = new DownloadJob();

            dj.path  = "Plugins\\";
            dj.title = "FixUp Plugin";
            //dj.URL = rbrcit_ini.GetParameterValue("plugin_fixup_url");
            dj.URL = carlist_ini.GetParameterValue("plugin_fixup_url", "Plugins");
            FormDownload fd = new FormDownload(dj, this);

            fd.FormClosed += FormDownloadClosedPlugin;
            fd.ShowAtCenterParent(mainForm);
        }
Beispiel #11
0
 public void DownloadCarModel(Car c)
 {
     if (c.link_model != null)
     {
         DownloadJob job = new DownloadJob();
         job.title = c.manufacturer + " " + c.name;
         job.URL   = c.link_model;
         job.path  = "Cars\\";
         FormDownload fd = new FormDownload(job, this);
         fd.FormClosed += FormDownloadClosedAllCars;
         fd.ShowAtCenterParent(mainForm);
     }
     else
     {
         Process.Start("http://www.ly-racing.de/viewtopic.php?t=7878");
     }
 }
Beispiel #12
0
        public void DownloadPluginFixUp()
        {
            DownloadJob dj = new DownloadJob();

            dj.title = "FixUp Plugin";
            dj.path  = ".";
            dj.URL   = carlist_ini.GetParameterValue("plugin_fixup4_url", "Plugins");

            //legacy support for FixUp < v4
            if (dj.URL == null)
            {
                dj.URL  = carlist_ini.GetParameterValue("plugin_fixup_url", "Plugins");
                dj.path = "Plugins\\";
            }

            FormDownload fd = new FormDownload(dj, this);

            fd.FormClosed += FormDownloadClosedFixup;
            fd.ShowAtCenterParent(mainForm);
        }