Пример #1
0
        private void SettingsForm_Load(object sender, EventArgs e)
        {
            var savedSettings = Helpers.LoadSettings(this._config.KeyName) ?? new Settings(this._windowDelay);
            var resolutions   = LineageClient.GetResolutions(this._isWin8OrHigher);

            if (resolutions.Count > 0)
            {
                this.cmbResolution.Items.AddRange(resolutions.ToArray());
                this.cmbResolution.SelectedIndex = savedSettings.Resolution == null
                    ? 0
                    : this.cmbResolution.FindString(savedSettings.Resolution.ToString());
            }
            else
            {
                MessageBox.Show("Unable to load screen resolutions. Screen resize is not available.", "No Resolutions Found",
                                MessageBoxButtons.OK, MessageBoxIcon.Information);

                this.chkResize.Enabled = false;
            }

            this.chkResize.Checked   = savedSettings.Resize;
            this.chkWindowed.Checked = savedSettings.Windowed;

            this.chkDisableDark.Checked       = savedSettings.DisableDark;
            this.chkMobColours.Checked        = savedSettings.EnableMobColours;
            this.chkDisableUnderwater.Checked = savedSettings.DisableUnderwater;

            this.chkUseProxy.Checked = savedSettings.UseProxy;

            FindBins();
            if (!string.IsNullOrEmpty(savedSettings.ClientBin))
            {
                this.cmbBin.Text = savedSettings.ClientBin;
            }
            else
            {
                if (this._isWin8OrHigher)
                {
                    this.cmbBin.Text = "S3EP1U.bin";
                }
            }

            if (string.IsNullOrEmpty(savedSettings.MusicType))
            {
                this.cmbMusic.SelectedIndex = 0;
            }
            else
            {
                this.cmbMusic.SelectedIndex = this.cmbMusic.FindString(savedSettings.MusicType);
            }

            this.txtLoginInjectionTiming.Text = savedSettings.LoginDelay.ToString();
            this.txtWinInjectionTiming.Text   = savedSettings.WindowedDelay.ToString();
            this.chkSyncServers.Checked       = !savedSettings.DisableServerUpdate;

            this._initialLoad = false;
        }
Пример #2
0
        private void SettingsForm_Load(object sender, EventArgs e)
        {
            var savedSettings = Helpers.LoadSettings(this._config.KeyName) ?? new Settings();

            this.chkBlurAc.Checked      = savedSettings.BlurAc;
            this.chkBlurChat.Checked    = savedSettings.BlurChat;
            this.chkBlurHotKeys.Checked = savedSettings.BlurHotKeys;
            this.chkBlurHpMp.Checked    = savedSettings.BlurHpMp;
            this.chkBlurLevel.Checked   = savedSettings.BlurLevel;

            this.cmbBlurOptions.SelectedIndex = savedSettings.BlurSaveSetting == null ? 0 : this.cmbBlurOptions.FindString(savedSettings.BlurSaveSetting);

            this.chkCaptureMouse.Checked = savedSettings.CaptureMouse;

            var resolutions = LineageClient.GetResolutions(this._isWin8OrHigher);

            if (resolutions.Count > 0)
            {
                this.cmbResolution.Items.AddRange(resolutions.ToArray());
                this.cmbResolution.SelectedIndex = savedSettings.Resolution == null
                    ? 0
                    : this.cmbResolution.FindString(savedSettings.Resolution.ToString());
            }
            else
            {
                MessageBox.Show("Unable to load screen resolutions. Screen resize is not available.", "No Resolutions Found",
                                MessageBoxButtons.OK, MessageBoxIcon.Information);

                this.chkResize.Enabled = false;
            }

            this.chkResize.Checked   = savedSettings.Resize;
            this.chkWindowed.Checked = savedSettings.Windowed;
            this.chkCentre.Checked   = savedSettings.Centred;

            this.chkDisableDark.Checked = savedSettings.DisableDark;
            this.chkMobColours.Checked  = savedSettings.EnableMobColours;

            if (!string.IsNullOrEmpty(savedSettings.ClientBin))
            {
                FindBins();

                this.cmbBin.Text = savedSettings.ClientBin;
            }
            else
            {
                FindBins();
            }


            if (string.IsNullOrEmpty(savedSettings.MusicType))
            {
                this.cmbMusic.SelectedIndex = 0;
            }
            else
            {
                this.cmbMusic.SelectedIndex = this.cmbMusic.FindString(savedSettings.MusicType);
            }

            this._initialLoad = false;
        }