public void LoadSettings(RustOptionsPage optionsPage)
        {
            bundledRacer.Checked = !optionsPage.UseCustomRacer;
            customRacer.Checked  = optionsPage.UseCustomRacer;

            switch (optionsPage.SourceType)
            {
            case RustOptionsPage.RustSource.EnvVariable:
                envSource.Checked = true;
                break;

            case RustOptionsPage.RustSource.Custom:
                customSource.Checked = true;
                break;

            default:
                sysrootSource.Checked = true;
                break;
            }
            ;

            customRacerPath.Text  = optionsPage.CustomRacerPath;
            customSourcePath.Text = optionsPage.CustomSourcesPath;
            customRacer_CheckedChanged(null, null);
            customSource_CheckedChanged(null, null);
            string envSrcPath = Environment.GetEnvironmentVariable("RUST_SRC_PATH");

            if (!String.IsNullOrEmpty(envSrcPath))
            {
                envSource.Text = String.Format("Read rust sources from enviroment variable RUST_SRC_PATH\n(current value: {0})", envSrcPath);
            }
        }
Example #2
0
        public void ApplySettings(RustOptionsPage optionsPage)
        {
            optionsPage.UseCustomRacer  = !bundledRacer.Checked;
            optionsPage.CustomRacerPath = customRacerPath.Text;

            optionsPage.UseCustomSources  = !envSource.Checked;
            optionsPage.CustomSourcesPath = customSourcePath.Text;
        }
        public void ApplySettings(RustOptionsPage optionsPage)
        {
            optionsPage.UseCustomRacer = !bundledRacer.Checked;
            optionsPage.CustomRacerPath = customRacerPath.Text;

            optionsPage.UseCustomSources = !envSource.Checked;
            optionsPage.CustomSourcesPath = customSourcePath.Text;
        }
 public void LoadSettings(RustOptionsPage optionsPage)
 {
     bundledRacer.Checked = !optionsPage.UseCustomRacer;
     customRacer.Checked = optionsPage.UseCustomRacer;
     envSource.Checked = !optionsPage.UseCustomSources;
     customSource.Checked = optionsPage.UseCustomSources;
     customRacerPath.Text = optionsPage.CustomRacerPath;
     customSourcePath.Text = optionsPage.CustomSourcesPath;
     customRacer_CheckedChanged(null, null);
     customSource_CheckedChanged(null, null);
     string envSrcPath = Environment.GetEnvironmentVariable("RUST_SRC_PATH");
     if (!String.IsNullOrEmpty(envSrcPath))
         envSource.Text = String.Format("Read rust sources from enviroment variable RUST_SRC_PATH\n(current value: {0})", envSrcPath);
 }
Example #5
0
        public void LoadSettings(RustOptionsPage optionsPage)
        {
            bundledRacer.Checked  = !optionsPage.UseCustomRacer;
            customRacer.Checked   = optionsPage.UseCustomRacer;
            envSource.Checked     = !optionsPage.UseCustomSources;
            customSource.Checked  = optionsPage.UseCustomSources;
            customRacerPath.Text  = optionsPage.CustomRacerPath;
            customSourcePath.Text = optionsPage.CustomSourcesPath;
            customRacer_CheckedChanged(null, null);
            customSource_CheckedChanged(null, null);
            string envSrcPath = Environment.GetEnvironmentVariable("RUST_SRC_PATH");

            if (!String.IsNullOrEmpty(envSrcPath))
            {
                envSource.Text = String.Format("Read rust sources from enviroment variable RUST_SRC_PATH\n(current value: {0})", envSrcPath);
            }
        }
        public void ApplySettings(RustOptionsPage optionsPage)
        {
            optionsPage.UseCustomRacer  = !bundledRacer.Checked;
            optionsPage.CustomRacerPath = customRacerPath.Text;

            if (envSource.Checked)
            {
                optionsPage.SourceType = RustOptionsPage.RustSource.EnvVariable;
            }
            else if (customSource.Checked)
            {
                optionsPage.SourceType = RustOptionsPage.RustSource.Custom;
            }
            else
            {
                optionsPage.SourceType = RustOptionsPage.RustSource.Sysroot;
            }

            optionsPage.CustomSourcesPath = customSourcePath.Text;
        }